{"_id":"brs","_rev":"841-6ccbc06f464f8288762c9b3053d8e801","name":"brs","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","dist-tags":{"latest":"0.45.0","rc":"0.13.0-rc.2","nightly":"0.45.0-nightly.20210923"},"versions":{"0.1.0":{"name":"brs","version":"0.1.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest"},"files":["./lib/","./types/"],"dependencies":{"commander":"^2.12.2","node-int64":"^0.4.0"},"devDependencies":{"@types/jest":"^22.0.0","@types/node":"^8.5.2","@types/node-int64":"^0.4.29","jest":"^22.0.4","rimraf":"^2.6.2","typescript":"^2.6.2"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.1.0","dist":{"shasum":"a63df0d9b3703c989f8c34f4c1d59e9d80045b63","tarball":"https://registry.npmjs.org/brs/-/brs-0.1.0.tgz","integrity":"sha512-9aXh05YInIFuPZabq8AZMn1jvplczMOrsFlHTn7GubdXwBix13Jsp0P83pmcyQBaHDOPZmXPVwKg6wKY0cXbQQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDn6bxuocUV8yIN0k6jMcogt8WQaTVG4++Gwg97PTChzwIhAMAZaEFyj37WB7gNaBBlfBbcc9fn+MYTUcjCCXlpKXyY"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-0.1.0.tgz_1514905775254_0.3172789206728339"},"directories":{}},"0.2.0":{"name":"brs","version":"0.2.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest"},"files":["./lib/","./types/"],"dependencies":{"commander":"^2.12.2","long":"^3.2.0"},"devDependencies":{"@types/jest":"^22.0.0","@types/long":"^3.0.32","@types/node":"^8.5.2","jest":"^22.0.4","rimraf":"^2.6.2","typescript":"^2.6.2"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.2.0","dist":{"shasum":"cfa9f8d5c56a0ad60c686bdd9a8a0742c6723896","tarball":"https://registry.npmjs.org/brs/-/brs-0.2.0.tgz","integrity":"sha512-e94DA+JBWOOLRm0Lc1p+ZFwM6BsjbbK9e3Hrvg9SLBaX/A47pYVAbojbBoPpucRnqb0p/O4UWhRKF8J0lUgJew==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFWoZ/Ez3zMv3jHAjcARkySlySlro9b6momQNp0ssARyAiA92mD3H6EzJCUbvHjDqcVnY+niY4Smvw9StII4PbA/XQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-0.2.0.tgz_1515169937979_0.9901011327747256"},"directories":{}},"0.2.1":{"name":"brs","version":"0.2.1","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest"},"files":["./bin/","./lib/","./types/"],"dependencies":{"commander":"^2.12.2","long":"^3.2.0"},"devDependencies":{"@types/jest":"^22.0.0","@types/long":"^3.0.32","@types/node":"^8.5.2","jest":"^22.0.4","rimraf":"^2.6.2","typescript":"^2.6.2"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.2.1","dist":{"shasum":"48a56cbb81793e07b0d442b3eb0a7e4a1d639a71","tarball":"https://registry.npmjs.org/brs/-/brs-0.2.1.tgz","integrity":"sha512-NB4mOocBIwwErtLoFd2ka2m02pB+7Gsn6tIqeI01rHVI1OmStuxUf1Nrh9YpAIlHDJVpi0EOqD5N13cy9lWx4Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF/SnQBOrJ27ZAyIYJQ/WPhZU2vN3rXWd3Pu4qGngZ5PAiEAk1ypfIaVCi0MU5o7HoOTNYJRi4LHEq3g5uBjPb436HI="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-0.2.1.tgz_1515250855476_0.5533917364664376"},"directories":{}},"0.3.0":{"name":"brs","version":"0.3.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest"},"files":["./bin/","./lib/","./types/"],"dependencies":{"commander":"^2.12.2","long":"^3.2.0"},"devDependencies":{"@types/jest":"^22.0.0","@types/long":"^3.0.32","@types/node":"^8.5.2","jest":"^22.0.4","rimraf":"^2.6.2","typescript":"^2.6.2"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.3.0","dist":{"shasum":"38e2bd44ae5b03fb5eb79a980feb95f18f9047bf","tarball":"https://registry.npmjs.org/brs/-/brs-0.3.0.tgz","integrity":"sha512-M6M1mb1Jfh8q4mAPY3wc05pJD/HsirR/b+9H2GdNhV6OokvU7Un9G54SB7dfjhYQKVYvn0rw5l5f0d+8gQDIRQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF5hKsR2bJ5i1au0VAGIbLGQEtaPruxu3EDzAWdD/utKAiAHaoGF7J9KEg31FKZoC7QW0yrMjNBt6x9B68dYPznrzg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-0.3.0.tgz_1515513380543_0.8480661702342331"},"directories":{}},"0.4.0":{"name":"brs","version":"0.4.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest"},"files":["./bin/","./lib/","./types/"],"dependencies":{"commander":"^2.12.2","long":"^3.2.0"},"devDependencies":{"@types/jest":"^22.0.0","@types/long":"^3.0.32","@types/node":"^8.5.2","jest":"^22.0.4","rimraf":"^2.6.2","typescript":"^2.6.2"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.4.0","dist":{"shasum":"5be61976b0ac02de0c4ce95f03f88ffee4863425","tarball":"https://registry.npmjs.org/brs/-/brs-0.4.0.tgz","integrity":"sha512-8i0VCnU3BCxlH8FqPbGSQxam4j9fYT+hUr2TOFFc2E+CRNg5dUd1JXasJGHfPCJosmEi4uvbUNhVEYDpRzMR4A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDWnOrm4tFG/aCTNqncD95HmXLwS7RFU/G3WKrN1K/kAIgHZBhGYBNgHxIt5rB7SFpmNGMGD5Utp6+dCKyrxjZj7E="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-0.4.0.tgz_1516060297815_0.3562674366403371"},"directories":{}},"0.5.0":{"name":"brs","version":"0.5.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest"},"files":["./bin/","./lib/","./types/"],"dependencies":{"commander":"^2.12.2","long":"^3.2.0"},"devDependencies":{"@types/jest":"^22.0.0","@types/long":"^3.0.32","@types/node":"^8.5.2","jest":"^22.0.4","rimraf":"^2.6.2","typescript":"^2.6.2"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.5.0","dist":{"shasum":"59e1306daab834fe30d7240e204c2c90b76b5be0","tarball":"https://registry.npmjs.org/brs/-/brs-0.5.0.tgz","fileCount":60,"unpackedSize":238792,"integrity":"sha512-M4CCtoPdnRJUsdt4PuGiOJKWn5UAwULRG23OBkm+XyvFyPhXhEgG8xARMnah6Gkv3yIkWFAnOd5wi3MHwR/+aQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtJUQ9ByYOg2w5KOYUOa1tuy6eNm0Gmi/54Gg4QJ5CRwIgNAaiK1K1eb2LWVecsZxx5xaeqmjG41pzZism13VTRzc="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.5.0_1520216990725_0.750944523802209"},"_hasShrinkwrap":false},"0.5.1":{"name":"brs","version":"0.5.1","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest"},"files":["./bin/","./lib/","./types/"],"dependencies":{"commander":"^2.12.2","long":"^3.2.0"},"devDependencies":{"@types/jest":"^22.0.0","@types/long":"^3.0.32","@types/node":"^8.5.2","jest":"^22.0.4","rimraf":"^2.6.2","typescript":"^2.6.2"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.5.1","dist":{"shasum":"95a0cd30e47eee4c215ee4bc43af955768cd86e9","tarball":"https://registry.npmjs.org/brs/-/brs-0.5.1.tgz","fileCount":72,"unpackedSize":286259,"integrity":"sha512-HWP2LurnEVOrcYRVbrHiT4htkrwfsawNCOnoXjYD+PPE+5JCWaiNUlTyne5oPEGDFMKxKNK6mE0zddQUORc31w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJSytdiuAgTd8GZnDMd7OW6odaQRhvOQPh7A676U2gkgIgYH+rK78iweQtVhNbCfMZeK8Wn3lmtoAtxVmYhiCx+Js="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.5.1_1521309810645_0.49957571425833747"},"_hasShrinkwrap":false},"0.6.0":{"name":"brs","version":"0.6.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest"},"files":["./bin/","./lib/","./types/"],"dependencies":{"commander":"^2.12.2","long":"^3.2.0"},"devDependencies":{"@types/jest":"^22.0.0","@types/long":"^3.0.32","@types/node":"^8.5.2","jest":"^22.0.4","rimraf":"^2.6.2","typescript":"^2.6.2"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.6.0","dist":{"shasum":"7ed8109d305ec214f5933e6dbf8fada893e44ffd","tarball":"https://registry.npmjs.org/brs/-/brs-0.6.0.tgz","fileCount":68,"unpackedSize":252658,"integrity":"sha512-jfJr5eJTIMkx+UVg7wlDJ7wwp2W93Oin557ZiuPCqIaKX8r3/rYtmy/lpLLTwWqhj2XazdX1zdr22DFWJpIX0A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGXhFrKHc415kUjOwRDuXhIMybJdnSe3O0H97ZoWJWWZAiEA0urrgJYM1H23NXwg7tzzBngk5nCpOeeNCMUTPQ16JVI="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.6.0_1522813853937_0.9578010643916148"},"_hasShrinkwrap":false},"0.6.1-alpha":{"name":"brs","version":"0.6.1-alpha","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","prepublishOnly":"npm-run-all --serial clean build test"},"files":["./bin/","./lib/","./types/"],"dependencies":{"commander":"^2.12.2","long":"^3.2.0"},"devDependencies":{"@types/jest":"^22.0.0","@types/long":"^3.0.32","@types/node":"^8.5.2","jest":"^22.0.4","npm-run-all":"^4.1.2","rimraf":"^2.6.2","typescript":"^2.6.2"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.6.1-alpha","dist":{"shasum":"30335ea2b8e9284bad9befd9d5ca6a83fa61646a","tarball":"https://registry.npmjs.org/brs/-/brs-0.6.1-alpha.tgz","fileCount":68,"unpackedSize":252760,"integrity":"sha512-IFQecLal1y+ilvCNaVtyEEVRlFi1vVMKXICLXDn5S6CarK4UDVY+8HNLV0BJ5zI5UZEjYN+KfYc6UO65qdk9ng==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDkH+VQgCBobXBy1XR4cvYESIS2DXuZpe8lWs1l3GdCwIgX9Pq+Z/IXebNhsfauJN1HtXWcR0QXa8NOnDnCYIDv9g="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.6.1-alpha_1522976289568_0.2573783476942446"},"_hasShrinkwrap":false},"0.6.1":{"name":"brs","version":"0.6.1","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","prepublishOnly":"npm-run-all --serial clean build test"},"files":["./bin/","./lib/","./types/"],"dependencies":{"commander":"^2.12.2","long":"^3.2.0"},"devDependencies":{"@types/jest":"^22.0.0","@types/long":"^3.0.32","@types/node":"^8.5.2","jest":"^22.0.4","npm-run-all":"^4.1.2","rimraf":"^2.6.2","typescript":"^2.6.2"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.6.1","dist":{"shasum":"be019a6601200b852dc27591d7352c11833a6b79","tarball":"https://registry.npmjs.org/brs/-/brs-0.6.1.tgz","fileCount":68,"unpackedSize":252754,"integrity":"sha512-S1etwKikLMUPkhRTKtpNCT3zLzsunQbjNMinNcBpR7fXCIESRukT2eeRKGiM9CMHNsGNZhH/3KOibJk2T7IVPg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDo4l1af3UXHfiDd5gusxenGt91EvpOtca3tG8NxX7ZfwIhAIHhwtICSltGV1VO0TCrxLy/NkGtT4HB0OcVbYgh033v"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.6.1_1522976702237_0.04921510919445815"},"_hasShrinkwrap":false},"0.7.0":{"name":"brs","version":"0.7.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","prepublishOnly":"npm-run-all --serial clean build test"},"files":["./bin/","./lib/","./types/"],"dependencies":{"commander":"^2.12.2","long":"^3.2.0"},"devDependencies":{"@types/jest":"^22.0.0","@types/long":"^3.0.32","@types/node":"^8.5.2","jest":"^22.0.4","npm-run-all":"^4.1.2","rimraf":"^2.6.2","typescript":"^2.6.2"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.7.0","dist":{"shasum":"9e4f7e53fa8d85670bc3054badebbbc5fad2bfc7","tarball":"https://registry.npmjs.org/brs/-/brs-0.7.0.tgz","fileCount":68,"unpackedSize":262456,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa4KUDCRA9TVsSAnZWagAAh9sQAI+l0g1RP06hrmc10lv/\nOqDhF91g3o4NEFVt1oWT7BgzqnBYLdhktEuw3t4PzBXzySlg3S8F34GYO+J1\nfE5Ld9RfZX0S1jiEIzSONFhbFi9OA6Un1mAMoqFIYNxEFn2H59CUQQSafL7i\n1un4TUDML3swiechaDUoRE+0IzioOqEdCYcrnEnq0HA6hOWC8WA16ww6kIDs\nD6QxN+ygVoFHfv4nG8ZPhLBB4Se6H5faodR0I+ln/D8fmqRO2ihGcSqecrjo\nePzvQIoIHg8Ocsg/REsRzgykAle4fJAjKaAdM1HA66BLvA0D7GQN1xNjdg8v\nAkNogmnnMhQ2yR6oKUAeBfVG7sAlWWDNqPWbhgURVWX/T2Ex7izWYbLUkqY1\nJ7esp7k/UCJpG0YoLU9oCotZ0CUJ+KQwp052RJgq6VPI4U6UEAF7ZC4fbwX6\nhuQ3YAJfCEOa2Zfnco6FmYtpyrLgqAFbnhqIMF6sE0b1sjqfnHu81XVwtXUT\nOrJMvZicEhi23P9zjKB5qy8pTTYw4Yt6MlepYeVV9+Rgt+YSOkIw01aFF6LE\nEI6aHI0W9SyJDpfh94dWJ7ME4Gw5am2nuvHsS+EunU/c3bbAmFoqkwtZ499x\nyBh02siZboD0u1VeFTKMJLv0RUmSPUOyYBsEZ1n2eSoRRzgU6OHsMt23XWBR\nmhc3\r\n=G8nf\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-hs/0m1QPSZa1sW4CIF5pLg5WXT6baxC9Gb1eTfC5C2YcjDKUR1LetDRGMM9EOLOMGoytNw8HExq3lG1f7fC56w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhdzE9uaVmx99K9vwJLFO0Jekjalh0vxuub8kXrcyRDAIhAKz/uD4bP1lbORrsUfqmLGU6maSLPSNCC0FWrTCNGY1t"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.7.0_1524671746225_0.6265887590069521"},"_hasShrinkwrap":false},"0.8.0":{"name":"brs","version":"0.8.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","prepublishOnly":"npm-run-all --serial clean build test"},"files":["./bin/","./lib/","./types/"],"dependencies":{"commander":"^2.12.2","long":"^3.2.0"},"devDependencies":{"@types/jest":"^22.0.0","@types/long":"^3.0.32","@types/node":"^8.5.2","jest":"^22.0.4","npm-run-all":"^4.1.2","rimraf":"^2.6.2","typescript":"^2.6.2"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.8.0","dist":{"shasum":"a1dc27256288a09328c6d4959028adfefaac9fe9","tarball":"https://registry.npmjs.org/brs/-/brs-0.8.0.tgz","fileCount":72,"unpackedSize":280173,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbBudyCRA9TVsSAnZWagAAzNoP/RTJBUxfIB0lYjYNiqoY\nmomn/xQVUgIVgylqKXq4kITevvtm3ZHbA8Wiltr2EZExAocVzw2paWz/OAib\ntZxtuG9PKn+tg/MNzxfuEZ1lx6eeKeFMGnoTvjcwB7p7O60BHH1qnBVf0FNB\nM2vvYiu5VjPDfUtiDbPElZOl7ALwICTWmTb6EdqpNJbqinMI3OHSWcEBt4Pp\nUnRIFMgQDDfZoEKxF0HZ68s9hL92rw0BAVY46xyUNLbpzQ3hTUaIt0M09Op0\nayBCOW2XtO/C/jy5r7sdumHNQdDHhnw15CppKbsavJtriL3gS76SdEQnomuQ\nNX3qjgS/qt5HJ8vRhIJ7bTkfrhEl3x+3PQcMU7g5tS21ZFKL5NQBxs/F4RwW\n4kgxRHBkDxFfldkFxq024PNHsG6tKXUX/rmQMh28qEISIU6q3f5i4WioyWaj\nv7nXDTMgPyC1C5H/iDCXFb7JvgEUrnCD/IdGOcodlqFlRxUfWLrUSTYjAxvo\nsVcj388waRXZdLLq64JPKXMYqs8sgmKQzhxNzDwRy4wm9ZoBK/8hO2B4QyvG\n2A9dvp5tnI0ZBCEOdkLokCl6H6aSoQ12eZyvCakdZy+HLWKLNPbS+STYRuFB\n4eY7Nyem6RY4ZOXT2M7IAw71fjkB0PeoROFmAJCieolofXqW6Lry8wkFakO2\nC48P\r\n=YMUj\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-LXxfiprcU88YICNZjrcoOsAwMKJllYwK0UftQiuh9e1Kqq1Z+OVa9fDQTslojNpKoPuwoo16PcfcqmsR9BhEYg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBOpPoRHXR1biL1e/NwtgI+wu103VQqWrJM+2yK0fM2MAiAdtVfS1/GPyO6kZY8M5EuRFEWdGEJOrmkNPxyDbFyuCw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.8.0_1527179122015_0.6991504489377078"},"_hasShrinkwrap":false},"0.9.0":{"name":"brs","version":"0.9.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0"},"devDependencies":{"@types/jest":"^22.0.0","@types/long":"^3.0.32","@types/node":"^8.5.2","jest":"^22.0.4","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"^2.6.2"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.9.0","dist":{"shasum":"2238e7a4bca174d2c3f75dd09b1b96ff4a470db0","integrity":"sha512-qjdG+oNrKDN1Ako7RZ5KKC9455wPnxLOt11+EuZAwzxYyUJ/b4iwr42x99W57qCuBVXIfgtN/4VH366G8tupEg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.9.0.tgz","fileCount":82,"unpackedSize":342383,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb2nCfCRA9TVsSAnZWagAAcgMP/2aachuzU8dcmDCFiqyU\n3/MpbgEqGu7oYJZFiGV31E5/sUWUn5hMqyzirPpainman13r0O0DFoondy7Z\nrtlfgGq8rdYEWsoo8bpBs2XBVc9btoYuCtunBmDQK7Aw1I/BSPOVlThQSS71\n9bEu92HF9yQisu1OPOJ9OhwtC+k3V8umBWP0a1Bx9Bzn3ayZfBUmMFmKNXW1\nT4waFskz5H/nnjZDIYX/Vs4rDJv1d1JNKzHjsJ2uN2b57mj700mGrSBd2V6n\nhcJcutyYwEuO9eRu1pxXnoC5bLR+5WBxliCJ2O/ZvDmLm2dQsrO76lz0y3Iq\nrIkFO6buh6LNMA+jiZMM8OrnWFC9UOzznuFlCQG2xLksmFwStYq50y7yeP/j\nkDVGWUJCaaO6LcBYJ9+2Tx02473Y2ILZ86RarO4mDh2FXduSVt5VS4eZR/Nq\nniiEOyqkARA/VrsBVZFfP/UDyu6FtIyHyyNL8iGSJIJnaYvYJuz53j+eq6vm\nnIboWM8Y0DPJzJkKa594GlkMAKtggB956iDd/QVxMzZeUFcnR/iCmpJlCMjt\ncfA1Y2eJXNbgSFEXctaC6pVpr234B4gfyqS6lZ8wuVm6hB+ncXATM4qg/mWb\ndyAhrqaKdpYRQ76VZvD/aOJwmWbNDtm/OPThVPWEfu6z041daA3umjk2j6cd\nFsJE\r\n=c6vA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHC62x5t1zF0Mv67ein1atG5TqZ7FwYm+vAySvVYGVCWAiEAyBDpjyx/RJtapzJEvlUb8+VKnz3MjrqulhSN0o4MQeA="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.9.0_1541042334881_0.5332564419702819"},"_hasShrinkwrap":false},"0.10.0":{"name":"brs","version":"0.10.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0"},"devDependencies":{"@types/jest":"^22.0.0","@types/long":"^3.0.32","@types/node":"^8.5.2","jest":"^22.0.4","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"^2.6.2"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.10.0","dist":{"shasum":"81ff54d7bec19d635e472cfe6df8d0bb41c41b63","integrity":"sha512-mqLduer5PKC3trP9MEifGaq8jqj+kEXJuTFLH/Fczas8nmeBKDvzvmx63Il4UN6iJ8o58fUfH4YTyJBt6UDU2g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.10.0.tgz","fileCount":86,"unpackedSize":391564,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/0BYCRA9TVsSAnZWagAAIc8P/2ZnAzxZwfud07QF8x4A\nyV3Z9wba7XNXT4f+2uY5DH4UoO6wVBjWRaY0e1SoVEtoRJtOj6t9gTkpz65V\n7VTbGdSL20qgsmFMFQVn0jhxDvVOzNoDghu4tPOXmdELRceTtsOGTdzShuiv\niWkdWh4TFdYqqWDq2DGPqIB142SILXL3BGNsykUjNKqTOQVxcId2VogkXTLs\nnDamqmYYRB5ZSkYR1x136l41gRXmwE7d0aLzYz2cC+wDQcZmGKcQNhOw0twL\nUnPCe5HoS5+IyIV+sAwPvMwhKsraBgJ2hHUm8H1LDuZmyrSeKaNFF2wXpWhn\nISQuiB8PuggzXfrWLlAqzFN4HS16buHgrLKjXNZ/+ZSKyLovZyYyrWO6Y+Vp\nUHyTupIH6SyWnjgOsabCrVt1eKRexu+hbSBlPs0zR98ri3UX80mY6MFKTE6r\nMf3n0KGzZxPpuswPiszuPUdlzIgqDD3xP/Bq7ldUmanjPxsMNQ0iGTKdfUfJ\nC4cM17s6axrnLqA/dE7b1LfbUSB5wziPgfm2x/ogXtgMVNhCltEB12vi6FMM\nmcqAo4pniGUvf8sknio4tfbZPi5ZH+KwMnrR8heyWLr+W+JDSfaS92ulMp1e\n2cX2ddWUuwbOR2oknaOui+fsPDItxYbPzFq1Ey0uxNVc4z8uIr0b/B38ZG/L\nwTLK\r\n=TS89\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHgEPLvfxKEG1IvaCj0pAF/UdGNnqNhw3riRtA+S4R8uAiBop20TJWaZiThk2SaSJQenU+LJK9HZXygbs0zkIcfNkg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.10.0_1543454807975_0.8467282097858064"},"_hasShrinkwrap":false},"0.11.0":{"name":"brs","version":"0.11.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0"},"devDependencies":{"@types/jest":"^22.0.0","@types/long":"^3.0.32","@types/node":"^8.5.2","jest":"^22.0.4","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"^2.6.2"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.11.0","dist":{"shasum":"b08c8b2543dee6beeb946609cd1e549b99f30e5d","integrity":"sha512-HgJI6fUrBSpsA2O3ihWkpA6WCFCEDpt4J7XvRTA8GuazbVzq1RIVkHBi/B3XMcV7sd5oOQN/awArVlKqmkieyw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.11.0.tgz","fileCount":88,"unpackedSize":400988,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcBXZNCRA9TVsSAnZWagAA8PcQAKOGU07Rtbp6V0Kj2qGk\nQF1KWBtR6ZdQxDxZV5B3rxv2PvWd+LETVpc+PmDLFpDNCgG3t9b0OHPF0iGs\nt5oBYITwcYuELqCvQ5mMLANMda1KpwXMZtBhJyjBbHCksV1Pukrq0JWdpgTe\n6gW0tphFDxw1YFtkoEcbdpX5LH/mIGM5NZLhzTCFHMRcuiY0p5fbSEWkY8AI\nD1uCwMX5Yr04mPOZGgPcWx5FxTz9mgG/tTDsAhjJcFyLWmr9aZeY7N1COQLQ\ncbsoTSATAQFS2dy9Co4VO02b4NK+f5F7PP2VP42JvHreSvciqeVzjy9rfNw6\nmrZuZ0qQ5D+OsdxS0qBXOrGEsvGUGlsPvsQu9U9+s0Pe3bMHTbiMA6HOY7UU\nU4SPkKNWa7R8Aw9ncHoi+LkBgY1U73XbM2yfgLD2MgBWwkx3wIEAn9tLzKwP\nLaIJdMy6m1lYmuqzxnOK6njOeYlYCuo1sD6wSuny8f7sPz76xk8IFSzH8q5A\nmzN/N86v07rNFef1coJEhS68I9fSeQFkt53ZsRkche9nKWkiwuNOfk2Gzsdv\n3FDC6MDF0JfawGluNtX4y5e/6Lb5/S2nwUOlSf9nL7wb6YeJTeTw2QpzkWNp\nSZppTOrRlz/hKUL107ZU5yMl39z6l+BrdFnyPM4vsZSP2L3aLmYYhV6f4/bF\n3K/z\r\n=YzVr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBSk1/3KC7kc477ozJ5hie0d1UF5YT5HzTLqijTelaaLAiEAyHq6QM81Cu709554MKU0nkvjgTnRBuOIseaI/EWQwdQ="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.11.0_1543861836136_0.6102518867596205"},"_hasShrinkwrap":false},"0.12.0":{"name":"brs","version":"0.12.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^22.0.0","@types/long":"^3.0.32","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^22.0.4","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"^2.6.2"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.12.0","dist":{"shasum":"dac173246dacaabaabc924ee7b5cc328d655d70a","integrity":"sha512-VjHe/MqKgvFH4rIzGe/j94MPe0C48NV54BvYL7Liy1enzOVj3PK3tAYDLZl+GEU21fKu1qZGmAiA63kETuTCQw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.12.0.tgz","fileCount":106,"unpackedSize":495136,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGX3yCRA9TVsSAnZWagAAwIkP/36bKXbqFMNsaBYXYbIv\nn+AUdbYmVPlQzU62VyqKUKlFt4Xr8HO89gSQmSQTvTTG6e3udxkVyFy7pQHu\nGu4koz78lWl8mNgDOCY/RFqSuiqwzV05/Oqnlt2QwS6zDuxoP7qkcPJg7ms6\niAMBlQJb64qk9tCwnpKgcJOXi13hup7AML1FJ/9NMXrTUOoKQiHIbzFso51n\n3m2ZqX4AZusuD4LPTYapdLi70fr9E2QnKtYErV6NR8og5nSK2AMzXyanLnON\ng4OoYBwKmSqtWBbCQT2NoFUmmZDkQIgstTdJPIPWnACpsrc0j4iRWgIRbZmT\ndTS0nSGDYBm813J38sQkPQXYtiv/oW6fME4fcvrPUhW8WqCvoUv3f6AJ3gCd\nVCOlLJJn8vtO+cNhg2hLCPYbkPQk+03QmCZsPtcfkWVWgSzu/BzyXjMqcV9S\npQmqH7CUhcqjczsrv+KcgvdTwqeB9eBcnbduvylmVpGpIwu7S7dtUzl9Pu2O\nZZtsWve8Y9/My4IRV+SuYRFiK0V//07Bzo1LQFDhsbt0Ox6pIApG24iIVOwd\nCqRafoOhUP27H6KOzBibcmxVCdXMCij40h8ZY6IRn8Bfng1k6Nu3re75z7bd\nRgaRxDgiL3ozow067deUsHnSSR8EwUdGUPRJG6K+w8WUO158F6e4/V8P99Pg\na1ka\r\n=2u1e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+OyyAeYkUpPD7mJKzBSsYMJDWv9rnA/0sCiCMt9zapgIgdYfJ+UTQig6fX1TJUn4NPLhYi9FwxjxyIsX10+P6ziM="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.12.0_1545174513541_0.46952840889292813"},"_hasShrinkwrap":false},"0.13.0-beta.0":{"name":"brs","version":"0.13.0-beta.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^22.0.0","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^22.0.4","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"^2.6.2"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-beta.0","dist":{"shasum":"26f28f34031d5a62af47e0f97b37a6c5e368c89c","integrity":"sha512-gvcPQNQn1WUvOYhqHXYX+OgdoyJR5+FDk4SHp425A8JPlw5WpySrOfoizxW8piaM+paKEFwjrsqvUznJEuhy3Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-beta.0.tgz","fileCount":112,"unpackedSize":527705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcN+dHCRA9TVsSAnZWagAAezMP/1TowhSyNBKWLhLMMdO0\ns+yV3eK34HwDn314bN9cxlspBXxEgwu2SK2vUNB4BdGtwQjEyQ7soBKhrBcc\nbgQCaprKgOjE8gJxBWjcqCIWp1I+mSNFOpOKPeGb1U3oqPKWk2Nfg49/9sSu\ncmKvq/SxwNI+CVHqJ5qeRbftn+g75zDRSXD9OzpWLxB7CIuCac3iId1L+4we\n/hkfSXVIfePsRVncGp4u3s3G/tB8Xdti1ZhHXKghpkQ2XcYfPjobpszOCHjL\nUpuLsMqKw8MHdgC29eOd0M2jokSl74PUg+LT6ycrSZLcKw73uSAEJn6V+0Tn\nHH54NpCWg88acq/i1lKdZj394hmq8xDQEX5VmQyA9EFJZcyzeD4cHN82J440\npZ7PPlm/v76Wj9/6vZluwC1+9lDAIx2ZIQ18juG880EcCXy2gnHSgmAUYzh6\n7lfgXZKE9bRyfFYXgRezS+qAFzW4sE/YTQXIECM720QyUFyvGB9jDC6OEADJ\nGDrpMTJV5yiVywHK+TdMVU85gLhobvgX4WGE1QkuvIKEyABM/DJ/3YcyYbHz\nkLJFHHHo4qcopwY87PTgtqjnVcpfMPAEBRP3Qs8nwwmr/pDECcWqtEbhWxCA\nrf1zoFiuzb904RWVBjKYsumCqEDUivMGPXOf68sItLg4MFrqLclE4cRD2lPA\n8Deu\r\n=kouJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDciYaUZtBzbvKZdpp4d0I9ZRWW33ndloJn84QBiTZSQgIhAIZlhVyyudkNc7XojR0tgmy/2bu1iFd7abvZcosC3Nv7"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-beta.0_1547167558896_0.22999669250132904"},"_hasShrinkwrap":false},"0.13.0-beta.2":{"name":"brs","version":"0.13.0-beta.2","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^22.0.0","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^22.0.4","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-beta.2","dist":{"shasum":"254607457ac7d2913c8e3cd835bf5850ba68b4ae","integrity":"sha512-1GADr2wi8Z8hCwMMRuZha2U4FlLfvGPzSknyPQasCLvfMP9aE+neBXzeX6g7MGHSTiGBb3/VEziplfxH2BEccg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-beta.2.tgz","fileCount":112,"unpackedSize":528857,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcQhm8CRA9TVsSAnZWagAAAVgP/A+onm/7nGZwhQDrv1g6\nMiFCoa6vn+D9z5M41jlM0XG88YGIVHbRkEbVQOMAZjZEK5p/ZywkqY1Ijkle\n1BaDv79f6aGUYxl9jAEfTcj1BuIyGGrlOjjjEPZnZYpMlNdta/UwCTpbpiEd\nmc2MRSSf3MmGP/fRhJgz/On05ZPI+nxduZaVF418SeUW5hepshkTqq0708cG\nlkGRQNzRXphcawgRIAnUpUywUpEoD6Co6AIxKGdWlvm3W4vHD2C2SLE/p1lc\nbYoPwvyeCCEtpaX40VgQfNWrmRm3ys2ALsXIcJpO/dVGaz0nFORqH4CmCGvO\nk7ApC1CRrypjGV+5uidTbyN2D6Id0c7RjSre0J4Ds6/pTvgrlldnCuB9aaNl\nrKrx15iL3u+/536TqgqnEA7+8mGdskZOw3S84UNMGgb7UPq9o+5j/zmmcsMm\nJzeIMRwNE6n0BhnEt6pwIIgrLaP/z6jiBBLrwW7xOh87cXKuOYDCay7CEHHh\nXuMJHvKztsRgcoeIyBgUcp1A/BkXPASVndb9KP4vA2JkiVNE+2e2GjCZqkuz\n9XtKMEtpWhejV382CUwarv9DVm0vbA5djZBb2IZ1tZZhXCKrahiTIa8/p8BD\nVtBcLYeUJAGjmCCtkv3dSnrR8qgWBDlqhPlr48dUgI3qy8ZhE4kZGPbIhR3b\nIDSg\r\n=O23b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHB1ddyd9Lvv3ezb9GJ97icskMDlo2+GOdMztq5Bb/2nAiEA9viyFupSgUClhzBjIQ5pWmyxZ+1drFiZBSgwVrJuIfo="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-beta.2_1547835835712_0.014784433503830297"},"_hasShrinkwrap":false},"0.13.0-rc":{"name":"brs","version":"0.13.0-rc","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-rc","dist":{"shasum":"83fa02e1256a0bb0ef9adc8a1ca9617a370f409f","integrity":"sha512-rXr914WLnVRT5Ujt+FPvqBunKhPbHd2xm2wGqVq8yPwuCD4465id5lVVKLUBeVIZ9fODsLblZIOekkaK30DDaQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-rc.tgz","fileCount":112,"unpackedSize":562474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcVgRMCRA9TVsSAnZWagAAYccP/RwWpTfmby5BeDkM8vBg\nEysLIXJBkQtjhsOi5DscdHlReaB1CnYvzryved+lBEucQEbEEYYuv6Gxholm\n5qut6ZyMlhTJSFIMMOQlW5zXG0Hlz44Q6CWp4nYMasA1oQAOqViNvnM1c/4X\nzPIUlC+p8Z3LoGkP1mEoDE4H7xZyvfM0poHLzcwEA/tJAeJGZ7OS0mIUK0KD\nEouWVb71hJZWZx66G5Vop7khrHCrVKNyME93bDNah85D5DGbDajCTLxtOsUd\ntIMICFRqKuyNxXIjFpANL37Iqb2+Ksnlh041EKDT23+znPlOPnkeqQAHEXUF\nDlh/tYpqNoPNC0SWtPkVx0NizSRW/UE+s+ZkY9iK297jTBtJw1HdzHiBiqLF\njKYHic9/O6PTacFlxaNWIRG4Kn4jlyJvxprh/YP0snbrfS7e3HiHNiSXquVM\nWijQavYmyUibkyRkVeWtjyeaw2noQourTI27HxkkwEUJQOYIZl6kFKHCKF33\nr+/jYm0LsP1GzYHnYbOSTMNwMWSsIoy7QIweZILVJmAj0RImMhpFQGevSlZV\nf7uGpmHwZpFF/baQ0zYfAscvXSgivI2pJu2gu8aHY7pgRbV9fxm3Mj61BaW7\nDEed/YhykoRfEdClBGwVLPjY+NqrAGBXvebh7fV67bqu4/5XdJNVsNISDU0w\nVVX+\r\n=J7PK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAGo0r3KHgKl5UfXrt0rLw25MS0wrsAEqcl1HFmiHh9vAiEAoPntgL9typOynsmUxR1THb7UPJRfkCF2/mZ+YoimpzI="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-rc_1549141068095_0.3477578330911304"},"_hasShrinkwrap":false},"0.13.0-rc.2":{"name":"brs","version":"0.13.0-rc.2","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-rc.2","dist":{"shasum":"58e03c1206e971aa01b3930b8fb5d9b79d49ba93","integrity":"sha512-tewdhTCMteM0JQfDgog5ei+IygcPQCF7UrBHdePZZXVnCmxhb/tAr+nnNsx1lseh1OYmOktP5m2hk76fTW+p0w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-rc.2.tgz","fileCount":112,"unpackedSize":562548,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcV2UrCRA9TVsSAnZWagAA3MgP/jLTGwqwXrgzOOtU+WTW\nijMqrdgg2R1emQH8jOTsnkOGbHwk+gz5dEcnh84sDtOKkPMrljJDKrqUNVzD\nJ2GFvPO3SnJLcUwAtku2nbZmfith/yDUt/LmNZFwfcizgU9aiJVVoO2lQqVc\nyMj4DiI443su2T0TJvArW6PpgCdH3R6OUPROYa6NIx0KsLiTKzDQV0pvDXHA\n9sUq0w2QJBYHr5x0Zq9sWegLBv269vg8nHsUMqouFMZee6wMz5vyimvNHEqP\nbxe0Z2zKaCbOwSVUQ/adhwkY+EOeSW3yffW4jKYmVlr+ziz78XF67xlE5N9H\ndkEhG6bokX0VZsv1GVswNowActNcMEhgsRpzcphhuCRyNY3GPXki3x5ceqSZ\nFH+DrRq9dsQZgQOsLbShdLVKHh0wLPDU3HfJ1bfOTH4+QQ00zY3NK8DocXE5\nMMrVNaWW5Jn/UDWw/8mrFFa6Fue3jFV4f/JyMzUGx0zF5xZsX5gGPu+HLF8h\nMv9Tk0AxgJL2FWyntUj0luU0uRIUl3NAhV3g41ks0glGZvTkMtJjWXVRHPAk\n7QfvS7QOfvN0qTfm3CWgVzQPIlbqZqYv+Pab+VCj4KWTtPAv6nGdaekhPHUs\n1rl4LMSAfUan6lkddi+/uJvaONMWRxFyTz3AkptPtmyozYcmhaAHZXDRvvlq\nL+Gg\r\n=Atgx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCb56pIzz9mlTLi10BnELRFVJMYgxcqrAgcrThF6WBM1QIgEi77pPmF6yw9OYhAoFwt5+JZSm3sKbLmJRgTn8UghKY="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-rc.2_1549231403229_0.3265742704785466"},"_hasShrinkwrap":false},"0.13.0-rc.3":{"name":"brs","version":"0.13.0-rc.3","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-rc.3","dist":{"shasum":"f6b4c2a549e3e4c5700c1f94cedf2266c56bff03","integrity":"sha512-iMYCOCd1emoOiahdFdn41VWXchdQ2gd7Gd2SLOJUcWWYhK7HTgVCAtBmpQInFaq57tWSZ2v1QNVY5QQOzYJR5g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-rc.3.tgz","fileCount":112,"unpackedSize":610032,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJccb83CRA9TVsSAnZWagAAIwAP+wUkWZLHf4RvSkqtseCM\ntNfxErE9dZgx6mN0NPyoxQen1wgVSMvaWp30Se79xylacI/WC6AL+xCbLSYo\nUVjmV7zA7TNR41XhX42h5UyAykIWhTks4pbam91EwRpWM2dYbLa9UAEczMw5\nB6586Bd0bGy8/QPZiuChRmXUqpLdutz99FaV7jFlwODWZ5EHhZVxNmnnMPil\ntjqzf9cvcDtSGd8+khRqILICabZCRKtkZfD0aBw+16zqIFMoTlbI356/WKxm\nc5B/eZhM3XTsVEF6jDheOSciMY8anqCOem/qmicAFuCKkQRo+P6SNdLoUsnO\nPgm5fCEQBAMEkALVq7Yt9D2HbyQP7T3VMyuQvDpdW0TPKnXhx6Puwia9d/cK\nSeWrFQQBT/QzEbizMstHAqv4o0On8pGTtMCqsYNcsbeUB36oHYDDH7PVSP5v\nru6qrTKwRxI7EPTpUzc/v+iD7U2Lv46QKU9dxhcJG7FHlcSs4MKGG9bouPR4\nFJuikgQLba0n0iIsFfjzV5wHCdKFU6KnG5Ds15kVfeIY8VxbhjN+Vms/SJWp\n1a9aNpBclXy++wLs59hM0ezE4QHVbSR5NWxHCnAZwq+XKRVnvUr7qwdCfco8\n/jlO4J4pZV7UHNKfK6JfZVXARI2KwBumyMuhxZxt1RNUHovR8IF156uRNryA\n3NDu\r\n=dR9f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQJKRBG0Pa96DJGFXqNdNM6CUmKImW17SXl+9yhhgdpwIhAMlDTLKI872FSZRv/Q2JlscsSk3CDmlPEw7PJWzloycL"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-rc.3_1550958390728_0.4563767776242136"},"_hasShrinkwrap":false},"0.13.0-nightly.20190226":{"name":"brs","version":"0.13.0-nightly.20190226","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190226","dist":{"shasum":"4da2d4c4b6dbabb8fe9333b758e787be03ca3930","integrity":"sha512-I/iylt+IWOaPxSx8sg2FL1zr6aS6Hxjovkf45gqV1gryIYaX6uNYbuHpsimwW9KJP5SDKOM29h6N0S12b67bZA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190226.tgz","fileCount":112,"unpackedSize":610038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdMJDCRA9TVsSAnZWagAAOW0P/jxh831aIvc9HlFzo2mo\n3/jZqQDvtywXhHpzzca1cqzBagu+d7K1cA0aV7CajHdRHPZL6942CAXMqMhW\nOIaUh6NpV8IuKnMCICk2R5wIWoX6/MVVKJufBtY3jCRY+ZQcB8mUf69I4tV1\nHPR6IBn4j7wQaMPSvcOYIXNtBU7du5s9CjtjXgOhEWt6AAXf2IMod/ouBUtx\nHLxQvz5DViacBgvwJUOELVUpibivekWtSp7paTEUEg/mD/sJLl/YPvx9XBEC\n6q9F8ZD1JchzpnefndwI8EXfyxiqcVIfhQaqiDhzUL3MudKKeGovcr8RskXX\nBVfitZHa5t8Ql9U4ysMeiskQo2GVfFizI9rGP2g9TMQdPjb303TbGSyyh4na\nPfEZQuclNgYsAzIqPbTgBxg4EEWjEtbagORxhObcgNfoL4pTqYmnq+32TRHk\ndHPCtnrnzwgxoCHXo/y9cCkp7cSZHuB47ZEwuBTzJucvgiN0MWe9j/XLfOF/\n2UrHbGwnAQkDtyRBcMPeHmkz2eQccJGvQOuitotO1eJkvZzmCVmPzL63dUVg\nNuAJyfbhFK1FL/DZhqLT57NNAr8diBVaGO0xC3UjmVZUFKsaAcUnLxRJXjq8\nk7IYVTdbVH3zLcbh7T6/ZSViSZllM/gDmxs8pvVs9RB0nXS4VTV84KVxGmG5\n7UQw\r\n=2daU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEeEtPz/QRUirnZv2OXMxmvyL71Da+dsv9zn76i9pBUwIgWKKPTu5HzVvG09gvIlAa8n8f5/z6EOy2lnEOtiDsFf8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190226_1551155778624_0.2869837694406441"},"_hasShrinkwrap":false},"0.13.0-nightly.20190302":{"name":"brs","version":"0.13.0-nightly.20190302","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190302","dist":{"shasum":"79df587909e26f363f2d01973ab3cce02c2ab63c","integrity":"sha512-YGTQJBI95BdkSkkikjF39RzWR2x/6IByFfZ3sU2m8mYRtCMEn21Js43ouCfVrfBTVT7SwvRmrYOVx9xETei/4A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190302.tgz","fileCount":112,"unpackedSize":609815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceittCRA9TVsSAnZWagAAbtoQAJFb9By++haEUDURHEGo\nDS8Z+qt63vrHHnzB0ssHPo/XF/a0TyoRY25qyYCilrdJCliYvqQd3ibFO7GT\nG/oj8Ysolk+RtTa+VNLFeSLyWzjiBUyekCYzgQoSEH3N+jQ7uOWCxEbI+A6M\n5DQdnv1y3nUIProlHWqCWbVDpJcHPehZZWUH11Xcb5XKhMIufxVF9UyaGSdq\nIRQ3RWEGy+Zt86Nq1gPeIog6FOfJHEWc10Te1TBz9wQrHOs6/sAJu65wYPNw\nmKq+UCYi0a0kdKp8fbwZxzbtY9hTmSaG7any/5lYNfYNM9SO3JkHWgAuRPAq\n3O4hR4pZYCcOlfxxZEEOw7YRMJNZuUTPD3HTG+1bUv8+D/sRnTFmZHpEmoOv\n4NYlyEIBKfZJD/ET0a4OjFhzZxACj+KifoMwqw69m5Q3U5cOyY/QXrJhckrB\nD+YsoGfTIQcijg2wO4Rk1CEiVk3ODf3nbBp3PLw2dIDLvqoaZ7/kfqKMFEDh\nQsPKO5ng0x1mHGz00H5Xs73HAjnq5bWv+Cq/+1u7qKQJ5gDjTZ9Or3cBLdSL\nEotGfUz3urSbJnqEyaxufp1mCfLuAq6SGHt8nIUAe7D4DQHVy+7JvA6qhWPn\nbgI4RqUNOR3XCdvvkYel0uiLoz7qqbfMzjL9sc3xk3TsQ6/eSs4lk9tZO7lo\noy4q\r\n=pqWh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC7OvPjGTAtY6s9AY2pFncZmDjVwCeeJ98hgIcbEcv2sAIhAJbCB2Jsnrt7DAjwlPsufqZn0yxATLn6ijPDJ3uNnjW9"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190302_1551510380524_0.4785674792066352"},"_hasShrinkwrap":false},"0.13.0-nightly.20190303":{"name":"brs","version":"0.13.0-nightly.20190303","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190303","dist":{"shasum":"47349091e42cefcf2b1be3b9ea2aae24387b4c2f","integrity":"sha512-sEF7Q86MN4Ju6xJkRZbIBntQTu9PLUzX/LhHiV2zLCwjBBDx/lbPE9xFKqfYGzGbnw5dJsSR/DoJkPZADP4uDA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190303.tgz","fileCount":112,"unpackedSize":609815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJce3z2CRA9TVsSAnZWagAAADsQAJidaT+XsDuAPz/9lLLB\nHZel3sK1/FmoUqa7p5kNJOd+rOGZ3YAZiBu8kGffGQLD04TvFGQtYD7k16ha\nV7pHWyLzZtnc6S50Uogza2GQJXpEDgBe8ngUnnRKvoaJCkAAh6LuwXf3Q9bj\nCSbX/tNn0elQTGKOpexG0vSFC6T9AyBP2pWsLitOnbRUzeQMEeAE3LMfO85e\n3saYm8T6683niq2GIWNPm/YhzMHvZ1QerCmieAYlflnHDFK6gfVhRW1+wdhT\nrt1VrPxyxGKipubDY+1Sogv/qStCQG43F5E9li019ao5EhrChPDlmbyBX1tW\nCohlWSMmIApeNSPhPBm5Z08aQVErGSCzSq3d/+WATp/GfifkpMSWSBOtNjbp\n0Wk0XabRnFqvDyidNXoRZI1/iYr8k3MVzd/Ju2IvvPrYF344O8MGH+poU7Vj\nLpj7sI+NQ/gt+EQvvio8IqGlthnioGnzE13AZatT/SYth+hFYD7aLTEhglq6\n3F2oVvEZb4UXi4rMBzk6rIpY+H/8nDPmm5NH8jlvbDDsFRi+GcQy0rJlvrNt\nduY4iLn1nGfQ4iMM3VdUrpS+XCXrwPWv5VlO4Nj3HFnEk3qvZog2Pj+lbij4\ns7AhyW0w7P2ryjvHiaJtCAGJR7ZvuqohFbIHNv55HROy+X+kjTespS5tHxFO\nR1nA\r\n=rujS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIWNQvB7zKNOaQBpJK46ehO5n+e6CZwQYjEE+31eElFQIhALs333sRhM2rs8kykBCNZzwk5IJKZXLzACde3a/1fgC2"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190303_1551596789861_0.6810208711189738"},"_hasShrinkwrap":false},"0.13.0-nightly.20190304":{"name":"brs","version":"0.13.0-nightly.20190304","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190304","dist":{"shasum":"7986e37b7f4fed4aeffd669ea1aa2e1b2d669fab","integrity":"sha512-e7kP0X/snBjVUYiuzptc1uB6/sVr3YkxKgU92QRpSeBEbp1R0Uxv7W+QwNhG6GHZI++Mr1QkxudEe4OG2tr0Kw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190304.tgz","fileCount":112,"unpackedSize":609815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfM6ACRA9TVsSAnZWagAAyZ0P/3alBX9n2qs/oVEPYYe3\ngHGmxeRuYhsG1eSNzBy3TlAhXL564llffn8c8ji/4NRVid5KCdOObhCPQ0Eo\nQ1e9Itsa1NmnkmkDnPOZ5Fgb++PTuCO10oc+6o9q4jvPY6WmK675lyLfVC+c\nh1vzwICEKXvYPI2I1Vb6lLxled2jXFbHfRVn/wnUoiolOfCr7O94gA+N7otj\nALeDVr6eiosHISHTKilPTZYR9dCYOJx8+Wl+NbTYMmn58+yjGK8wuigQdeXK\niX4Wnq7aBxO2uxpg2Xn+x7CwAgCzql6jFqL5FRlkThhCX4gaBjgR7Lqz2Iw2\nEAUiPOcVGulMXXgeueejI3fv5rKlDJhaQuzgrdfxHczMypZnoYZFSWZicz/V\nrU5FfvLJz0FmaFfRCLZrFkf/2eewbpInVvu2QRvg/53SRM6DuFKmnbgP6T0j\nhkgKeapAmEuvqMxvJDRatl+L3M/47kQ12AOKJ4F2OwdaVbLEbG2it0wB1Jhb\neVjEwc3Rq2NCjPv0AQIikXVF1MHdCIE+fJQ+WoFDcUTPEYE+ESMcOgHjUNn+\n++xQApfouPNuQwMk+WiWFuLOqityeuHT76H/1/E92mzGkEoHVbG0oI+rorB3\n1cynK2OpGhfD1XjcI4ElJ4xx3xeAV0Bbzeye8Eub1w4FbCV1gScDzQRoPH4H\nqeGA\r\n=3zA6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAV/Qqx5TU4fEwSC++nt1vjeSyZinNXfcDFzNRwhkpfBAiEA4s7QmTVsaOJC7eJ95bML0fjqJzCenoiesVVTscGn+x8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190304_1551683199899_0.20197685632050133"},"_hasShrinkwrap":false},"0.13.0-nightly.20190305":{"name":"brs","version":"0.13.0-nightly.20190305","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190305","dist":{"shasum":"e2c8d1a3087e4b01ff9b04154ea0e398559d5068","integrity":"sha512-VGCyc8IUIfxsA2OgXuPK2RFMgyk4bFOkp+7r/RLPuxOFCJLcbhktuJs1HHSHn9Qrt0evklrMrAr1GdNXCz9yZg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190305.tgz","fileCount":112,"unpackedSize":609815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfh/mCRA9TVsSAnZWagAAm/QQAJWmI3XwiU3y6ukSC0Og\neF8YQ3ZsAM/tIhEujicMW4IAUvUBjEpwGQ2SxmQrwZ8CyzQ+M6n+KyjhQqEh\nYzAAgJHGwCDzVMK9rCkEDlf39c6Q7kTqnvZE9ToPE6/otOvC51ZqCvifqwfH\nZFdDnPtH8HDZWDAkYx45x8jI2+ip6Ey12FnfQAL7eETXzG9XbQKxSJ0oVKUz\nFuNTWS0bPASWH0Gpaog0qEG/acyDkZDyaM5iJRi7EWeGM81LOb0XE3EFJYNE\ndWAV6mhBk6Lj7SULInqsdC/1jpeFtEkrqhaPIn9cHmLmgvd0YXYcuNvLvOzq\nGLHyJhv9xn1GnZEtasbGEkXVvnOhY05fA8qU4b+R2Kr4xIit82K9auZ5M/mD\nFItQ9Ls9tPT6C1uTKN3sYLdiUXy7UwoyZcfqqrUH4LLlkmvHTV8uhS8yeaqN\nDWscrckIJtbPTMRM7G4ZRPdODgGTgTZANOlrq6zD7fiBH+ZvSwnVJqOxAuwx\nJ/NyP2uTEfZN/YBlVLg9JNOoPlgmwnQDhIX2LxK0D+rvZuwRC+efJ7ebD6c9\nVYZ37pvbsq0cnzQfpYOzgIXA8YUJZjW17yviJhPh83eHO6/SprG1I/kx7RzL\n/LdFy6spj7cB9JqbmBMUvt93SLeXu+F8Q28N3WrY7iATwVspO9mqF8LYffGt\nD8QO\r\n=MKTL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCrMfelq6GfX8xV7QzIq0zn9loVv4AVRHAFaUmF3dPVKgIgNOY7rn/LAgJ3N3HhivTTOwnhIf6JdWHuUxzqwMQ76vM="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190305_1551769573602_0.1947400489608555"},"_hasShrinkwrap":false},"0.13.0-nightly.20190306":{"name":"brs","version":"0.13.0-nightly.20190306","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190306","dist":{"shasum":"8fd34849c3f49c1f2a856fb98d87e87aa12b095d","integrity":"sha512-te1/yFSBaGzXrgjemTTvL+vEgQii1NoVqDvbh6nPncN2AYUYGSvHOlRBdkLPdahPjep0rPBYRI14dNyup2DmpA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190306.tgz","fileCount":112,"unpackedSize":609839,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcf3FkCRA9TVsSAnZWagAAc/cP/0IkE8UGPcvlLBS5bPV/\nm5C9l6G5ej9cS81iTaIsho1h3NSW+TqGl8B3wgGWsjuVC1TomDev/2MyknfB\ny76ipAyLdJioSpotiCDBAyYK0idA9yoD7SV6Vv5ea2ZDUTSxCo0PKXIGhG45\nnKfx6fLMUvLCwVpp7mtrM/ceziQUCvY3PM/YHHrnoAxK05gXbkvW2KxBSufj\ntrxVUl2IrIlkJ67DGm94oOe5bgNvG4PKJeU9yq8YSELsXKij4QUYAMpsI3Qs\nU/YOgGv7fP3yHF5JB7uHZYYYUmoAQCXtNpq/onjAM+cXFAK9RJt9nEjo7dTc\n83BEkU32QXTalmdFqMh6MIm+aS+RmOnBXCD3MyceqHH0ta2yQqn9gH1rHbQq\nKUffKmxsLWP9bR1Z/8TGXKpA1mVHw0L5ojGJQvmqHYJCMxnTI8vdsgM2/sHx\nPi9wt7MKOdaeBZ9TUPSOj1bEJZjeVqXxJaC+swT6ir3G8TZJ+RjuOgv1msiT\nglWIi/y/xf+wsON+oA3Sf8Lm+vc01OWm7RoVwXoaZOBS4bTzJtAzVU8YmBuJ\nD+Si/cCqLijT3gLjkr/YfxMVrPxQA5r4pQJpKG5OqIiWWVQTj6N8EEN+GNQY\nYed884o/29If+oiOorT/7a6FXFMS7M5wYBCshQ6KxKPddPY2XScIfYggN7i2\nph7p\r\n=/oRE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCjgawXRgx1BpWvNJ/fveg0HX4CFgAV+6vKyXhrHxiJPwIhALWGU9p86w2pa+/2yCv8Y4WXiZOhG+8u8aXt77oqkAsm"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190306_1551855971692_0.6978470286610152"},"_hasShrinkwrap":false},"0.13.0-nightly.20190307":{"name":"brs","version":"0.13.0-nightly.20190307","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190307","dist":{"shasum":"1a03fd3a7e17cd439896dd3d8b0085812b2427d8","integrity":"sha512-nk5h8gIrl2tc5APDVL0JaQVXs1fgIjgDOJc8oIp8KbiIHxcKK2E1I3UYXREKm5nmJt02Ey8Frfn3ZcyQkbY0zA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190307.tgz","fileCount":112,"unpackedSize":611895,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgMLoCRA9TVsSAnZWagAAMLkP/iTvfJNHKwp/HP2Xi5Nr\nJp9KC97SOh5Py2A1KWvyy11mDUCv+0Kpyak9UrOhgw4eCc7o1xLu9q+i7u7s\nOQs5wRtHNYhKfo5Sts53sFzLMzrfTxRjyKgl/VtLW14pGl1AyODpbuVj+7wg\njNDw/I4dZmYDdquS7dbadCvGB+Kmk/SUisAq2Uc4Tq3nfB1jRf25J7sfLyEj\nr6JyBipcIeUGW6m3deE1U9GWuTgEbjFzwu6KUOugcIn+V7FxfrOIKPzkUE22\nM2kCe+S2eTbwSSBy66Y5kExu8TD2JmZlbTfuxQrrpk4a7Nhmn3pje5VsRWKw\nhEVAPS8X8bJTnW0tkye0i5eH0ncaUxryHujIa/CtP9AVB6zz1F74/yP42bJ9\nHAyxZNVVOaxZ3t/0q76FD2Pd2RpuWPdNW2XdK/X7O86chu3GtodK7MyU9HQR\nzrCeVTH1kv16DW7FR7BD5/Ph587EW9pRXXAaRc8+XMZ3Dywp10KgijOFy8h7\ng0w0sH4SZVSdM1R0oK9yTVF6+QPakhpDIAXw4scifpU7WOlJQf3NIpRlJPLr\nw20wWccojPdrprU8m7sU5xWMV3Rrcve/Ha2aolFaC17sxB8f35BOyQ6QT4fh\n3E4A8duA6YsgssFnbclWlxpHxUzN4ZvDZgiHyp1tYxEUUaHOCZcRc+sb4OLc\nGHTF\r\n=+uU/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIpr+Uv5mXpf+0OOqajQFDdMqdpmieEYmIiAuvmqy8+gIgM62vF6ktqqW2AHUWyMh5GzWJ0DEd06naNIFGCCH76XM="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190307_1551942375635_0.7999297366955913"},"_hasShrinkwrap":false},"0.13.0-nightly.20190308":{"name":"brs","version":"0.13.0-nightly.20190308","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190308","dist":{"shasum":"b91127f0d5c60056dac9a6f63fe66560a9f0ea87","integrity":"sha512-6BORzlAXHUZWO5no75gT1TeHUqmg5mNw7w9+OnmMpXIvkgkDv4QrBp0agTU0EgYiX87GkyXlGq7Eziz/uGHhSQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190308.tgz","fileCount":112,"unpackedSize":611895,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcghRoCRA9TVsSAnZWagAAoOQQAKHYtslgCnbX9aKplXHk\n4mQmuQuNwHzJcA6EW0k6IwuY4UUg2OO/iWRKNOLpbJTLCHgK3rbVGFdaszYe\n9QUmPPjWmATIXuETa9br+AlkQrSAUa7jylXmPtWLcFQpPBdZKTBrOEwQt9IE\n6onaQY3j+Q08rfH92Z278pqnGIATJy29lUZ5QiOxP+jiMlsaFMDKrhAI3zDY\nGnT2IfNELPZg3DGucpz+xSVHxaX17csW19kmgVLJsl6Z7eGH//D95YRwLFGx\n2XnpkbNLZqaQbJc6Qh001mXmk8rzKDxvy19dDAyvI8Bhr8vJeg8Qheyq0T7u\nuke6Rw0MK+sKh8ypId+5eDmw/nDws3Uno/6nZNZV1rsDkcpTTUGBIqgrKDJH\nsHxSElaa11DCr4BkYKdhev1hxrx/m+sPByhEeUqeDaKz1eca2fFFLtnCX7UI\nRjJesQgIgosXZIRSHKEbTkRpqyaha5ZRoeq5Dy5HRLZZJk7v/EboW3kclyup\n3MDiCsf3TKwsUK9KIK5NYZ0dRaGcSgDcw78XsrK1Yof4q/wdKgzFAsp521ud\n2U+V3G5ETdBKA8PyQF9Q9i9X3LVOQ9OUD54UESTb+4pnAJUy1CU9Y/H8pQRo\n1h07t09bW1w6H9W3bgP+yvYkos+rGvxEKTBRilOGwtbSxBLk0aJfWBul6pSm\nn4xo\r\n=y2nt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCgCYdIkNddtjjs0cUvhFUwVYd0ph1fTYQ/4dIaivSR4AIhAOYrDWrSC+GgTsmeUvhkJ9GX+bP2IsChVlh38Zxho7rx"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190308_1552028775546_0.7523941613304415"},"_hasShrinkwrap":false},"0.13.0-nightly.20190309":{"name":"brs","version":"0.13.0-nightly.20190309","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190309","dist":{"shasum":"70c6938218ac03554e30a4fa8fa983a0b1141e93","integrity":"sha512-qN7zTmpX+5suTCCECeKWySw+iIKEPxkQd4xHeRMjIHebJxe5yV3a+Q9KbUg6L6rZ49e6J+rBGZLSXW9QU3T/6Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190309.tgz","fileCount":112,"unpackedSize":611895,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcg2YECRA9TVsSAnZWagAAuu0P/jYI2RNd91PtENxhFpD1\nc7JYhigkfRMH3w2LoEr5X1bTMhewqa5tpHQmpi1NXDb1rkATSu6M47eYCN0E\nlIsRBXWnWoMenBm+nW3WCImdVj0DW9iuYhXkcXvlwvjlHGto9WVKBcCfLfNb\ntPfR6xN9Hgel2Vmp0QJIUSjJr84wD/ANwBWZ6eeuCu1O3fFIidHYL7RLT91m\nraZRJ5rUkpcntDLGHCpqQ3l1aOFq3vhBy8qc+gnsMUcy+uP0nIzVKUOE2v0x\n7e9Us4WZzaa2SZwGimkOBXLhS/564O6UvbsE4hQrz7dfH3FEX2akLEvl5JJ6\n3acTtTBiIW3l5UD/8dA0xkG85dGHYsE5/rT83gXabcZpkVXRnZI4GP00J3K8\njUcx9TV9xZBp4ETvMdw9dHY+xUbUgX5HME4mvxVkUlWAKwZX1V/qVvZs6vL0\nC64QYKixh1nwmZAS1VJ7WmiBh6CMUU2slT+szM1pLp5Ybj0kyk2m/zWB5c1q\n4hCnf40RSrU0w4fvGDxJlFttlHkQyDnmmex7YQjpSZR0+svvNBydrA0t+Lzk\nuzdup7/ItlW7KphyY5t8pFUZp8iTMd4xUNRpybw7DCARdBrAj8P9bKXCpyuo\nYXjopsisqOVrNFP9XKTQS2t6Nokig/CDuUe1/5R+xBtQZrGvkEl8ez+6IyPl\nVcSZ\r\n=dnH2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMBgOV3kRTNI4bpocH+RYct1/46ex3IneBQF65DxGeNQIhAP5FVkCyaaICXUD7/aEBIuCeG/P2iQeXm/si4lPtDbpl"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190309_1552115203977_0.49165452937858456"},"_hasShrinkwrap":false},"0.13.0-nightly.20190310":{"name":"brs","version":"0.13.0-nightly.20190310","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190310","dist":{"shasum":"7bc9d2ee6457f6d8a6b8cb6763abb87d1253ac91","integrity":"sha512-BvB5I1XM0PpD8kJVRJRq6NovxhxW57Z0a4WQDnDNWht1IOQIDHPApopu0SI1cgV0fnV/ylv54u1iASBbAJ6D+w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190310.tgz","fileCount":112,"unpackedSize":611338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchLdqCRA9TVsSAnZWagAAwz8P/AxOGOVhc8Rt98o3fKzj\nm1/yFuQlh2UW3v62dak0V2R913fZyuUKJ+nAGqWlgOB34EsHNTEOzqGggJTA\nNP4mESloKBGWN12+sOwHBexKQkF49x71JVGKUOLtNhmkOulB3AcwbmA6iApH\nPuxsRJgT5RO6g/HMDO0RGBpzYytgC/1SoIOdpqPJ3j/S0A5qft8pBXXcCQ+a\nvO67bnGHNqTVfr7WOy6yk/qb0px2NzPO53Szrl8bV3E5XFDfisvyU1IUTV3d\n5aLOsFAcLIgUkrZGqmUp3nJrQKhSedr+rMzx7sHsnqV4bdiI3SKBt+2Fuv6d\n/Ym2BAdAp4YTZmgCuOKw5jNWJZ7gqodAj8118x0B5FgVpvqXOwdU+q8m697J\niF6YRjgIg9x1Tw2fyki0BWw3USzLrgSsUBJjzozjY2K7Fhx2bYXBK/v9q+tA\nMGsozESrSyBpqy5flwWB04+XDjEDEH/YnlWZHFNnWAey46Ksrv1YUykZviOW\n1Z5mall0fi1ltdSwi3m6AfsSht+ud5nsjZQDStfFQmWT4vzehllxFwIzrH1j\nXiQ14gn4mRFGp6CnmiOw/9N5wdgmXRTXDc0elt3aOC9x2Zo+cby0TOc62WFN\nYzlWCCxFIJHfQnyNubXgkt3jEJRh0qaRkkhLxYAp0NkBOCcI6yaStKFm2T2r\niSW9\r\n=K1Na\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiDZGkeLKf2IfsvAuBG61o4Ef0DqigmDPjQKUk6vlp3wIgFIpAxkDbRzcNn1vpXDgef0GPoOCvUPFmE9OL5CK+biE="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190310_1552201578139_0.1387761494405675"},"_hasShrinkwrap":false},"0.13.0-nightly.20190311":{"name":"brs","version":"0.13.0-nightly.20190311","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190311","dist":{"shasum":"02dcdfae0f9eb13acb89d77a30464a660adb9662","integrity":"sha512-V+w6is0xMBga55Um1M0ZmsxcPo+74JEcaZbcioG1izp2TAeU3/xsESI+Iq/DdSmPEUD8zNnF45++36gHin/KIg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190311.tgz","fileCount":112,"unpackedSize":611338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchgjnCRA9TVsSAnZWagAAQNYP/RZMF2gfUMKXsw0t6pO7\nz+0vDAXUDRXx+nJuodMd0mFJqr872VAw6QhDPEtcL7SALXpKvTpxt/YGA7hK\n0BVEHbPqPY8A4Wc9Na9M5gRXwglGUtG7EccEGtFJd4bY8LzJQITKT2wqIF15\nbCJQ4d74mE3VFBMyKl+i+ALe9YUOlyS3LWOjZa3TtefeCXoG3MlAA+u5NScM\n3z/8+BVdQj1Xk206C6dfjzFg/cxYb2DjWmiwx0zYWVBXwWf4L0ZITwUoIJZ4\npLRoMYeXmjEdWlFO4QqJUYQliGGmlDq+WHPh8PYLmvDgOgUbCzHBEKAdbfuG\niHYNBXrbaJqi7qunSHB7Mh/JJ6JoB1fKXbk6Znl3bRBPNwVc2nAjyR7a9MBr\n17VuVsmaQOcsSDHipLDOFPLgD86He+UzR7Oo4KDUoHM0eQyvPzj+vZpqrxKc\nsLApYygg9O1Chk+pFJS5Xtz6eAdXKUpl2GNq0rUGT64GJ8eD0UXaDy+B4WnR\na6/TgbMdlAc5Ih15ucUQTcdNeuevK3XQbTV4wlLRyPGBMmVilTxtmqrmVNEq\nbv16bxHJVqp0nswDzJi2HeWwJZwNsEBobT7v9O9+CFj5I7zLYagBayRjaZ3e\nG/G996utEGaylRUdiRqI/oxHA4haqpyey44JDQrajRye3p9t78Z6E+MGTEqj\nj0ha\r\n=2tN7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiIASH1/N+6TKZVfZB7WDOI3rIAwYX1kEhUb3pDTfvxwIgLSFMEpVgKGr6a+yplqRLdFl9PF8bDY0vHdvKi5fPSVQ="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190311_1552287974205_0.21068409447543202"},"_hasShrinkwrap":false},"0.13.0-nightly.20190319":{"name":"brs","version":"0.13.0-nightly.20190319","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190319","dist":{"shasum":"6cab4c2b3d4ca001d4ae87b58525ca5fb8b00d3e","integrity":"sha512-UOBgMgWYG5IWFrUi8of+n9RmaSna13yhd78bZE7gpD3yB0MpBwJB5mU0qB1b+HHtlYnfSwI5ryeENpxMThNa6g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190319.tgz","fileCount":112,"unpackedSize":611380,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckJTkCRA9TVsSAnZWagAAvL0P/2+wMDDxJan8YUJPX8g4\nVo5FixjyPRapZUly/MvQvW3mU61t0bvOAuWC3efQk13l54oM6zrZXZGemEwh\ntXvS2j3WMcNATQAgIncUsqIKRhBEZIjZsieNclzUiAzgK5YdTsLU8CH8d5uW\nEUbPsWrluJGTl78R5z80vloPrp9xbRJcBstmqXRD+aWNB2kwxlYS7UkB4oSY\nMZEFO6iyRjoH48l+uO/z2I9qaViHU03Tgw6hXre8JSSC1OKL8Rsho36gLsQy\n+6HP/mgANqwmeIOaEyBdFJmFf4QBb72OiLtI7Vw9v1YWaIL5/lW3H7auPCPy\nvhf13326GWIKtlkrTq9k3l0mEHLPwkxosg2VMV7dSmLa1ZPrbXUxPzvq4xWf\nJlxJhF+ATCelr4I8W3NeW5Ud1qWwaSH4yqHQd/Kk185kFq1uUamBq98U4sjB\nVLS8Og7fPNoSpF0yFGS5VtXX0c4g4Yp0HwVVJyUM6YCJ+Zx4TyAYYlTrll45\nNT/wrPyaYfhwVMekFzVJqpPnh1+vrKOs4muTkQ1NhXJ/+VvfMSVJH+QdD1FM\nK9CHsp7XmRNKTc4nFnkYb7hFpR2kWNEYKvHmuEnRlGzfOHB6Vg6py09cVBXG\nRwdwdzhfwlRXEG4we49FtFKz2N8QJjs3HZ22hCqBWxamsVrlAZZpPt6bNoYJ\n3RLC\r\n=9h0X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxwIBSzbM7m0Cspfh4Y/s0FLqWiGZWwIsjgnDdRwvzkgIgV2kShTMHfkwmQh412MnSHdE3K/pvuPeD5ajx3IiOM2A="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190319_1552979171467_0.3194214928388903"},"_hasShrinkwrap":false},"0.13.0-nightly.20190320":{"name":"brs","version":"0.13.0-nightly.20190320","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190320","dist":{"shasum":"76c248376e9511d3afffed1d46ab5305edd91d23","integrity":"sha512-x5iGTWCuVpijDYH1HDUylyDHz1AN9cvoBekbx5RZe6xM/sDmv7T1fypBkTpM23G+8i+YNQdF2hla0QVgKnhGRg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190320.tgz","fileCount":112,"unpackedSize":612688,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckeZjCRA9TVsSAnZWagAAmYsP/3VpQnvK6X6b0HJ42oFJ\nJZDzRLjxST10MOyZT938Pr1zvPbReVhy6em21tgKpKlX0290DJAK4+9rOnTQ\n8rXMsemDn0pOamZEb4vf2fx1A5Od+SfV8kpZeepS773THbHIeI2QNch8B4OJ\n5uO2FyyoN4J9Ig5eX6yo6EKXeB3GH66NIFJrTiLYlEzohVL3gP4Hj8io4Bew\nVC5MwvBqH7zb3jqaq0y7wfGoStsoPofpBcXAzWaornMek9IWFmmGudmcCLOP\nGlCdAQ1MVfmuMeUTNFeQhnqR+QlB6CV2WN4LtiC3oJ0Ok/FDEArxmzK4gFb0\nmCDx1G7t4ivR04sfFYfEAFJThhUYLLlxNOR4FNiNORBpXg0kvC9zLDO3iVtU\noHrT7XKEtYiaEgzC2kVZrsXfCWN5lTr3bZHsPXhzjPVhwrpvEkumJMhKDnwJ\neAgHZ3P7ZGjoJAGfA56JpAt+nSTSMeKp8KCA5Xme8fSQHhapfu1kPKXfcXNy\n7Yw8tjUAaQZjTR8DAur04v4bm1abNQwOKsm5KtbWzJbMzcmQ1rQcUoW2fiXC\npN88a97Ws9wVFV/2v+KcKTz9ACWy4DY2BdcoLquCJm4hfMqZY4Jb1EzJYrYr\nSgfdiQg0EhI9LQnM7Yedbmdof2cdBr+k8ON0vF7hedBSjSZOo+srv0Ex01wY\nFpg/\r\n=HaKk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC10sl8Ffpq5f8Ap9UL6rOR4DJsjFQLMblhwZ5Mq8BLmAiEA8ndsrEgmT7olzCUFZqrNX2fauEZItTWsYnXTt5UFzoY="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190320_1553065570762_0.35772850991413674"},"_hasShrinkwrap":false},"0.13.0-nightly.20190321":{"name":"brs","version":"0.13.0-nightly.20190321","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190321","dist":{"shasum":"6e368f7d9571da03909c692981965fc5de49c80d","integrity":"sha512-ZF+zU6NYNZXOJUIdY5GSK6sel177Gns43aMlYY2AAzEqUmUKCdNkX+N71cErrZR0nruLCkUjHobgmaxPOTdYkg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190321.tgz","fileCount":112,"unpackedSize":613533,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckzf3CRA9TVsSAnZWagAArXsQAI1khpiVkz9U1a8rc25r\nex5G8s8UPC2MXsgVX1MPUS9ed3Rurpc8vz4VPR4CRzKQmiedNKmCJw28An4I\ni0EB+am3VA330nLljs+babDyEWVeyqRc7i0+JoD0aNEqCQfsl0HPqxb+KFTh\nznB7xQwnk4VWftwo+cbmsRZQZeN/tq6VXkrzRzxsUhvjgJBBXjgQScAtISwO\n1sQsIghVW+pHrEEdclMfJL3eGPgsYgJgl9u4uKtrJqCW2FVYiS7Kqu/lPwDU\ndq61ZIssxoR6U5yfot6cEVdk8w6ow5ArzvEJ4qplHROXt2itHtVhIe1KxHlF\n2uHCv783gjJQcLPhjR5tHWC14VVMBsvKpAjNrKYwbMLSc+X6eaN+6bZcPsV+\n2qlWONc8gHZQFkgN1hsEszzWyn5lapO1oNxkJ4KNkO7amlJMoSiLTVhLsVOU\nyroc3R98XvGCABd0eE4wFR9CsNETeyN9YYPMItNEHHnKUlZnlR/waeSMoOQo\nqusXc9Q0IVvKKpuWfXcXAUooMsCXXcjN1NnQa1HqyTsaaN8DAp9KBFbtqIV3\nlAK51yh9s6ewBLr4BOw2l2dqR3TDU3kh8Wtp2n7cyu9HP4tiiynpE/d4TD52\nFLytbsTi56F0Fm2/vPerTFgxOAiuhBmUHj/1uIvsMEZ+gDB4fQGWPiWnZfjN\nJz6M\r\n=4WIt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIArCTcMylmPUVP/NUeeVNibtQQfZ/F0fzQU6FuigJeRKAiEAzV60P5EcH43P2uIZAAg/QTO/gePevFHVMrDhIJ0cjnE="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190321_1553151991125_0.19204189178168773"},"_hasShrinkwrap":false},"0.13.0-nightly.20190322":{"name":"brs","version":"0.13.0-nightly.20190322","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190322","dist":{"shasum":"a8a8bd05a0c28dd9ff04fcc53007031b27aa0ecc","integrity":"sha512-nbfG1OjrlUY3ymXA96vyxpPoFLU3keoSSTIby9M5RtZA3kuWZ1FtA+jk8/YgKBaereT80nS4yBSYSdRop7UWLw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190322.tgz","fileCount":112,"unpackedSize":614662,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclIluCRA9TVsSAnZWagAAj8gP/Rg6/ccKXzmAgMXYwwEg\nKSxcOafrLuNVOdoa0DfzfxwydNwggDbGjLv34qo5H+wGb/UpuMgI4S0isJGi\nt1RCmq1bOM29lPSR0u0vFO8+8a2LEPTUFeyhHv7VpxnQLlxLsdpyQx6RzdDX\n5P/nkhhutV32yhTyHl5C7glWv/JUT9zF21MjV2Kpt8CB+xcqNZlmQRxwPwcg\ntLGx/9qfNGZXpk7ezCIGNe/pBS5M699serW0G1ox2udFqr7jXQ6TrGrpJFSH\nNdYzADaTAJwOj67sfQ3uQ2OuKFfL2Uo+MWkdZ0ifYFBcuVCbBEeDeIlNGVXk\nb1af5RTKXatjdN2Js7tTaNsfqj9TfHkLcttcg3dfLZmXdxw41TKBEq0YLAq/\nHCnsMYPiaHb0K/QH9nOgf4K+0zOGTYtI/IZ9v3F4SuBcMfLQbewd73lRR9dn\nEqxjUXA0WA/UmfqSh1LwZurGO2Tj/JCEYKX/zs/jB8i/OwIonXrCzpqxdOwJ\nMLYtANnmtE1WS88HhI36fObUcaGXEZJzCMxQtN5dYfv2qYRDv+s087xLO0sA\nDaot9gNRMXQa20bn4dhNktYj+4MHfhuINsm1qJJW4F4Usz7YUzeziOa60opx\nyblgYG/zWVFhKuO98y1/8SwQ1nITZ/shnN+3+k70KHn6eiChgu3HvO4xkftw\nJzpy\r\n=NRup\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPj/Eqv68owtYzgAVv9QZaLCIhlnrRM1XyOjKUBpjl3gIhAJ9BJ/agnhpDI549+9J7XoH8irXtH1/oC6cOqo6d5Cnd"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190322_1553238382293_0.9773759787377561"},"_hasShrinkwrap":false},"0.13.0-nightly.20190323":{"name":"brs","version":"0.13.0-nightly.20190323","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190323","dist":{"shasum":"c26dd541c81a28813649f936b28cb5d9575ac9d7","integrity":"sha512-uEF6KNUJJWgjYwl5lSXdW7DO3s6ZhL7eQbhMit9g+g7tvnHUxoPSb9GXiucih6QJsszFDBSkU4D9u2Ag2h82Og==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190323.tgz","fileCount":112,"unpackedSize":614662,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcldr7CRA9TVsSAnZWagAAYYQP/0dy4qgbJGberzeqi60F\n0zyRUuhGARWbH2MZoYhMuPFKDAZQ69kTUc0uoxWtAA//tpJ8Fqh7yotZyr3g\n8+N7+HVZ/1i+6U/JNhZVOCvvMipUp7iQXK/tXLqLbr/Irr5qnwjrYMxL7Yyg\n+CR36zHnMjSC+SnJW983KpyzlVQ2xpd8fiXw63pJBLi+hfi/5ayNyXnu5qUh\nxvBndpVPtKFf2S9zR5jXW/7blwD3mGf8ln1GcoFOnMOnnejYn3oLsFRlmCcQ\nazAo/fNOnGCV5Y5gU37QYYIqKT2TO6sxfYjxNtHDkOanEjpSNsbYRiX+2G1B\n3lpgkhapXlJQDGRMNwOV2X4HKm8R+uC9Uo5T4LFhGQLxWt4+vMk3XL3J5kWe\nZtMi1ixBrwO9VcUyPDy2qFlV+nT2RF7P1xZlVg39ypwQRpoUSl5OAUYZBXU3\ne1oTX2Y7wESkFulHIuLJuA7cLEN6DA1cpBh7umrQj0qDH4/Vhqdxyb77/Qrv\nBJsqcT9VcMLUmFsrau7zHu74pJrhgp2qsh4Hb9vag0xdX/JGS5rl72m30pQn\nTxng3cvCrpE9ZUKrETOZl8sDcwQ/Ll2b7KPWNHMkRxauh9Q9AceKOz/gq0un\ndHCb/MHZgb87WevBydczY5V3Gk9fkNxfFYm0ZKZtVIczAMV9t3TUCPw2FPTb\nvScg\r\n=gcqA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsqHBrmsCmtcTftFNuaY/Osw58cU4hMPUSu/0oJ7ZPFgIhAKmuCo+VD0MHfpsHN8cuaIIhx/zZw/lImuoJKM4ahJ7E"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190323_1553324794900_0.33864898354386974"},"_hasShrinkwrap":false},"0.13.0-nightly.20190324":{"name":"brs","version":"0.13.0-nightly.20190324","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190324","dist":{"shasum":"a672601379d81cd4162929d84a3390802b7279ad","integrity":"sha512-UYHvT1HTbS32mz/F/IrYbmzhFTWI76GIOVkAg6JT6vx+ZAj2O52f3Tyq5KO+quxi1ziL2vSqRmD/kl0R80FHjg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190324.tgz","fileCount":112,"unpackedSize":616469,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclyxsCRA9TVsSAnZWagAAWmcQAIcugheYbrK6ANv8Z2K0\neRqxRUCrjo4wa3Pb4oyAI9ikxRHEuOvpET56bIvtA4J8AXsC6uVNc3elLr5n\nw44KVAPVM8JJxToFxzs5hnwEkDL21LAmCJ/10VZKzdsMcj29LZEOt7PvDqVp\n2w1ezKM9QYZu2ei5FZApQqy3F/d7oWPNb6DWYMXivhS9hsZE6aGMQPhO0Pe+\nPppkoOMK8tbMMfCWt7b7DZVEyIE/OYPTZbVHMFMCu4y+mPYD73//SPo7MXhR\n+K4CPmIpLsaP424Lbczdnmj69/SvI+tQbBz8+GmdIJEDhR2NndQoTyOETPHl\naSF/UgnCt7qwDoyNrih7suzdkddoaSkI/tEjRn3F1bSzipj26bCdizgkq19q\nq9Lm4YEdnaIWxV/oyNC7ok6bueJCeiWiHaHqyGsdqZGLV11h1QA8CQ/xnFRV\nkD2QYLnSxJz86GVDpiVitzWM+0TSOsgY09Lok+7J0YDmBwSWO7N1Kr3TZXuz\n1GwxFQ33ZkTZ+Meo9y0XSlKHnKo8OdFkcg7GZp1bgH7e9ZkP2MJguQPpwmJM\nmY32/lo6pAS9C9dGDTHzqZqCqH9yNDAV3lcnyXRWbqaT74U5yzaK4qTYTyGa\nbNrM7eokOeijQuggpTnPsivzY4bci+7xp2zGMHslJNfzQeDh8ylqPLDzJRgM\nx40w\r\n=t47w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFvnBBHOMKyx5sBRQoD4NUrwjqMnYIMLASR6mHLxcWRAIhAJKEl+U272igy9FHDcubLuah5n7mwWtCG6ejgXZumZ+x"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190324_1553411180060_0.19107285997995938"},"_hasShrinkwrap":false},"0.13.0-nightly.20190325":{"name":"brs","version":"0.13.0-nightly.20190325","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190325","dist":{"shasum":"d9fbb5c83dc2c318b9211cba04b2c9f9ec10cf65","integrity":"sha512-XMUCvCbz0p1SrUJTXFBPfnfyIi9TdfrXzLfksXyrngmo5889+yvbwI/jaXgVL2m0pMg+K4INU1qlJf8ORkOLCw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190325.tgz","fileCount":112,"unpackedSize":616469,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmH3nCRA9TVsSAnZWagAAEO8P/RtVqQzuIDqxrvUJjvAK\n6LjSIgiGDXM+gudYV7z5Kk7Kno9APHXuytAI82Dsl4tHwOzRneShnbzdKCGJ\nqLIDYrv9Uo3cOHer32k8NzezcFmEo2tD/xzWc5X/S7VQPQDRf1SjsLajuKuk\nOFgnRZFfESKbfwzscdpBerQa2T4p6yAf71hskOIlm2XWogGQI/5x3P9pf1bJ\nbWaVmpFOHcGQ8rYzqrMNSUodzW0u7ZK1c10Q2svVLIeHeSoZMMOB6CUyta9S\npVlF/rg2Z/Z8La6ht7nuN2eEDg50XtJJ6qtvtoUBln1pKQE+GPq1smR+z/YG\nvZrOfRI5o4HSwYh76EGV/ldsTmjhvrYtxdU/2AJ+oRRj1P1TOiU5/pdyou+p\nluok2q6hMLvTSzuXseH7EAgT8/GGEn9sefr6ykMBwSo6D/xNipB71+1QXqgu\n42o2nhk5blQ6RimYx24LsPs7bzytqnC9b7gtYJYjriaV2X6qmYGoSXkXpQ+Z\nVCq4TAmeUyZwgInmrO+5QAj40dT1MZHkJF40L3wQ6oxLKokI2Ax1PDDo7+3j\niOAn3vER8aclkIB4vW1cNrZKBI/EM27iXB+nPUUrjq6fbtyv1/NGCt+b8tRQ\nO47BN2Q8nUak4NTbmB06ug3+BgTdCbHp5JdGFYkSbVULvjT++w+KkGA+xz7t\nbmgO\r\n=/f95\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5TOzjDaL9muNVG5syJ7fCRrzO1pwGs52TmMp3TBMQagIgfHUvcsZWBwWZrygtHzGghiVMUQObEgdw3xOSRgheBgY="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190325_1553497574417_0.5979287459742555"},"_hasShrinkwrap":false},"0.13.0-nightly.20190326":{"name":"brs","version":"0.13.0-nightly.20190326","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190326","dist":{"shasum":"114eeb13a660c6718cbd4d150111cee3e9015a7e","integrity":"sha512-7xrj+LSv75lBs4J/1b/4SHJCSfMs0SgCwyewKpHP5dA9PuHnPQeHPxq1b9bCuNSSxbaGcQdtTk5svoAhe+bQ9Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190326.tgz","fileCount":112,"unpackedSize":616469,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmc9iCRA9TVsSAnZWagAAck8P/2//GJZL+vMnFWKhTpdL\nIMa+R5tPpwXL514+UrswxPY6VGQPPpT1tVCWIrH2m1VQaGXAAj3kpDXVadiq\nZmCxUW0RgW8BH7kyHMuT6WDhlx6/lQS0OuYWIh0OwURH9KKYalxh7xtlVoDQ\n0j2BAASx2OKQbxoCympumEKs+BtKayZa1ZJ571mXLkCQZ1IEOSW05TabyLBX\nQ/6PgNEAbK4OEsa+Xmidk4TMRxlMTnoKWE4tneMqzpDUlIhduVHkzYAn9NFH\n3rqtK53SQTQ7WLnWzhcz3QkYWYlYjvm6LI+FcLHQBEG4U2MfI8uVTvVzQSVw\n/ZnPgTPB5DZmfyB5YoK3c/4kDmI7V22Iv0rBdwlu6kdMXa6GVlHAPFyS0Ktl\nUTxXzJYSNm9UlmcACWg+elJKIa+//i+8AUkAOOOEOgrn6wh1sJd+OVTinwL0\npOU00HN7w+PGEJdCyhyRfvDwDBnP5Yr/Gt/tg2mAqhVg3++4gIbLnpVNBw/j\nXVpsiV9owyn2Kx4ekF2G0UJRnPVaKnNsd5f4IXV9ILfwAxyb7xUTPcQ2exr+\nP+9ecW+Ox1MFf/lm3AtJavjEqPhPi3JmtDfQPLaEGp2QKhhbzl1LFE912XuT\nfg53ER2ajHpU2udEnhrVEq2ROMpPTcOa7mXWRTzUqOhb6wx7/KFRpuXydqch\nCFjM\r\n=hpLT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8EpQiP2dMdwvDbAD1WwBUP/7LspZpkpwdmioTKqwoiwIgQ72ockP2VsF2RsDFd12+39RDuiLhvFqrkPzmrJ1vmKU="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190326_1553583969992_0.6970418146624713"},"_hasShrinkwrap":false},"0.13.0-nightly.20190327":{"name":"brs","version":"0.13.0-nightly.20190327","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190327","dist":{"shasum":"aebc016ad673803054f93ef85fbf077458afe74d","integrity":"sha512-VwhLLeS5UGpmyPmjkUruWCbwDeAHqVZpti5Ie9ro8xclNhIXAIT6/8gNiuW5j88t2y7/4RTRd3n1m+aulgOm+Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190327.tgz","fileCount":112,"unpackedSize":616469,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmyD5CRA9TVsSAnZWagAAQ4wP/RdnHffBCAdznQTfbjRf\n9itK7vBYTkBt4kCCyfMdl1/uYojLoWhyqkS1n/kP2pU+QvW2l8JwVsmLP6Nk\nsStKALXOpDpUfbpPV0tUHcoDCYLMAw35snyqssJDT8txa4Mz20GkuC5BzdL8\niXD/pOMowLqz46eaA1gPuEcDVVvZjT43HVzviBqKvceW27FC3HCPXASxcFsr\nnGg2LcCIJwV/wYyqwGui2GH5DcOAvNj5v4U7A12q0qXivesrsYK/IyjomVAD\nx0yFRzs5HYBZ2egHrtTqs/Rs858GrEDlsgEun5GqyJ+a4OJYeIqpGy3fTKEL\nyqYrtYwc/Ix/WbO4QBiQlh7ke604Bg+0f8nkl/lzTTLLtdhceAPQB/+O1vk9\nOa+MADEqV2suJ58BeFGsk13s4SGDSFgDEHMtxDnvTl9OIze2Oll9gr6B00uH\nn7UGlVihPMMbFAzkddCZ91+0Zgdxk42KGgvSpZM4D7b1CZ+1Zw74N1Qrszrk\nmhHStyJtzXjR4MkuPwPnvcOhrjcMqxJ8mgKPXUATvNYOmDOb67xkfu3oHbaE\nQRVeloqx12oj9v+PMehJPU0C8IxiJC/RSWDkIMQzAQQli4NTAm7moBl+8s40\n9qwZq/Wxy47yoyG4pek8F4DiN2o0yH4oEKFNpdZGUyGO1Yo9JmDYjUocsMkz\nHcND\r\n=KFmo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGR4ibmAKwCc1B/gbdT9EmsoqhXdXIZ4V5w+dztV8SwwAiEA1BRCkqxPjjLfTU3Z3Lf1dL8P+0OJj2alSpH6MimBkq0="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190327_1553670393267_0.45488403425194"},"_hasShrinkwrap":false},"0.13.0-nightly.20190328":{"name":"brs","version":"0.13.0-nightly.20190328","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190328","dist":{"shasum":"8e12b19486189c64bc9e680e4c5902bf04dac79e","integrity":"sha512-YgRxyxxZROdofQ++oRwuyfgDbhw/BdUP+UFZWGjuX0+nwEtoifmfwn6WTPqV6TLV0T8SUagbSFugLkVWSTT0EA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190328.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnHJ0CRA9TVsSAnZWagAAiLMP/jRZGIETsITBxZjfGEvY\nPjM5IvYrqFrBFgbYXk+T0sGctv+ltg3HRy1OXlOuLMyGxRwDfOdevR03zUDw\nqLTfY4psbcxRp4y6gdLVMJokknnoo3tjmAfLe2um+9xaZCJfvxJt2rPkfPF1\nMarDEiaxTFdXHnYYV0z6FqSzOBWufnUJg//ILU00SYgaItIN5sEDcXe5cmU8\nVbJspwlI2rT2phUTBkNwE3hD7sfxjZhO1BbqGQfeOZ71i+vByULlYSfqDTkO\ngraAIwaTphXXjC7bRyLdgjt+ekZiJQaWGt2uIg+4jD+qcSKu2N2GcHkcNX8a\nBouG/zReoFB4ZOCkR7zT1mCl0xMSFvGBNDWhk14IWR4q/9JfU4y0oGtJx6FC\nxW6Gxl9TIOtBhZJh5/Z9HomNXka0fugmkd4huEGM8ksFw87vxHggf1iskvSz\n4XMz/Pi/YI6E4WkKag9WuPDDG/U9ztGBU8blRqszpHPa6j5UPGf7LfM8wIPu\nYI35Xw4J5qknIpZAAY4ISN2/iPfeByi9E0kjnLvcwBahPIVlmR4AmdiTG4Oh\nIxjd6eZVVQypaPvH1MaRx8xZgO5u2Pgr+sX/pcwcR4K6hiCtlrZY8n7hjoqz\nUdXiWNdu05v1oF3ufzpMhr/wOUBMRU37Q8YeV6YsEcaCXQUWRW6qMojnsiVa\nNCDi\r\n=5i57\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAdRobOquzOehs0feaVEmHpBa58H4mViEMG5bokAGJqoAiEAs5/7tBMI1owV6mOeXESGBKwfGCornUQfKRxN2tRj+fQ="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190328_1553756788307_0.2694770738017258"},"_hasShrinkwrap":false},"0.13.0-nightly.20190329":{"name":"brs","version":"0.13.0-nightly.20190329","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190329","dist":{"shasum":"0eb03904ba8ef34f61ff28f0cca695637fc88935","integrity":"sha512-A8i2hsceyoZo+rE1ebNufNPKf2PuQHk2olOFW3fdOTAQ950xbJ4nSyVUZtorIGiLaKuYQSp02rTEeutFaIfLwA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190329.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcncQHCRA9TVsSAnZWagAABdcP/AsFi2hOlnlZqA2qj5Dl\ndgQVvVZWyP077BqQjZ25L/y8a5mo09SHDDnC3BwIIBVW+EfFQd8kBcQ3xRDA\nzfehhfyR1+Kg5DZtK3CXMmo429D54eL5pXaH1H32vpYRo8Lm7ocWeKiegmBJ\nD1fU1d7Xbb3vYLnFlzaq8NFiw6Sjl1Lw9cGDgYCS1GtkeatVbojLpM31m+3t\nKvNfOjez28Awg1i3dwTY/I8N3SqpyNHKdU8NhJdJYKvR9eP3nsJCFmQCASMS\nBZBSD0pcd3aBMgzJZJ4vmfzi6g454rQjr0nAc7W8hGAP9dEs44RsscmEBD0q\n4LJJT4a2hf0k4ukBwTCLyWp5UXemiQAwy/3LQN1ar4tfPB7qLMvIx3QlM+Ze\nNe56zHecC5wmWtld0STluuZQmOx0TOFzhfUnrKnyrsTC/nV6eAA5cub4n+o7\ni6GodZTI5XamAtlYq5cVVuuPlLnvuvsmHkzYdpv1IqUZgldV6aTtYyp2JZlI\nBH34h5VDjliJCJpnXqPg1hBhmHaUs2HjPgh4LUK6Jsv16+C6KO41Oy6uddvb\nCnNN6KEwoM/eG+GHJq/B4akv29xPn/Rigqw0xaJDJ6eQoRHaW6JEhzSNVrbm\n5OcgcMI/2pInDjrx13ytZJ625sZiNWOwzE3HsUVt4LFMkBcbwTamsy66rWcJ\nwXq/\r\n=8fUi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAzfsvtTokm3IvMvMgMDDWVsxEjGHl1sXFJ2R0Fjvq+pAiEAwniEuNPoY0wkD0xSiiFRFqOvFXTKPdGpz8L6TUfFySk="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190329_1553843206966_0.037493544248246025"},"_hasShrinkwrap":false},"0.13.0-nightly.20190330":{"name":"brs","version":"0.13.0-nightly.20190330","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190330","dist":{"shasum":"cf0c641704fefcae9ca2e208d713734f7cb335af","integrity":"sha512-q4jhjpIfKcyukV8lrKUymnBsxNQv7hWceDCfxWuIrx5pOGNp9wIpVaSFg7sjEkbgYSqsKTBZ0vEbCcotwGZ1Tg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190330.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnxVeCRA9TVsSAnZWagAAJPIP/3zDLU0mGbfnRZhkWwEw\nIlZURZV/9Cz9cprVCVjqTH9lC7yzEMsy6KnEllqvOIvD94+h40FIGZU+kbcZ\nITCHhi51VJsJQ32L8ue+ismtAcw9xi1/WRxAvtb4k7ZBjREhHxCtKt688eMh\nEIR06QManPS/YCM8dUS4Z2G5WslK4zrRomgGZ5SpO6fqsoNIg7+/NVaQPA/y\nn6bSkGEf20MwBPz89MR9oMcvyX4/H5NsdzjCyC/anOSrbb84qxwpD0uuy0l6\nF+sh4Gjdub76Nw9o5LCIvB7IMLxDOEPekRYifI+PrOIvE70xHxGyazx9m0DH\n/8ErP0Zukc/ubvXqWB+EQw6/iVfVnUeg8vlvLr3r4P0BOpMcK9J6zIWjjrBb\n09pMlW1VMURIDlmEjy9vkS5AIb147bKnv1sOUAWkATgKnaECWuJtN9xK+h+t\nFaYbJFSEVqFe4RYQNdv5LsPzPNpaW0lo8Bb7b2Q04Xfx/m57Wis7lk+lEXQ4\neSdnOhSvVF9t/dA+P7a6iXZWwAlxLcOuwO3lLdCBjwpjcJcXRGs1KyBCE5d4\n6821x3pvUzTsWXkb8sNXXgAFNd8/9PBTq4cK6i9SqfMjM/6hvqzF5KEDhlRf\nLd4Td0GoCWbmHqUOrYrgeg8uNmGdaqEjyOhvjwAoGmjLZRw3vhyWz3UVR7t5\nfVW+\r\n=mOkJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGm82lm4RAE2dmb2NCIPLN0PdwqHXvXnOGqkPSi4hCcQIgGgcAYyFP4TNKVRCtD2WK4jkciTjh8D++dZPVgCxSacw="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190330_1553929565602_0.06531953196974882"},"_hasShrinkwrap":false},"0.13.0-nightly.20190331":{"name":"brs","version":"0.13.0-nightly.20190331","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190331","dist":{"shasum":"6d3e73786633570d3fa740ea95b63ba5af5c8e26","integrity":"sha512-jYBbgWNGNv4dYWKffoZqo5zt//+J7dh2+9rlUQyyUtrEttMM1/UiT4PhxcleoFnh4RYxy967YJDRngDm2bMNRA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190331.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcoGbiCRA9TVsSAnZWagAAfT8P/ReNYIvgDm3MAaKWBpBY\neSRIq+8w0EUNrc0oqKb6Yetpc6rfjNp8tgcrK1+e8FKZL6bpH/v3YUb6rs8L\nCVi4IhrvzUd6uusdMFi2MfwAK5HPHU8o4V3c9fyc16LxqUYXHyKuAbeU/Vza\n9UUhoCeL7kjqeKAOpZZRV2ZMgqA02kdpsaxxupnzW6pqr/Uot8LLNlTZ0Iyh\nK9VV2HBt2AtjvagALH+ryhVc+Xj4tylJXgNYQNXoBhVQ8eV4X5qnpdIC82nB\nPyUIWgbrEXiL6SNkGhwK7uLNbmf5db1cCRPxLG7gPeHJlF8dJa5w8UZkl5zp\nAZlUd3Y9Qqou8DDK82/msRiC0SFpAOZrCAu3Ic7VArga5zSOFDmPKLWmdGXo\n3VQ/q88HMhyM1c1gJrmTK3mXzn5a0hxPXuhB51oHGeeY4nc3hVJ6BMC3R1xa\napb6wcK9xM6T7X9piBFOgkL4AHk07Bkt5S5p8whjdRJIpm2HjNZBtOn5U9St\nb29xg1s9foaQ4sScEeFytEXNjm+dq69P9kF9Arr3IPawyIl9i1Ge4VGFVsuQ\nIdjGPTUue+U4XNI9B5LBJhz+SFp/tCMe9BkQRjlL2aaj52L/snOg2Dhga8pp\nZoiB235tvFKXI4a0r/pNoVBgH31c+6TEbCEa72ermSeePtpMTSzgYKIYd6Cw\nnwRO\r\n=04y3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDgzTGJCLLUdhv7sNd5DunAxkAGxrBIKGvC+gYNMitEFAIhAOGW7NfecLKL7+Up6Q21IYX2ziVjjgyEKRhcDxeIeYbT"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190331_1554015968473_0.9801705620566616"},"_hasShrinkwrap":false},"0.13.0-nightly.20190401":{"name":"brs","version":"0.13.0-nightly.20190401","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190401","dist":{"shasum":"edaa074f7cb4dbf7ecb81008b37483f2b81a53a8","integrity":"sha512-CnPJLo4zYu9cpSDXQDFohntVwF3DZWnqGisPRFeAGbAa1BLB7P78X5FExAROZ4QSIc1AwDz49ShhU3aSZQst8g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190401.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcobhqCRA9TVsSAnZWagAAof4P/A4nGK3Qqsf26wyXdTP1\nEamjONNpQSlwwEfv+Eg+99VvOguPZ1B3L2lxA4GHh3sVZswam6fb8snFmZMh\nRTHoOmM9ldQoUspKFKhL2x/eA++FMBQMFgQOVfc4sS5FmGlLbBGzz1rzOHzS\nIWD2mR8KMwcQRya9W+v+IjjBfrIo/h92WnnhwOS6RlpwdTzf7QPb6Xu6KT+4\nDVUjO6nl16igO51kq4gbDWFoCUv5g4D7OvGMVptVD1mwxq72XbGeRkhJbUNM\n5Ym0gxwi5oH7MJxaSh/njcMDA7HyaPXy/co66wrah4pdz/DjAnJBrz8GYf/Q\nIpaBk9eQ+rj4ri9s+RtfN75aKz+UzDGubMRDyErs5dbx3YMMyDmkAxGVu/jq\nIVkSUUXxMnddDGD1UKnbpobWn1Ppm7BcdT1tmRo7aNjNwchtJUClNeS9OzBT\nIuSDhAIrZ9h4Wb36AT8X3Fsw1+jvvvpQM3Oc+N3y9W4sFK/358zF0XZG8mOR\nVYFjPn7CFzP3fX/h+RPT8gLMhS/eMt2Tc5zuMqKFff/1PkvNUpYaCN7CUAfv\na/xmkWDZpxRn/8Df9mYTmwvRVnNqcK3VrbeftXe1ILVlpXyLbZF8nlW89TA1\n6ObteccF9S+xzXpcj2joJq6/qYuRCFFJcWzI+BlWEiB7n/I8fbCV5xv99dYW\nmWow\r\n=K+LM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIELK2x0WaXFS08lQRfakubELUP7acOaGgZTT69m7odY4AiAImuLFuiqy5JofEvHg1pOdMBSRMa0QRHXCeFDAsNNywg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190401_1554102377496_0.41543832768197064"},"_hasShrinkwrap":false},"0.13.0-nightly.20190402":{"name":"brs","version":"0.13.0-nightly.20190402","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190402","dist":{"shasum":"d10b0937259a542c11cff6e0dea2fca50a47b122","integrity":"sha512-TF95c7l7Wop/Him2EMAigb1MG7ydkBcjAHokeOd6/LKBi+VwRhMYdkuR80CkMvIqz9AZ2hjRKnQtgXJoY1vAig==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190402.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcown6CRA9TVsSAnZWagAAD2sP/R+LaHLMZ77j+c50fKWg\nyF/1WhE+XnKdw6Myd34P5u81mix9qvNigQO9OdgdjMGyPy+k1oT9HZ5Ls3Fy\nrmi7MEVgB0Us3QvfV8X/OnkiCgD3NRq5y+/K8VajJ1zvJAKB7MO6ZXOJf1yh\n0GeHn+lnGRi/y77YyyE3HqZPQCqJq3Ev0tTOJqkQZzCYewW5Llv9Vy1FF7sU\nhBw8oEFMaILor9Lr1CbrtJdWsL0s4Yz1ApJCTY5oJhEy8/nsyiXoMPyVWl6p\nDNkA/j7voBabAKwB8g6+W+Dke9nbEWNr2Ul30U0AzPMVdlCYv0iEOeIzdS3N\n8dfuUsNDsFa/VW5C4/QDB2cCovc2d+2DNRfWLKta2Tx8yLjuc9hasqLSteXn\npuU9pu2U8KvMScAN5Es9n+zeE6apjgWjI2yfo2o8zrTTCeOdjoUIoh5hHNil\nfwjgaT1cHpMEj7aldAcvlVXgwOqYuQxUsnLjzE2R92pxlrAucBlgYMBmWb8T\nju6Ky2dpBym1+w8B2DRgqdxG74CUlgzYzZ4Oz072E+ySJuKfWLA6kySH/YBE\n/OTvC4hq0js+gHvNwY2a49Ybh2Ntmbg//7onMy9dualYNAmybSySyXghLShL\n39rM2vUxxr0XMvkim0esqQdXyRJv4tsHgM9SErj8EOwevxYFZU59VS72TePH\n80UG\r\n=Uil5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEYjTA4t65bCv3Evm+w/BDpo3PqG6u9IZ0cULhEzEL+BAiEAmp0F8QtantVPhsxRkyx+Yj1D+VOSoWdwAWG3r1J2M6Y="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190402_1554188794011_0.23551822136337397"},"_hasShrinkwrap":false},"0.13.0-nightly.20190403":{"name":"brs","version":"0.13.0-nightly.20190403","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190403","dist":{"shasum":"cbbc03b6811058df5ae9b594607640b83bd0fc7b","integrity":"sha512-zeidU1k/wipCSBqzMZoTMOdyxb5fWBgev7DZKbNEpm6Qs9JZSp208B23eAmrtgGBMoyDycp2InrH+Abac7+AwA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190403.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpFt1CRA9TVsSAnZWagAAAlYQAI2VAWOuZIiEo049LOZD\ngN+Wd5jqdb6fNiu3rYo6D0rDY94nHNCxoPXQ7f5jMhO8gEtJp9v3ZdQgk9Vf\n9wTGFb+ymrrYnz8n6DXglk2EjLam2AWFdBGDJbHrcS82rYV9IlJEG23PoHvc\nWS6IvjFc/iMdJ7YOwlohIZ0AXNHn0EYI3eAHJ/GUdZ4EEursX5uc5pVY+KtQ\n5vkPxjL9+B4OKW7S5DskhN3c6oM6t8/+4e6Cgm/GubTykkxteVsf6i4lbw/R\ne4DBWMF5z+vllDswJx/dtehBfxyvMFz9JU/C8qiuCX2I264zjEC2MqYrUgvA\nCPz14qoFMiMeJQ3t5R8snukZ/uTrnkAADAxj1VOh2/TXawOBWCjFYtOerk8l\nOkfPf4EMdK8IbpbuTj1BeAboebyxBrXKmsOFzzEQJgKENoh/cz9jSq//nj0N\nzlXtj3HZ0TXpnHEhsrJM0L7VCvKJakFYUhRW00lbnG9PDnBwMu0LUjWR+J03\na2R8wJqIQ7huxQ1Eckj89BSFd3rjO+sUS+rKX36nkFxJUMI2b2QuKOpSD5ry\nKyrgZ+bvcx2wjri43Mf4vz2MdvZ4ti/ghqOIRIpP7PQmioGRX5nNlOxe3BWn\nQ/SUrFfAYZ5bgzYVtX/OIWSJZCwPlHEJYAe6eLBVDAaXWwcVYekUBhOAkeew\n3FlP\r\n=3V7v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC7vUa8sinaTicVNNyne1iM1JWtk9m+qe5gSaY5aDLIhQIhAPzp2xogFZl4D+BKac9Q6Hi/e7SkVc0MZV1MGNqiHMnM"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190403_1554275188818_0.17691772962423724"},"_hasShrinkwrap":false},"0.13.0-nightly.20190404":{"name":"brs","version":"0.13.0-nightly.20190404","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190404","dist":{"shasum":"ab70279bb2f6ff8799ad45cc5806d12f56f3ad5c","integrity":"sha512-tj8Gfl9+yUesO9BTZzCoQpoPHYaZi37ebVHRGQ4G/eJD8N70kLp9/UXhfYT272iZgOvBiZdzi9AiaEVGlegXnA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190404.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpazpCRA9TVsSAnZWagAAlY0P/jLlTK65HZAY9zjVv07g\nMTXAe0QUN1+0th6GiHRxmFeTDaTS7XuFT8ib7B8WetpTXQPRs2PeP+7n3BGL\ngX6naBpMhDajkyln8RJBxq/+vEoR9E9aBasJQyp9WRRFd8s1NQbGc/LkVf5F\nlAAH7VHarsSFeR8cCYEUdUCEbTTM/NiQcs4bEYyrRFuAFFVDeJl3udt0xQg0\nhVODdQ97uZvRW9u7b1a+7BXyBG8kwers9zht+NvB9LaeXCXFudBW5AISULQm\n75tHs6t5XKDVbOxrsYg34ve1B7HXZ6y8e8lNOg5VNhdLroEA10L/j5J/UPWL\nyAuApjVR/Ka82hT3xyFv/cPZ2jXZhn3KLt0BQcqf1g0ydm6wMpZa5Y/dgYHJ\nFh/38mScY6uSb8FeCUB1v/XQPAm1EVB+frxflSp5YmxFm7kRrQd0zGH+br9R\nN59LbQ85A7A2i8j0wt/ulSKCaqG4CG+65/rgNNfIpMVPybrC/R4Y4F6boz+B\nGuhyk9DAYjRAZzSTya+rYF4opouGmlPwM2e1nwdiB9svexHc/A9haF3SxSib\nWhUyE/hyPS/0pF6MXN689ZfbofiVEaSljXEjdPSgnaQ4TVVyNITfo+zPSGKe\nZWESgsgeVZZUNMsrxKtZYMn+9k1AUOnNm4Pa/+Iz4XpyQPxuj//aW3TAdpY1\nWMME\r\n=W7Hi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICcoNGn4rP8q9eEpYjnr1XHXQKTHEkeDQt4fbsFp4s2YAiEAvInYu/GCVVRqLBqSl+QTyVqx60irDODWeaCUZypY6nM="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190404_1554361576373_0.9108898468706557"},"_hasShrinkwrap":false},"0.13.0-nightly.20190405":{"name":"brs","version":"0.13.0-nightly.20190405","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190405","dist":{"shasum":"fd250167fd4e0f84ace273d9b61aee1365b37f47","integrity":"sha512-F5pidaV6nnEOP243dfauF5L2N8Daa4yjF1LGUDhesbz5auIChEkELRlfyFXiMn/2kXOd6cjH4opQ5LES8BDOfw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190405.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpv6OCRA9TVsSAnZWagAAAZoP/AoDCwqi9tMox/9zcEqJ\nCJfcJ0L7y/59Rf63tSnCEYMntcJYId62jTGg9NUpfgS7CHBNXLSugrCbYRXQ\nqmfsO58qmduV+T+WDBrwo+PG5GPfJ6DZCMZRAZ/JLlRns/oy3cpQgArL0r8j\nqTCbBnxaVHPEbNUTJakje5kCZ7uUkQbLmaUuVVWtu8K1x2Xv0MLG4MtZievU\n2my3YXv+Qjgf/Acmy7cwP12wb1m37AG1gg0N/kELtoRZFoJhyI23gw9MRD4y\npPtj5o8CPlCDmjSioZ9s6ma/dbkwRaIEk29GOAhN922Z/GeX7SL9KIm5I3Z4\n/IkBD71jddazTY0PE83mYXQEDnABL8Xtg+gF+uzIdmqDKTPy+EOU+jdUpVbw\n+YX+D8fTQS/UQWAAL7lsm1QFOX/WquCJpHqI24dnNfDWCmxkIx03MN1GzNfo\ntmGD5ors2zr3B/5dWq/5UAdoynTX0ZVbFGQLkHd+pFu31YyJw1ytPlbSPshf\nuXXOX3Td6Z9xHLe4C5+FWmmUKmA/GnyQj2GkotzqnqUYgVvpjlt7oucEQvpF\nZW0GMvYLwI6fx3mNSUGQyjckCG+3jsMLUCT38l+vs9LFMcxUtc5FiHEsrOJx\n5FNFIkKdNIu2KxkNiLr0LeHwT98h1rhScgaaPsdYuUb16dVs1GdHi6nu7PcA\nRglv\r\n=Ji8p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGGgwbVRoYEHc4kuUTxFLbZ1EQW6GQ6q2R0L53GbEY0rAiAdKkEWZkHuchxr2utn1x9faowrp8SalgG3vxpbkAhXzQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190405_1554448013534_0.9764181730236448"},"_hasShrinkwrap":false},"0.13.0-nightly.20190406":{"name":"brs","version":"0.13.0-nightly.20190406","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190406","dist":{"shasum":"e331291cc47fbdc7cbfb61dc835e76f06bdf3736","integrity":"sha512-mEp43hSZU+ZdZDM+QpXJEdDJHUXjVgSVRysboPtxmX9idfWsUzV/q09+H82vNdBgFgiDcNAx5v8yYvXDK7xPCQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190406.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcqE/4CRA9TVsSAnZWagAAN7UP/A8oSlkBRyUsGqWibkLR\nvyhdxEKGOPJ9OBlxfSbIni5TW7R0Qbgbp4s1KZgJG9vBit1A7IgGj2E1VCNA\nlJL7QB+qZSYjfWdbOO83z2Djzvo60sBiv3dzBwz26zs6jAECoWZtHn7h5vcv\nP9vlUYtY6qNcrXlHH8LeQxi/593aSl+fomRjUxIJZhXsl98DTUZDjr4NyO9j\nfADnyKzxMrpaDyzpUZPNKFOttdXSeXm9AQSxZXChXMcaJlFboX0iEfxiFXf5\n4d/NtUAR9P9yvRCwUwaYJCLU+lkNxpiCUFStKR5moK+GIWGhjpDHWjY6XbW7\nSJoK4CbBr4tjdZGH950o5SgRqdZ9P6ikE74Q+qduNdl1zs8xyVy9sn2zp2Rn\n5s7WXgRLvYCDYhGlzEica8JaeusuuBBGlvkVYMQcKqOCte+/prXey1saG2Yu\n5psotDTNzz6e4bMRAyX92XxqxEh/CTZTdx4fCSMOC44OzA0vRii93d9Z5srT\nwbCCuU8PIqY3kQrYtyHr1hS+/JhSyriOqriFnK6Y1gE7G/qLJZ3SG7DE/1q4\ny8/QsI3AMhq/2QkzeveS05jw5oDUC9Z7Vx81nl6CfJz+rDL1O4D2iPbn6UW7\nHaPKioNOa9cOYJCc48sevgNVAY44RhoVdG7+rxSKNyi0wnf3KmqSQ3vK+qlY\nXOH0\r\n=fYE7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKUQ9gqN0elRhc0tP3gbTfDwSAwNEsOIPN05f9aNm2yAIhAJnW5Ssn6TZ1E5czTjGb8+gGtm6UQRvJClqkpfUu4emU"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190406_1554534391439_0.49895185438943535"},"_hasShrinkwrap":false},"0.13.0-nightly.20190407":{"name":"brs","version":"0.13.0-nightly.20190407","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190407","dist":{"shasum":"bcb74e3e1414bcbc0113d351996ae2550c9decb9","integrity":"sha512-CnhQfnvUuRUQrfnjC++v9zEABf8xOKt5SvVkWyQSjerwtJTNVo8ElYEjvft/2aeMct/wo2vBxp0f9WbIktPGGA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190407.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcqaFqCRA9TVsSAnZWagAA5VkP/3CDgoBadebiu/jjhpEU\nR0uZACXrWCr9nmeCYXDnskXjcJTXIARuY9SXL5fEL9TX+VLxRi1K4DI8Qk4N\nNFFNf/2b0l3lY0vFnlew+F8u8+5EB8jfS7Sw0yqmdfMVu4For6wH3Lbzawxv\nkn9Ak3smxPPzUGvj9W3EE6BMFiXlQDuh29LcgyGzXCqpNqMhLyQJN8RsNo5y\n3xKK/V3I9Dwb+zBCX56D60Dgq7nOwJn83hbf94csVuDkbqAlHSxFDSfxsy1T\nM/cg5wrCSeT7QNoBPnRaiFbimaJg1VKOoT+1nXZVEuLWsAGYalkv8adOZ2bn\n9YlbimEOYS0I6oSXnQYBnTLmk+53oIAb91bKB1sVKLQ3VfVuVwm3hXyw+7XO\no2oUQiTLla/6ZCx4YYXpwPisGPcO2yDeyuwny+IeH9k50mrJ1aCGfZJEPcdH\n+yqKSWRKnv5DLxaPaBlf7fjvJa9YkOCUJ3p1rTah0kFi6wF8MIjN4oxu3Ou/\n+YjEF26hAywE0nVnsZtUftTIawewIWRerTdJO1CG6QISFFpBwqdAPgzuu5m0\nyKU0rWMr4qSvkPZuoNpkmghDczDq7Hd2lyZr8uEzQ3QKmL0IpPXZjM+GTVfb\nIN5Q+ahE866FygOCzBgkgY1LMp/EA1z2Nx0wFeI3xwW6Ns0x0s/iT6WKKjmf\nFa0T\r\n=yg4N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCSMwLOdpWM4rqXvHOsqXqh7N0of/Khk0dl5WdWS5Ru+gIhAOeelmbvLeSKE9kbJoEwUHiP0n4TWjGpFfZhHkIgWhvr"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190407_1554620777347_0.8740197011657607"},"_hasShrinkwrap":false},"0.13.0-nightly.20190408":{"name":"brs","version":"0.13.0-nightly.20190408","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190408","dist":{"shasum":"10467d5f812fb6df5ae2584aab86805c0befd345","integrity":"sha512-NteYgr3RWvzZDXMiN//hl0l9rPwd1mBXVeuKcQDQTK89pg0+3Dm1RG3o5YGkJJXY8BTiKjpgnVmFfsdf6tBTCQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190408.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcqvLyCRA9TVsSAnZWagAA/KkQAJWY1/AKA42EHgRh6amS\nykpN+lMjIzCxiBMbj9DXZzobMx4NlQR1J+KMyXQMB6m73/vuLQrSlpWb/OyV\nd5Cgw7ycBtFjHKOaHxPvRR45IVVTlyh6kIHNWUme304zWAj6Rgr2JwQnilEc\naCDwaiy5YYk6/8M0wq8FHWrMwzcF+kraI3J+3InA+ndr84bqNRPozriEv42X\n3Wx0qecIvybRV3pxgxzvYqEfdt+PJBOhGJ6CsxsX4ackeliDmtkCzjrqNgm1\nSm6sXUq32fkDOHguxVM/usuYLSDBVV/PKUiQszBVGPa+FtBJigrFUTSZ8or7\nUE5j+Po6/s+1W7VZNABroNVPH6n879vL8v8pYW3nL5dJUMOWTWWikC8WkYb6\nYIDm0jVhKNXSEon04v+pk0R6m/CQIyus1B2Ww6LO1HgexJ2oOAg9H9pr9oui\nvfdLqss3L+F2O0DhhuOfGFv89lwfnKEr9WKA/N3laLBStTmbVSndU34uSe8f\nrXeJjnKj0D1qeDYr9PHSXlMVgVaHFpZ0pBovrJrSygCnUB9dxDFj58jBB6bG\nXRMfsVp8QidSPXRXDBvJ9cnpZXmSf4C6u4ZPvZAjjw0bh6re/eBtbPBnxkhK\neInZ6wBoVNPut0pi1y49lfKd33d5flGIQ77dPrqQ8kVc6K/ZR9qwBtP/Og++\nJE04\r\n=LRbS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF135riLe9tIM9W52uccFW4RAlTOymxDymC/z4Y9df5FAiAA9krf65j1AmOzjTQ8uXTZ1Gk0CJjTB/HDiBViwXr+mw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190408_1554707185097_0.9754672480769402"},"_hasShrinkwrap":false},"0.13.0-nightly.20190409":{"name":"brs","version":"0.13.0-nightly.20190409","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190409","dist":{"shasum":"ed852fa6fa07493aed314ad053cf6de619c9ad9f","integrity":"sha512-ndTi4uGylPRbiBJnJZj9ptogycCysQtTS3Sk4uEfX2aOCYYAN+l5Szy30SKKMHYdHofovTyF5VD3yLkVk2m6pA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190409.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrERiCRA9TVsSAnZWagAAfhAQAIOSv40hRctHVhpeDAOx\njNqttnyLlZDHWYXhc0/o8nsIPokJ1YU+Yok2aQXUGUcnm8hU6mC3tLdNP1jD\nIi+q+ofHg2czHRbzO+9YFgbXOodsKemuj7d6spGHwuhl/gha34oABJ1Xi6as\nrQtVBpquPAMzkj6Iz04eRp/v98kE/bfA+l6Al36ptoctgphJ7dJKz8MlIzxk\nds3+giLXvs02DqOZVNhkYl2pifihUndUxnWpB/04G4cbdWyDZJIwwByHVPsM\nLq5h0ZRfRpGrc7QDnVRPB00KYujEs5LrbYXGw1XIUGtcbzIVQeNzbMJBQ6Ip\nk9HBdvCoG48pO0Dfinft92tP6nvQsX6IP4+xrSKRFFRsmy0sIzfTP53hq389\nWldKzwX4gBO6SqG/gAzemiIM9im3Y+55bCle3j3fkvD8BlRHenr92BeqR20O\nMVbgOosI69pnk8MIn84nB+C8+4nhHX7CARqaepQ0gGIEhwgMg6HfX4coQ09D\nFVB0C5h0auaTeYlY9oEI5jQHOm03TTXSOUNFCmimlm9G9+O3SHSYzn4G9Q5H\nF8F1Km2xMi7TrIlVkJ7YjDWkPOIYW4USy5NZcAmQjcIKIFBJP8eJfGGnReNq\nnMyHgnWTFJLtkG4aD8O+ZOupdLxyaq3mmlPZqZ8TZ9ccZSiqqz5pY1So6hXM\nEvvm\r\n=Fz5M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOgpFks4jMUnDLSef+lnSgEUn2To5FH86//lcdH48n4QIgLXJHR5Tusg/gh/PlA4vm0f2O8Tty6CXalbQ+/nraTEs="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190409_1554793569676_0.8532123482036564"},"_hasShrinkwrap":false},"0.13.0-nightly.20190411":{"name":"brs","version":"0.13.0-nightly.20190411","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190411","dist":{"shasum":"cf9a2bf6ce9df4290af30ce0cde1876542afb9f7","integrity":"sha512-Y9sEVAUcOnkplGd2vvxRY2lFG1rWo56U0mxLM9zDzGflH8A2TznrzSbBgjUaX8CShx7gw9XAKfMAmtRraXNWNQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190411.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrud1CRA9TVsSAnZWagAAsbAP/iIRxWNpPIORsnGhUsPB\n40JTZ6pFnbEuU3Kh8VYVIe/otL5iopNxrnJxTaRGHJWCYXotNdlji2qYVaeY\nlf1iezkTQr7fHur6zqENozOsZKpEi9magnGsjf16H/odV8OpYnYn1SdPRd+1\n1TJpEtLsH/e775dV162Xtv+zDG48Q8QJq7TU1DFPChyDgV86HfyGcTZRPRgx\n9WgvxSZGzpCf3ahdq8C3SeOtxVeH6xpoaGGbfsZNF6SlkKL4oouvYP/zuFFe\n5aLbLFjiJ/CF8uTOszQ4cpjb98bURmuTPhu9yVwkDf6QyrjKOyoQoutPNrZM\n0oMLRfcK6wCOUXuYUmVCa5np0NRagpu98LckCOCEIf15kJPmXG4xIsc5ZWtL\nDiaKqDv20wtzrjMnBt4ho5LJPA7yeWVN3Amsi1zUE0T6GS3BVxD6JM8UfM8K\ny68daeLWOru8v68w3h6Masy3v+0zyC2iPagydDmUXCaU2mPwt+jr9qaTOdb+\nO5d9rlJnOtYyi9gtNBUkQZxmATprURvJstmctRVWBEdPsdgS3eYsIn37LsZ4\nIh3HmM81TZtQax7YRP/hqTuTjvspte8vk5lZ/iR6t5JNznQGQQuACVsfUbq4\nPKfSiNZHZKElpdIxUXmz3QHpaHJ99v+ERg6OIHimfFPspTLY5FfPH0AO/D+0\nCk7V\r\n=w2Dc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuHOI7yyFtSigWy8vtDQlVrvMHUUD7fAiRaaazNlSxfwIhAKIdP4iGoUAr5pWtPoW9r7AWzun+Zc3pXzDIWP3qWDrf"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190411_1554966388217_0.8922522870699365"},"_hasShrinkwrap":false},"0.13.0-nightly.20190412":{"name":"brs","version":"0.13.0-nightly.20190412","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190412","dist":{"shasum":"8cf3e4e142a17b3e7922f05504dd92a7baebde42","integrity":"sha512-8W5mEFXPu7TwDXCT+UYd80MFyFNZC1ahMXlNsVMxci/q24evG+ZPjDGgn3iEZzvRxDnmzPykjZfhLLLitAWDpw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190412.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcsDkOCRA9TVsSAnZWagAAVkgP/0t5Rb4sDgB9TLqHrq/x\nvZ413xv6Gdkk18DNKr55dfJ8Eesa1uGvKVajblfDxIPwlPNNnVOy4g0m9Lug\nIheMIpAetylB42DgdsDSSlzdSAMNWYiV+rFKX0oGfvrDEV3UzDKQbwDgpokT\nH8JbOw09jO26VwCCtANuimGA+wrAy2dPNNUt+QGZjrB9QI1EloazxnNimqV4\nfsce6cbl31j6Hv5r7jK0kwUcuYm/OZM7N79Iif0prnWEgYkZy1Pehe0YdvFj\nYB8LJesoWZJZR3ckjn6sAyhwaEhQm9WDtPCS3y/ApKdv9fKO6vUERit01g0+\nPzU59YBRDYh0FrA9fHvicfv6rVrofgGAFBaKakPC32Gxl/AZKnk3fEDdUiPY\nrXgGQw559wbAllfUAc73WFqz7nrNWf9ZZVf1HWNSdwO9Bbaj+7rzP/rH045q\n2yvzrgvEbD5BEcg9JYNzMo2P6xDIaYnFJyuDe3OFhLQox7W3oMWCiyUZZ7WH\nHIG/w71yAt5uwyq3sD7M1f+1nwXtmApCwkfV9n1tUEboLyarSWkgouREe6ig\nPtBmVt59N8nW9Bubeyssq36T2OnNeQZdQfmk/9RORJln34rh+8eZOq5SjGkP\n7fSYQIceKlPDkICzerlgH8ssXWIjhEQKpGIHpNJNwX6yeRETjfyrp9Rbwk/H\neNcl\r\n=5XXa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4sIEN3sdqKpbHNfwb7zdQUaCZCr4oeUnr6UCZepThQQIgbBOcCuHRtPDDu0J1aTdhI0zxZFXrXQ8c3TIVx2YZa48="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190412_1555052806580_0.8141781296917099"},"_hasShrinkwrap":false},"0.13.0-nightly.20190413":{"name":"brs","version":"0.13.0-nightly.20190413","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190413","dist":{"shasum":"e3197af98222b60f3c25bc35ef8e54ac7c189e5e","integrity":"sha512-zckZ3jNCSgbvP6a8pw0/ThqA3LwlprR4JlkXlnpEN//8g6zhToAGx8vDoC4e0unMDyOiefqjX6Cnc6Qo/4jJwQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190413.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcsYpnCRA9TVsSAnZWagAA5qYQAIPGfpygq+0Y0uT6uft5\n9Zd2zj52G2yw0HY0BbJMQkTPi4dMCWnx0rFMe5gbhpfBozUI3+FbapjoiDiX\n366uK38n98aDOEbEy/+I1FbYbSuYLJgGq5mx13aXJFRGbO+/TLOapfwlFF1s\nGTI/NVFb8XBLEwW72i4gbI18eiiWghBY/wUiNXDYRoegy7g75HCgHZYuCfdD\nNftsRgIfQ5+U2Oyk7klRMb8VMR0Jx9MRYGX1gCvPUoFA+rXgVWxgiOq/tuPo\n9xUR3jpeyAydsLdz+oQ8bOQcBcabal7AmJ+qGUho/KPUR1mPTU9L2mi4yvpm\n3ilt5HhoUv1kBO11s4Fi166xyzDbAxtcfCo/SBb58i68Y0jSdoyNnje/cV0Q\nfLlIomkj/mY86qfqxfkBzi4OcV2WIm6YHTBc2F7fsbhxIKd0dC20zssfPfSd\n+wD+tnnKvMG8Kxa0US75/FHNn+AgTxcIZ/PSJhmIWUiUXLrm3jml4YWe1He1\njOhDCrOoJZSeosOYoP9zq7rdDCD4y3lF5bzkdiz6hNepUfT8ziHGsyG6sPi4\n1cPP4cdDneCruWYFancgolJ4f5aYwGX00W9GS8hbLnwvcqiXcD28jTt8YwGt\nkDn/C4/kUw4Cc6xIRpS/STSDNve1Y0RDCVCX4p9Gn5E0pcX687yPL/X3wTSE\nyRva\r\n=/MWx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDbPVFRtYOfKshqFgA3u2KjPedqE0n/1e8WRfmQxU8IPwIgJg7b9MYM4eDypadeaDUggVmRPtFR5gOulrzzewvvvqY="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190413_1555139174887_0.6806053748086167"},"_hasShrinkwrap":false},"0.13.0-nightly.20190414":{"name":"brs","version":"0.13.0-nightly.20190414","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190414","dist":{"shasum":"212e1ede66187ba978dbce43bcedc1fed239a1ea","integrity":"sha512-mtr4jf5aEoDsNXipiwuaOj3pZDdusK4cQVUMDZhjNKSGKzq0WJNmsiM3Tc1S09l0Ts2lA303zUIiHNwCrpyTJw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190414.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcstxQCRA9TVsSAnZWagAA0wwP/2lo7+T6YikztAzTEMDM\njhn8roOl5xA7v1UZio2VQq9UKvpzvaMp0eQtfJCixT285/aBckvCafBVEvZN\nOvStY1Zzc2izbGK5YtVAIwXAiVqS9Y936UPVNx8OoZAN57wJlp9oLFj7xixD\nnvRh9WAoduWe998xrDaLxzJ/nnZQYNC58t4srcInfgBGjOAcvD+SbHWZ6F3O\nlwNnRNqhokwOpAHlDvfnBP1zU0cD3wlVcZLbcsw7pnipZ0qcBFibXOXLbh4D\nSXOSTrWVtq9ZYd6NnPsfzeW8TLpfJ+zTxbhx1qKWf8h1Pose2JaiTJoIYBeU\nOlXQqFWj6DLUp1/AO9+wGs7Q6hMOpt+hpEYt2Glrfd8G7m0ZEemCuuG28Pod\nKkDYPcxIIxMNcAL1Zc25tgNsjLh75UzDacU7DbQbTuuNCBljxg6WcJluIHjB\nwE5oFCDz3iIMdfI6EK1ved1TI6HlxinklCkJMvOH61E3GyEWj/kb1EjIGDs8\n3vOIcH1f7R100bIc0Pg3vANGE6QlarRfQyHBSi0LfpKlhIiR4JuoZgkRjOWg\nNQbOIRO0V0bH3MOEuk2F6AdrZAdY2fqeTlzgs4MUSSgQ3nqdz/XDBeE45rNJ\nEeMKrI6d9fcrlQPVRDPj9z3nqqBjq52L1xccPZExqpzXXj89t+NHMlCPbX3u\neX7a\r\n=7QAE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhMkrYQST1JgAhIpiM3gkNBfs6OZwDsrMyNCNOvhUNFwIhAL/CAzl5hcZsslFxkAU1Xz7IBZts/narAekSgW+LiaBb"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190414_1555225679727_0.4124594645201247"},"_hasShrinkwrap":false},"0.13.0-nightly.20190415":{"name":"brs","version":"0.13.0-nightly.20190415","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190415","dist":{"shasum":"f59b56034b32f4cba0f2b40a92b7c91e14bc3708","integrity":"sha512-01ke86URhLbZjFzykSYykm6a0GAqYI8qd62LwUoTnFUvhK4zkeHJl/jUgFTGto065eglwUyqFh57o7IoV6b34A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190415.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctC2CCRA9TVsSAnZWagAAJdgP+QGkpatPnAqE7+/KtMF2\n3x5/j9JYmH3V+SWZrYVpy6JH70KP/Quj3dnjGuwpKW0xD/ye6Mu3OBYmyOC2\nCtZt4XcoIYXQ7L0NX020MlTJ1YK5OY91hXjjr0e2xhPhzcxqqtzN10/3P9Uu\nmjHHWkMbfXk8/v2dKZ85mrlCwOVd64oZk9PA1UEEBuWHUx63OuB3vssZNeJL\nACQ9U4oWSQlOK+av8jf10XyuQsQzRFWhZVMuBsYVO5B5o3I3J9KzYIhehiQ1\nHdw8qNUq6GdHx1YgSyTx1CA5oQy+9uPXhJnA1LtQ3N4MtTWbSM2gS2iy8IZM\nU4nDja6CD94H+/deO8xMdRxBhwhmXC+Hm93WkDsiCYvvcIe9uaKYIcRm9Ho+\nYAqnfmGIsbvxSJR9Ykdr3N1/L8ZxgGVqv6cEuGYGetPovzTJcrDeZtXTSgqr\nYLCTdvuza5lGTrdI5Ldick5r3cbtOJzAtZvWLuZ1ZnOBFHnxR9qNkOZSySaN\n5qtXv9Ob1mufU0QEcAqoEQQQ2wp+gaGnvohcQ7PoYnPwIGCF1tjtNOg6ocQH\n3hMF/2UcbpIpKTGmhj/aTG6uAgA4kQfrYkW7RIj0SheqX96xZUZtzOY7Psdq\ntGKw6V8Rwbo7AspeJgPV7frMd2xz5W+FGzgqc/GiurV64dlqSzNKXoHocAs5\nLO6k\r\n=WMyK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvL7mZwSgpn1ZkCIk1ePsBcOeRxp8Eosm++QPye8odzwIgcPuOkYnEp7Xq8l2OWhz+PGEYcetbbZBOnmktT6QP3rU="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190415_1555312001692_0.41742750050516797"},"_hasShrinkwrap":false},"0.13.0-nightly.20190416":{"name":"brs","version":"0.13.0-nightly.20190416","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190416","dist":{"shasum":"22c625cc7ff8b9f0ba29c5f7ea6f6fc3c4a5d1e8","integrity":"sha512-atMGS4RJZ0tPXNqtmuV1Dt+5wIJN8rrd5i62K3OPJA6u5/eq1Qg4avy/+6wKFIhyKHjYqR9g/L7GsocBGG4tnQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190416.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctX7qCRA9TVsSAnZWagAA6k0P/3FHqo7NWWtFOHcq2ZEx\n1/DHYrnaQKKaSwXnjB8RW6fwD8IKfrzEASfUi79IH12yqockVbullO/MeBre\n2NwYb4nQTKTpJny3XAsRmOCs8YUY9ndB2InOH2xGv0y0+TiEE8OAJdYRsLp0\ni4KO6bVDgxHiSVArAwoMtuxqOatXAkCb+Q3lSbgR4ikKJJC5oEvZZX9ExE3M\nQcE0Q5lInRKPUZ3S0yKVgOLJxgAa7XWlxJvxJmd05MPR5ei9Flui2uRO4/0s\nXPf90QaelF243E6vgIuQPdv9GMWT9cs17UObLaSA4R/FL4+n3GEbPswdc8Iy\nokmnl9zz2c4nMoCr8S/H2sAs7011lo3lFaK28cMkb4xkF3mqGkTlaNSby7d8\nLswyPiKCatYxlm5708UU+1c9nrTqDez4AuvnLduNKoaaFV5fsT0ORGAQBMx5\nis4FkQx9VV1XxoDep1EzfVIlLtseYcTCBog7xx/y6MsskcLTA2FX928MDB+v\nXMwGVMqsH3ZbKjmC5WExHuKJy7BRefNGdRZqlnFl/lJ89IL0PzBY1Hi06x/T\n8bD93iyWhPDiG4z5NAuyl8zt4/s5AEtMehOvVsbBZLn0exSCk/2mPwndZaQd\ni8npw2DMD+qPFz4Po0A09/mv8F8c7yGn2MAqV74T/VUUkxeUO0Hi6lTrkecR\nN0bo\r\n=rxt5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFMPki2N6riVhfuVz83D2hs+5mg3bMl3upSNtdbL48TgAiADJxOONxNQb7KfWIbs/NavwzCRqMK0avvGUnHhCenptw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190416_1555398377605_0.34172087401650675"},"_hasShrinkwrap":false},"0.13.0-nightly.20190417":{"name":"brs","version":"0.13.0-nightly.20190417","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190417","dist":{"shasum":"ef7945a1d3dcc850d27e17412e8093e08f71a448","integrity":"sha512-2Dl4rjNrEpwaTWM4gKl5oJpkQKIUmFl3RLjvPUgIzKD6lvuupoZmg3nAuUQWSnDMSIouOzH96yL6GZD4Wl5HjA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190417.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcttChCRA9TVsSAnZWagAAAGUP/Am7+b5PhHfaM3UgLwN+\n1Eoh9f7ZqGauUx1uWBO9JugeRMNphB2oaeInrSa41uSPztZbbjixcoEwhGns\n0XKaUGX5ec4jZqIj7G/Bcwa8pPL+wDmSs+Mei5QYq6LImPccCoSZLT0MPOfI\nSxdSYLt1B8Tazt6yjiyBfOJytR8pbtpSPQZJ/cWy0eXAM12fkd7dJhQ/WRWb\ngyWwLVQY73xzgDiLjIrGBPgBfzE6twaErB6ieCBxsnNVHnBv69ZaY+IjkGj6\npeZUvktTJLxF0WLj4WxQ1Z0F1mmvzk6gl5WcQx0kYlKEC2qSwi6u8KLPxfXJ\nqoJML54WF4jONBIpOkrZg2Yfp1c4hHecnNQfSk2FJ2uneb24g5cpzPkYb+aY\nXjvktJJE9aNO04zoaPbKxlaSESGC+l1myQqFATg0oEFrf/gEfQJwO7oXflKB\n/fl4vmob7SXucpGNKzncg05t458gfT+OiXkHkXG1FEy9mgu+9UijOMRGpOSl\nW2aBWtmHW1u01XSUOjr/QFzOKNWPhNJQPTS3/HOR8HlQKoKt+y08YKXv7JMC\n8PqkpY2J2SGZLXwnklDASfMPfHMxE/TD/CiuDeJfH7ofq04kNMX8c9oEbdza\nVWBRWk2KHgG1ooUf0u4zct03SWPvxTKJDPhhNr3Twb67oCDwu+VU6GS1Yyhk\nob23\r\n=K7PJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDp9KMgbmcbyHG4Cl7wiqE8YKe1X2lGUzAXGs6kkxJK6AiAt9kG6IgnIy2uespUhJ67KkYNjKFIbz3mNNPvKpgoTmw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190417_1555484832970_0.5917898501105665"},"_hasShrinkwrap":false},"0.13.0-nightly.20190418":{"name":"brs","version":"0.13.0-nightly.20190418","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190418","dist":{"shasum":"7b8041f0c4cf121988ff4fb2fb3981beffbeb3c7","integrity":"sha512-rwvwxA/XNW7W9fIzFfhWEuYMNlFNYOh2hGmLvIqCkqWyHPOvXD+T2RjSXBHER1+JyAFJ4UjSc9bZcFkbvdxqxw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190418.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcuCHhCRA9TVsSAnZWagAANOkQAJd50Wg108aGTPCSbUs+\n0/GkgXFgoIZ3dX5aWOEAJoWaXJdP8z7CY70Hqnn4ml1ThILAFy/06Aw18EXl\nO8bbMLDyDAm1+nrokAfj+j08Eib/04aCQ1ps7lgR7zeWJQUAEohjGnXCHYP9\nIbtR6kiQaEWajYujjtLHbN/jM+M9tvjTE7Xx306KlBIWTbDOBaN0iyjiLRKZ\nHm3LTGLGKs0+gje9HSS5xlQ0X1OdgtSUu+/t4XT5H9qJVj//8ZJeqr8WOuYl\nOzjSuqUgicHkY5Uh15ZlxyqH5EjurndrtpID5szLbcVnzFzzPcwWin3ON8q8\nFskMr6XyUattG98N7bZcBoG1zf2HVaVNnCb1dxD8U8dvnG0VQ2PYQqgwDFZK\n8HfZti8PNH2pVJAVRKXQDIa9CKzPUAXu6B/S3pMmYkcq/coa3YukHmn4OgES\n+/AoqWc+Kxwk3ZL1e1zxdQ/WvinE+SVXHU2+F4aUuy2lnkVbghFNf/+8HVBG\n2nGl9n5Cyrzste2P7eRFkHzDthGIq5jVumI8MXP4GZ+ORxVtg9Ts8mDY3wpv\nBl5OE7AktaNridsCa2CHcsY4yDdkjejmnobO4holUzVGW/mFotyq2dY4tfBF\nvqO2jpYgQ8ecwMX7zWqzWYfQCKlexo082eFbhXZNH8gN9UnbjIzkbCmn+IHw\ngbvV\r\n=Hje9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC28VaJrgr5TFZHLWe9sqRGwWYmUtzcqwkkoP5vHUkWhAiA8QkNwnxNROwyf1EGuAlD3GYOlLYXoNPdP20QdgZB9Wg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190418_1555571169209_0.18968765026298517"},"_hasShrinkwrap":false},"0.13.0-nightly.20190419":{"name":"brs","version":"0.13.0-nightly.20190419","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190419","dist":{"shasum":"891a7a5bd08ffb8078b58d737f931598447b384a","integrity":"sha512-UG+XDhexLa0XENQclVLiRcB8wujUnDJhQtw6CfCPNi1yRQm2KEgEQlxBa1cOFjfAwJO5BVXo6n+NQeML+RrGzw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190419.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcuXN8CRA9TVsSAnZWagAAVuQP/0n5XAN2hnFuhdoBDi5o\nb/yOwRGA/tkzJXubUCwnq6FVqHeHPOZO/BJ5M8QSjodJT3o4I2iuXHBTp1+S\nVLTsbvxDXE6CZ50ViD/6qEQOlZZUftf9bEpEOZapWc/XcbCBjWDAmyJQKeA7\nkb0Ol+Am3sQ4oLhmpAsS/TlJ8LAZCGdsrfYxK6uynRGwrwlI3j+N7TvFJUcR\nlzLhDTQL4w+N/EfZMULBeMnx2g17JI6dkafRY7m8wkVACFVYhrep9wdIK280\niCNNtrcIYfH0jxGdv33HBim6OEQ3aonzkc85oaSmVa25SwVn0d3gKGbbmXDn\ntvi0yAIgGlVoxquQAuBYm/G5Ish4D+3GDe7W1paV0d/0xBJHaBDcR/JUP/DT\nj8WM+fUPNYLM69jh45f5bFilgJpi0i589KWv5+uKTsIYSeRrSKhr7Tfizpb5\nOpEQ6D2yCjWRwW/y5aU8IRGaGIRkYajXlvwM6YGs5czza7I0KWQt0I7AQoeD\n6//RZqG9nHJYGkiAzFFe1wZZmxY9MXZrEG5s1ciuVwDcY+cP5WVvVF2ocmDi\nMFbcCF2lefUiarAgkePuOCqxqolqN2KcRl+wYs/FJwDy5cmYGTtMR6qzR60B\n8aqwJ1aAAW0gxH4msKYSss2Qm45+K1tK8aQhU3DdBMbFcdRgZHRcJf2VN0MS\np5IK\r\n=2kz2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvbfbu5c/XEKozYvLR2/J+oUr0j9k8LjaUOKJUZsWX+gIhAN8culAr4C2GQCH0VI1rFTW2jXBUIGPt47xSQbvUXIxq"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190419_1555657595754_0.24369106051254552"},"_hasShrinkwrap":false},"0.13.0-nightly.20190420":{"name":"brs","version":"0.13.0-nightly.20190420","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190420","dist":{"shasum":"0ce932427047a250b00ad7d722cd05c1f411baf3","integrity":"sha512-FIRYULcP6CNLOVRMQ5w2ky5Q3eQ4285ZX+mOthEM87huq+jB9UxYLyalTcM+U6SdC70bh6hCtuKuPf0pao9XRA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190420.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcusUVCRA9TVsSAnZWagAALgIP/0cdeFX7pBPecsgahSvR\nhRRqjuE7iG6+cdrk7bg7HALiMbE/UGcvXCLJDByT5grM/DNwuUTYjEsMzf3m\nHyqTfny6DQNnqUmIagMIX94UMOY8rk4OW9j7AHiruyMJ8OMrBtKMI7zj99m6\nVRVMM0C1W8hskrtT5+4A3FOiCQM7HN1/OKSJA8UKENr0Agu9mgoV99028Dcv\nm/sp7CAWK0fKuNR01WaOjnsrDzwIRQb7naNkVxtjbx/co37uON640GUlTBuh\n8yBZX78bWIdfC0TAxu6LF3IdwBxjN9jTTu+TqkgNDkzWRmWzObAGSh8OBYxr\njIIgViHu10D3vhV5uMilICSQ4ThGyYuaXCrNEcDnaZyHggAu/RXnRqf6G/EN\nyL6j2AHOdtnxa51GhLI2ai5lzQ0XveSW35ISmHRytco8o6KHZwFZ0022F8X8\nKeJ12UkV6t7Ff06+sMqdhzcA8rX1WBgEYbrNCq/MaleZ7YOawiAri1KDaEi7\nKjYdzmftBXKQRSWcwWS9Q3538eqiYqpNq7+NJzsF1aqAqrpm0/nvGFOBTRGB\n6TYcO2cHjvAb8KV/kMjwwO3Si5Kfu8E7OkZG0gJI7yuEkp7EVVkp7ESuSRgE\nK5Ge1uOQJxhsenG/eOtmy9yAipGFLcXO6834pHv0WkfJ4IJQwpyw0c0qRMSd\nf6L8\r\n=8URv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID6WEBR3SmVqJn6l9OJaoqeJF5ud5tWQcGkJYPlm84AJAiEArb98oTHpP5tq3OQYOfyrqjDYXIW9ep8J/MaCyAdKAuQ="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190420_1555744020643_0.9061774383076429"},"_hasShrinkwrap":false},"0.13.0-nightly.20190421":{"name":"brs","version":"0.13.0-nightly.20190421","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190421","dist":{"shasum":"33984aa3f346972aa4e41c0940b010112591487d","integrity":"sha512-Zsy8LzHsdr6TpaFQDaqt32LVEY+Tw3/lYoKjfsJiNz6Q4HtjiHeytCUIOJLNedGZj+g5C18J7gkKN+wgzz8iDg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190421.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcvBaPCRA9TVsSAnZWagAAjjkP/RLF81mzgNKKLnM8jLYo\n6bLA1k/TlWG6n/xbuajhKuu/grOhU4oSIllVDTzTlXRAjexrcOZeMJRrVLNz\n5CEcc8dVr4pYSFhbA+B/D4sMX91MSD/GuXHN9vsV13DzZFd25z3MOAjylyjK\nMCTJjI+ToD4/vw7/Yu5cDi7xw0SDa2QGGHqO68f+42h1GNwAjJ4DkrRw2XRw\n+4/9RUIKq9kIpsZbx1KfEdKrztHchjpFnoLVFqfC1cYy90b0YToLRqL6euLC\n+IEAU8ah6p8R5HAP/HLAsAOlRAtkFJI0sY2aRbf11MxS+i246rxvMgzN4D3u\nae/ugEDD9FTZTOQGSU3Ph6JfKDzAMenZX3dcap/4wJT09Tji/3mRSpPHwKSe\nr47BxC8l4trCQmqBO7JLFnxTTaTow1ed2aGVgDk4R9KrCK8vglzd4HRTVt2H\nHUbGq72eI3Wk7VRczpp0X7QThg2JuVli62Bq9wydrSr918uDai0NP+I36UAT\n6UXp48dBahwlhf+I8jcVzBgC1cnRTmHogXPRYYjqO7YvZNytPt450iQt8ZtZ\npGvpfC4F1I3vpn7Ez4GWRwI2ZloHHsX0YjFqOCVHQ3qsNITNJv4nzgPqrB/N\nO3788IDQbBVpE+BPKw6GwvDm8fqavhgBZZVEtKpFqBCHiLQtLNU/qMpsGA9y\nd8/h\r\n=1CoP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDaNhVd/KaxzwtMvq411kpqFlc8y/+gCQo+7lL3X2EIvAiBV9/3WtKvjIDfXTYUNqNytuBRAZOMDG18OK0KV0jR8sg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190421_1555830414420_0.9412022186836273"},"_hasShrinkwrap":false},"0.13.0-nightly.20190422":{"name":"brs","version":"0.13.0-nightly.20190422","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190422","dist":{"shasum":"2c388749771c8b91d0c95ee3425f40275c2fe5a0","integrity":"sha512-hIudM6DpikolH2xDMgNNzRY/8fEVPHCH5XIwY2HLmffIAdfNZ1rCLF5jmw3UEY2lglOBBliqOok8Oe8MW0ipyQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190422.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcvWgzCRA9TVsSAnZWagAAYlIP/0aItYE2q7OzqJImtKji\nbECdNnV7Qzi8ZdnRK3RYwOSTIjJ0iLCq2mEt4FsHhegnwN2PRlhU+6G7BP3w\nSlotG8KA1/sdAJWSUVSF7SweqlrQTImmsttrxinlRcnFNIuaEsJBrZWTZ4qZ\nBs2DwjvmScE5iLiFH65gQi5M4wquHHAqF0OCamf9pJFqHmbtXYXCpPp86tTp\n8dJ4Y/ZGnHzGb2xRhX6YjtcSQf3DBs0Jy4g+rVzfGs3R0TbsUlRJ2SIpBbSH\nYcHQMNRment3NbEo8DA+CpMuA6tUX/oci8SN09H6iOL+tXH7LSD+FbU98Sh1\n1jdI7jIWKNcwDGWyeivLvIVzpIAQhk7G0dLFLT0DyURzeVwIaTjLvEEltCOk\ntmp4w3kAXZf/3cJpjaxfFBuobLWddBeDdNUvBfPW8JFz35yq+O4HMbaBNfUt\nu0lzEirqpGp10t2qFvcnefRNuCsKz0xP4Q9c2B0QMtX0pZp0ZF4eUGbCYZTs\nx+MUxMIs+NBr/jAE1KUTs05IZVGd//N7l6K98L7BxEw4XtYHir9WOs2kpyB7\nkfV9tCegEKw7Qh7fWj98ybAlXyNxCI44tdIRUtFBtCFU9+RcOcdkzYHNawE5\nXGn5gQYnRIU8M3gmz/6mwovDBLx+dZboA4W1NwC1NLxcsyTS9iDAPIUIfSgK\nTh0t\r\n=+fDY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdjDXhKzXlL9cVKB59tk4enI1pTMpzRMQk9YCI9TpgdwIgWkPWx4cEZr6fKcessagH6St9yije0vVfP4FT/xNR1Bs="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190422_1555916850966_0.5469923805797408"},"_hasShrinkwrap":false},"0.13.0-nightly.20190423":{"name":"brs","version":"0.13.0-nightly.20190423","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190423","dist":{"shasum":"22817111fcd20b16cbabb5040059a7f2f12e58b2","integrity":"sha512-l0gl2DOdB/RljpzENGAL1k/DBdEoHaX0ghblxb3wT58KQmipXI4ZnXQCIEotihoe3aRNvdWxCagQ2ilLApViOQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190423.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcvrmgCRA9TVsSAnZWagAA6QgP/0unvBoF61K3ds+8VEwh\nLIZEnHpaty0psJDBWAQx8AT404I7Sdjjtsd+QXNbeMgv4LoJjQBmQOa3nv3Z\nvoWSq5VoWr4Kr+VmlHdafdl29tq377pbNZ9zdG88gMX8WOnsoEJhNZebYqRl\n1w/07PqJ9viqc+X3NsA6+kfNhElchAPWvDyeFlcfS5wb26X84Zm0x7UBSJsL\nH4oQUWMCLez3hwDmlruoQvNn2kxrqh1DQb1Jakl1xXhk+koXRp5HPl1WsFRq\nxokdn65neP+BRbq4NnZ4CRCpyFitf2TDjPxs5V0yW3pulobbDo5jzI+Kshs2\n+9wi80rg2RXQOM2mbvUAe51BMl+HoG8qXyZC8wLXM6io90mm8hgHoN52ECFc\nNSOq0qGpjYDeEg+TDkcKXc/f8B+mCAu4MgH6toxrKYKp4Sa46UwWTm8WiFzB\nLa2jd5mcNAVn3fcqPw6QX3UTAs3VLJGW04RvjKy4sJKtY7Qcwb6DiPNVjQDq\nyVv92qLIq3ZzA4gqf1zbZI4ZHWfs5mFQ60OFoB/J+3KHK5LzvcV3ZCid1GO4\nKrFdaINPPFOHt1umkVKfSiyO61rz4rFgkilPgDbNmaSHNfiJITzQG4QmdtdK\nZJj3JnBRDfjAQ+fgra5fXjMLXR87xPEzZNeq7iZt4tzZmj6NOnWH5j4SIhdE\nb7Gr\r\n=XODI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/7oqs+64Ut0o0rqu6pC9aDh+Z7amTyw+xBDE0ayHLUQIhAM9XsuZpf7Jj/2vHVxpA4bPSmBLBnHVMcC7kngQbkjHx"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190423_1556003231705_0.09637064702896248"},"_hasShrinkwrap":false},"0.13.0-nightly.20190424":{"name":"brs","version":"0.13.0-nightly.20190424","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190424","dist":{"shasum":"2fd086d63d1f09865cb54d3c45ab1564667156de","integrity":"sha512-i4xEbW7qIEFYuZj+R4vid8BTCUGK0bgYfs0wnStzuoxXmR8LRXLwiE9U1WUpIsGmMWNMoI1EjjpFf99ukhc0vg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190424.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwArrCRA9TVsSAnZWagAAS4kP/A0oxcLtfifoxyT+vQyd\nOPa7cMdXw0jl8eSMpPgUED1EfXogo4vrHsew8E9tRqlO48zVsOuz6QL3dCLS\n0MNI8JEy1dwWNj+KsM1vNSuo7cJFcTQwDJSqDa7pu3VmfRUaBuSQAslymskO\nQy/k5iQ85cet3UV+a0xa+pK8aSEbwoOfi1BCCn4crchoTmPV8guSHM5+NjS4\nrycKCxr8ahOe37DxXWKqEQRrBPWj3vXZVmlmvQMQ18WV/uMi2g/r2LSlIjbF\nuI0VK7QM6YbaKK+WO1BTL0UuaM82H9VnHawo39n0my6dNMyqmg4yHf1Rzi+7\nQdjVoNB5V3JUjxY3MZ0hn7Dnf1N+TQLqwLahWfSAbe4jyLVm9EQIGiJwyir2\nEXTG04XnW/PHIytZpTasiyKocIysysbvVcENN7LvwikdiXeEW24yBRqb/2fu\nZNibAmqihc2slLWGJ3qnLFzHvNHPerujsr6opVOyP+rDkCAADEcZWSlSbT0B\nmj9pQ6WKen4eBqAwE1xNQuYiRcTugl6ye2026aTZzDAp3QvA2/PHu2A3kCmu\nAbTY811dAjsDz7u4X7GN1RyBiRPqAAtJHZQ22Xcmz7/QajxpWbYmgvq+0NuP\nyR0peCukPQSIDFin/86zhQvHbCh4HZHayMmh52vkueC3g3n2Vp9Xhcfm+ASa\nIeL5\r\n=hSF5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBJRKEeWt/Gz5A7HglOv4TDN8Bz/D17ewBHDd8qnopchAiAkAcx2dHNUPun5av5CNGTNNhZAe6tK/ZsllPit0YXbGg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190424_1556089578141_0.957959496554031"},"_hasShrinkwrap":false},"0.13.0-nightly.20190425":{"name":"brs","version":"0.13.0-nightly.20190425","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190425","dist":{"shasum":"4f787a1757821231eb2929deff29a9f1ed296861","integrity":"sha512-9GfLEZ2wf1/YIdtdvde3hGaAEUmCxhRPDCD9gNlAp3aiXgpipIPesRtNp563ERSIUmT+9kjrLnchHadnY9wvJw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190425.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwVxyCRA9TVsSAnZWagAAG28P/3HMmP1EjjRN46bYGrcB\nKGytBfPVMbHvXGDrdoshYT6tX+nEvSqeaC7jsccnr+BesdpGbX8EXCS1DqFE\nKZ9gdt+VK9XOvEjLDdt3xDEjvU+SVg9NLCTAAfFW+QdiZQljcmNO+6+hOirU\nXnJ2cfDb3CcLrGuTYeUNln184Tv6ELfpM23AbzKlIljlZbeqGa/YcrwU3N4T\nPMUtGhuBPW4+NGMq6toOLu6Z9nwLzd5GPAIFXTPk8plyEF1wHZQtiXV2eCul\nuqBYWu38TeU9ECVtTCDp5uoI4W2iUTWdZt4gHgaeD1fSFmXRD9CO4cPoW2rO\nXQyCTQUC043rL6LKANtowLijmZkbyAEEXxDyNr874PjMQDFYuY6JvAJ1gxrl\nFS80JKZM9IYKZsh1boIq9e/PaSjjuG37KUuStsab6voEkSRiAq+158HqcaVh\nm4otb1+fpHzEuhIIQQ4bFaNXbYMJ7qgHjGUW5ZPbir9JSVgVEO2A3zvhvsgN\nJbY5gT7uNGdP4VwidKFuuWHx/51qb610BTnQWrAxRsaU1vC/+MSZLeI9G/re\nY0AOKUBTVcQTNoOvB24v7j5szbfkkk+jbUr9leNHH+S5qasD4s+yjIWXbus/\n7RNohkIFCt+vbZfYbYwcX2p4BWWm9KVDHBj1rNAyzV+bN4vjQlIRzcs6Ttvb\nNzqs\r\n=dXm/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEaFkOKDpB4NX8nl2BkDFBnj0YyGazIy8ZjYDficNScgIgWLNlWlhMwqCMdWIh8dBCW7Ksig9M9so3Ry0KdvQmjWI="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190425_1556175985807_0.8222426630918129"},"_hasShrinkwrap":false},"0.13.0-nightly.20190426":{"name":"brs","version":"0.13.0-nightly.20190426","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190426","dist":{"shasum":"b3aa46cd16f6b734ccdddaada0501736e75dd97a","integrity":"sha512-S57JHcqsF1kbvGR2PudCijiczT7NVrugDS5Guy9CTUqCQPpP+vAXzuyvktzd66M/80dBY99BfElNUEwJQjmZhg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190426.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwq3uCRA9TVsSAnZWagAAwtEP/AxVEFU7BbJv2UgPTD7P\nEm9to9hDJ//I6pjFb/qBW2jLRPU8a5DlZ/7pD7y8iT5BW5KjQP6FVw5/ZVCy\ny95Mi68E3yxcfhmbkSqlyOzV0zTlr2wxRWwlk0zvN8iGa0NyWnzGLqqC8hNY\n+fdTxYHLi14vT3R2UDueyBkQ0liqWv58CJ9LRYhWRpLWRdgl2J96u6ozfz5X\nQ9B23gdrxlyU+QOpazlwBeIgNHsEzwUZ1s2KXAycha22rsscqjJBUbM2pjxg\nMaMye8Mwdf/H1rYfdbUGj3/XSMe0O+SSHbS3kq7KF4rOYpib83c8WRRgQGDT\nY9WCkdBaNWrAd+UH/5Z4ZQZFkGWmSFet4C8O7aZnro7E1nOxVCkmvyQMv5fF\nSnHK2DP1OE6OSqZ2CZGHAaL4dYLIJpHr077vXXlofCLgGHNHwO27qqC8dRAh\nPR+xXaeZIJeZaEu14qR5LVgyM/+LGWA0ygqZ4jXeTLgg3xu4dO02+BuFo23F\n+TC2H7jTOt/5rlbaD4aO7kcmX2E07F3C57yMImqqng6Rdh9hpQ9w2SKzx/VK\nd7NIYY2RDH/Sv9ePKdW86dWV7IMxMqCKibRLUMhrAs3RyquuU1iFQAUo6l8P\nQiEigNx2wuXuY2Y2KfxvbPlq9pVdhMHH6r8wuquhI1ETZ/B1KYXn003Z1Y2f\neELE\r\n=S/sW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID/XmoTdhoLtziGFIFba906CpP9V6iPS3/wCJBfTAIrFAiAoNtQKQFD7+YN1KBjxMNMD7qvE6iEGT7mzzz+tt/IW2Q=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190426_1556262381775_0.4169481467798144"},"_hasShrinkwrap":false},"0.13.0-nightly.20190427":{"name":"brs","version":"0.13.0-nightly.20190427","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190427","dist":{"shasum":"fdc9b219fc71eba8176eb78ef2cd9ccc7557724d","integrity":"sha512-WVEctoqDQJ265KS3gIWNZqojFDlFmODJ1LKatYqda45K0cvDk/o6k/p7NBjNzwApcVTzjfMiSa5NDuiiWSkZBw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190427.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcw/96CRA9TVsSAnZWagAAJ+IQAIXXr+im/gx5qI2RWCqc\ncyUDUB7+qW7Is7FrICn/iDQTxer4yt8TdKcSi3U7DN9IBte4U2L0VTecTik8\nCvl4VPo9flFTc9Dmm5sz7OH0Lt+QFJcIqZD1fsPKR3Md0MyJcDkTz3Xmqyt3\n2ajcgWW0jfxyzlbZTRjz5kstTpplP2M/Sn5B8kK/UyTwwflcT2jxJN70YqLd\nUuABmkUafEleTiW4k4jPExnYRdqOxrbuiQ0/zOHwPh2nQr7JucLlru9kN183\n6oPvUp4KXBdMiGUgBWQCxwl2qVyhGrz8TscQPfaKS2TAB0Dq6z3l8fWnVktC\n15O3wFccwWatFAmFKmEQ36/5ngUju23Iazp6GMX6R2uvnxKs+3EtGL8p7eL/\n8FnvPPicY5mHt7X20ThpcN5Fwxs+Xzd4+V0M8LBM6Hh0STXWs7p7fIzsxVp7\nzWhQ7pRTcwemYW7o8eCP48fBXs5oOMtWVIPVKAMLPXG+GpygwEfiKcCSHoWZ\nW9yDv+K5CuGRnnrhsy4TFzlxRnq6ipLXWiVBetBI4MJRiDKyIuT46f4kylxo\nW0E8B+VZcdn7MKZLffSWdrwUHWr16MBgvAbf2Z9Up4zy3BLkUavpqnbif8Q3\nCwj/WEG/xa90k0TMwslbw6rpqQwMbpTR0Ppy7sFsjWhfGpp6oJWPp4pi3VfL\n6mf9\r\n=9MZM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGTJhDVTCp3AJhswmz9i7VLFF9KLOo4o6YWa+15BiJs6AiEA/Pb06smnCd/r+zjCZEWCGYQJzHWIWeasaQPFRSx8qaQ="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190427_1556348793265_0.9654207366850454"},"_hasShrinkwrap":false},"0.13.0-nightly.20190428":{"name":"brs","version":"0.13.0-nightly.20190428","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190428","dist":{"shasum":"f6c571fd3463315daaef3936608f8fbdb6140516","integrity":"sha512-qBSnrBwvAWRGZpISU0PsfEBw2cFv6PdOkrVbMPMK/aPYiG30yR3IlZvu7lMhwUqY8JwxZwLBBNBw+GSew8/Htg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190428.tgz","fileCount":114,"unpackedSize":630805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcxVENCRA9TVsSAnZWagAAQPkQAIg9+hIDwfmAySlL96Vi\nWhz05D/cFY7A69kiQNKgf1nZSE/I5N3jiJcJJAvummRlXQcf3SxBrcFscXsG\nPyNYm4JcMsn0qkivld/lxFqJ93qkeD82nUFSpK6hVRAz9na6VXwmmg26gDgt\nsFlPmRiauFzAbLnHi5GbhfEiURd/ArLirRqRtrs2ZNMvXJ0jL1XSBASnS4vR\nnDq+ITO9mfQTK+5cfcJaM6f2JJS2VHbggRgZpGamuN/T56cnRs08kXVh6iNP\nueWAPYaVlSer9dxRmYO0CLEzFYwfQltcoh/FBOxaQ5dW+OF4c4Qf9pemrvbY\nvl3GYX2RE/N1YocyVMyOcXBrcZ2pbM62y6x3JePs6ODOVN3jcWVLPZvZVJyR\nAkJPKc9EiwI+ulrbOkKPLCol/RqY+wV0DBoKuAuxNEgpCNtPS7WIsYnde/7K\nobkk8B3N8mbwFD1uXlkxxdZC3UPNzp/TIYHnN0ABf2Mmn50j3qKcZAO1iy3f\nrqRWUOpantEayu9zQJgKOTMhSjSycDF/9F6/W0ATgevt64/UYr2Of8Nv5C2/\nhv/0gna50FgSbV7GYWxhuRF1HaL54WpoGkb6ApLbDxbxTyF4h8h5YOavo8hO\nZzhuDfL5Zm/HW0Lhjce69M5tsy9AwAoVY/6WJ9+o2gMI8AdCt3pdegXazKl5\nu801\r\n=FtzM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClSKULqqAs+tkR7VYaFNAKfj8puBhmAUxMxKrYm0/1ygIhAKuwO1eGHWY+2ZP7p9W6RFQuyRaOnYmIp/PD4BjbC2De"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190428_1556435212690_0.10759437702611607"},"_hasShrinkwrap":false},"0.13.0-nightly.20190429":{"name":"brs","version":"0.13.0-nightly.20190429","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190429","dist":{"shasum":"fbbe1efef8acbd7b3425fb35acb3c8597a60f1e8","integrity":"sha512-Dq9DjInhpSushPOlQu6EBo6YuAN5yR7GqeDKg5XSvTVuSJQR494T0uK+vjluINwztgmLeiUx70JQnlyaEAvLhA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190429.tgz","fileCount":114,"unpackedSize":638462,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcxqJ6CRA9TVsSAnZWagAAsMcP/jKWVl+waUQoPAeteuZU\nsguFYq/U+UJbraqeGHCup/eC/IfDRQK7trxK2nO33RpcstJOP+bCl+GhwF3i\nN7A1z3ANwe/IvQmVoSprsdSM573OYM7b0HhU06lbubhbjbE4ZJQHsyNQUg+j\nMWRE0CSLq9ERpKb7CgfBlYS6DdheAPKI7j6Ehc9CmCSmeJ6HR0JnAYaBpo+V\nff8ulUG5uV3YSMq4OJYy6elj55KWaEx0T/4uov4QN7K9UDdr/6EfPYveknNQ\nPKx4bTUQB+53nn/3Oidf9z6oLgkqcc2euuswZHx9YZ7djX+CQ6/Svl4DgWru\nlLsyARpe9znMuwDVjYN2kvLG+MRO3ualgoMG1zdHmhMB7wYQliDPzRJE5/uz\nBPlm6q4ZIcscdDx3FEgSvaGU3sgZYOt+qgDJqs6faIew8sw/moMEopAPaBjo\nhFFGYrIiD1yrlOeEWRn7gocU1SGfQHXnCcONfLzk+F70h5Yziiov2TuavVZz\nJugrj2195nxzzOj+25U6e94aL3uEvaI6HUzI1NeX8Fco+E5NnTPCow1kHT5p\nPjYjgUJbOk2HgWmGuAE6lPY/9H25YQipFz19G8asMCAkWAFcYQcKecQexdem\n8tIzErrvxx64+2EBRw3OIwvA0zez7fZ7/lRqSYRXM8okg5NzPdPl4R/8s8/5\nPCmU\r\n=A+BI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICq7riO3zTNdv7JtAAZEF9PN9W0YmJRRuaLw3SLNKq2PAiAbQVovc9hdwpp0FE3efe+5U7EL4M48Qyik4WCqrxPStg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190429_1556521593647_0.2737442103565346"},"_hasShrinkwrap":false},"0.13.0-nightly.20190430":{"name":"brs","version":"0.13.0-nightly.20190430","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190430","dist":{"shasum":"301b7dcb9a12850c4e87db2a34f090c0e887e44d","integrity":"sha512-XsaR7WVfRFJHE7lMA7PGMX9jSWdyK8ECTKVFazNp6XQzEuNS5kyUgE9KqKD5IadFHBxH2C//dAcp2AS7Jb17YQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190430.tgz","fileCount":114,"unpackedSize":638752,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcx/PnCRA9TVsSAnZWagAA5jYP/iqnFg2G9Rt+d0LrgZnH\n0q8zqhsivvjEP+fgD/rwkvcBtAKHsmiJacuC7gLCwjULECzAd2w2KUmZrN4L\ndA9PjVNnAMO+9ToSXUMqNnc4FmyXqMcr2/iy/Gi+VBYc+40dMDrrf48BHf+q\nZL5anCKijZFxe5oqGGf38C16gapRSdWxXBGrqz/qlbAAt/+qDO/2LT7xAjVO\nw6+672ucR5r/lGVhkLPppJh6sCahpwPfOWWQycHP4qm0JWZztNna3CSTelyO\ncLrd61X/gZWldKlRZW9KCGHqNTRPkpR1yOM/pOwSMxcHBfw0SD/9opJYPPBp\nA1sNdUZJOEuGwzwEMJBklKkJ43E+s0+cZZrUlAarAqJFUsCJrf+0gKg4E16W\nHgyg/YmRU355T+ulGTPnDS0XWE4kar1qfy5xO8BYrKDw0/ehsRZ99D889TLE\n/i7SezfzFG8tw67CzU+gL9UrKJDoiQE/Pmkx8DbS4W+DQGtdXPE/fFtciANl\n10NP5K3cbqq18DgRtfRRgxsFSOyzfZbhC/Z6iyn067dIVJ6GaXYQpKQWcePw\n9HhXyy4tQFzQPmz0bFjFt6MiQyrAQJEse+zNxS/EQScyqSFfcK/czLTJCi1M\nJW2y2/x0W/1Eyq+4CStu1vTAM13wKRoPLfAsCsxbSuq7E1ImCDAwD5tWsULf\n4nbN\r\n=/aZs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDag2dEXkbmFARfx7JgUet4IRi0IWqg/pGQ/KZ7QsiUqAiEAqZ0Qd7/FehjZajqmh/gWZ5xh8dnXeKix3bwvIamkS/U="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190430_1556607974749_0.5615864660229353"},"_hasShrinkwrap":false},"0.13.0-nightly.20190501":{"name":"brs","version":"0.13.0-nightly.20190501","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190501","dist":{"shasum":"1e18be0f82c3480f536d763033fe9fee54660122","integrity":"sha512-HcaUH3tAbDnAEdo5zy3piemk9yClO8+ToUSPw/x3krtjLRPBGYQssvsbhrfhoeUBe7ZPCLygoUpEuMKuqBFFdQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190501.tgz","fileCount":114,"unpackedSize":638433,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyUWTCRA9TVsSAnZWagAAdMMQAJXaiCGtxhblBiKJ2Xvw\nwfmSmvhG760QKo5Z9xMyC6nOPy9fBzHhfQRecja2JX+9jR50KRLu9FZfvMO8\nkkacplHenBJg6e7wrHjzHxoRyHewfzW2AzPkh7aiBnJFtXHyOXlBwFS4Cp9Y\n9o1CtX4Z3/8Z4SjDb4ULXjWKmsC1oPt9Uqg/6ck7n8Q7d7PonoxiLsbTI2Fz\nSYDWE75Qsm4JPR7I3YNdVyjVIDCj0eNGTgK2Zx1s1/aTw+nm59V3jCH6bh8r\nfpXPnyFXKeFMJ++A4jTrq6HUvZt41z6Nn39dpifmlf/pYynDDgB+PKZvSLab\n4rjasoXwG26bQXMQ2/kqGpyHoTq+5nlkHadYdnno+OsqiV/2k/yJfZO0fPoK\nhYHleHnyOGy2zNYPLFlXzJ2yRSNcxQ5ACP8aoB4zAksdTXFN6tc9c9/yu8Mb\nWE97l2AdvpnKky6CVDXXioCDzgk0Koxwoo9jykkZf1qEv4eOOgx6E93SdHDE\nESL0CzwWl3SRViAHIQwEzTeS+n0ohJQD52mo5d7zTMZXrqj+WSYUm9BXWSW4\n35AmI2RBKGpFlX2lMmol5qZgk4+bRf1hcjlHNQ2haJbG/02eYNQ/+k5hsf2t\nwGv+RRgnguWvDK0fyn49IqznPssHnbFeoNcxZ+/3BrreFrjxHe1qWB+20Fg7\nHceJ\r\n=dflx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWQ7KapuMckj2fquPVQozOvXczH9N38/wKFgfO7We+SAIhANNMaTKGcsjxMp0xmhBI89btlloT52hmBNGoo9tRbADx"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190501_1556694418670_0.9406872246542297"},"_hasShrinkwrap":false},"0.13.0-nightly.20190502":{"name":"brs","version":"0.13.0-nightly.20190502","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190502","dist":{"shasum":"78d8352820402e2fc66345cb7ddac67143a6e880","integrity":"sha512-KTt//gEgi3sbDE1TAIEJhhIrKIGr8RGKR8E3FfdLkYTUgm6F/3UwAlPPy2O8KsQWM+9wts9g+v1lmVWbswTeFw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190502.tgz","fileCount":114,"unpackedSize":638433,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcypcSCRA9TVsSAnZWagAAcx8P/3O8bFOQuwkSdL0log6C\nP+3/nXmSCajVd/ciTWkXEZto+UKz+b4Y1AoHa5nq8kSxRAHNmPPudsmNC//i\nue0B0qwT9Bwlk6xJBvJm73nORcRF4uC2K6XifKDhOfJeNBWKFWbpVoCXUcnr\na19L61hvJjEo00zaiDDYxmPidNBOdnEQT1wARd3FtkX4g5kiyR23utXVsyae\nGXRQhLazs5pcaT8s+vff7p+U0NQ0LPJtycHC7ZWg//2sVEc7d50cBg13gaRE\nD5fmsBqNk012xymNPGvHAtto09qp3PTtTAZpJH8t7xWUFc/cFO6Ix7CP/nWm\nAwNHsQ9xU85StBI8kRnSp8iasWm8JNQ9pho0Ukz4c66K1aSxb/x7APzENdJ3\nrowPrxABjwRL5dvDjdhgYwCaGBtKKRYmS3R+PqosvNftYBNnW+Tk/RQtnROR\nDxbuh+GZQEwnVkgOuzceDSQlSNK2oqp2DJztMTr4eUAvcmZ4pzq6pHQNnjBe\nFbr5xSjZ7Z/IZZpr8orrOFYm+0DF+YCws0aeuLnquoe7G7ZNeURPhOUEFQVt\nZGQ2eGZ1VSMNLswlLsKCFJoXO2BtKC4kKnJqlgZqouCmSB1xIInToL8yVzgy\nPHk0GUIORsODNN07xGWQf/LfyeoOMdgEPVwfSjLxO12d2bbSRXOz4u9EzF8a\n0eoX\r\n=Nst2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2Yq8A2SXtpCoqXA4ag8av9JprtDO7k0ninQyq60p0YQIhALE3N4eifyutSoEbWqH+S7nGLAeYvW67mtlVBlQfHq8q"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190502_1556780817492_0.18946608350771288"},"_hasShrinkwrap":false},"0.13.0-nightly.20190503":{"name":"brs","version":"0.13.0-nightly.20190503","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190503","dist":{"shasum":"e53ebb17d961e5f937c6689461cbd950692a6c81","integrity":"sha512-cX208jAaIRKHK9EBzOuwQJSkMkh56KhKM8OgPhHTicF0pLSlgpt8Ias3iwTBeOLaJnfex4L5dmhz5huQt6fsng==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190503.tgz","fileCount":114,"unpackedSize":638433,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcy+iECRA9TVsSAnZWagAAUdIQAJwajwHFKdIUBvkW8PG0\nMGQv5E1NHeNwt1iNzqdVAZ8edualkniYdPU5tqi7fMFIZmMh+9oxkn+Aj6Jt\nR1uw+KSMH7Ttf4tKy7RKNKagYH48ZbhO/+FRacpBZ6tG18/woBkukCmGOPlf\n0/WKztK5fUbTfzwhIYnJHwG9z6ml78PWmtClHNVwM8ARUZpVAGG6JJfzIsKN\n7Cxher43l7j8ldTrHhgA5QZAzPG8PdRyz3M19/K0QzgFpViDE7OVZ6eOfHol\nErd3c08RhGSKxsYJGHbfUOg5wenHTx85OKkSwo9COgeWGbfepk/yx9GND9Wh\nIQ/U9MBOPUpmS4z7nkUZbiR8zTt68XvzvkGUbGYOo0MKZqe9txWrY15PckNf\nW1diVu1U9An3IQ2AjWd4tsFrmJcoYeI+UqbcCHAHFTXWRtXTJZZpEP7tBBM3\nxUHgSXbV0aGqpiRnNtKBgPf8WeNtQ9RgOLKjx4m69+cisZdtA7nfL+38oOXD\nrP2cl4xtn3jUJAB2Iv9SURfWeW27BtNu3AbTWYu7YuL8pI0xOuOOncWjLDfW\n7ESOs2zLQEhLP2FH2YfE/vLvWMAlPuvRxiOWdheue05CLeuBTVPxb+PI6EeX\n/SpqYdb5V1jSTIJyvfKvlERCq6i1oa88BDsDabX7k1As6qVkv+ubomA8xEa4\n52jQ\r\n=9ndF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBjCqiqlNnVutOLLeMOD+GUUZRO2tkaLMhKwy4gnwZAtAiBsHTyGbuq4hQ1oU4YwzPB+14W5Q8wO2QYqq8ETKaP+yw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190503_1556867203557_0.587743878122138"},"_hasShrinkwrap":false},"0.13.0-nightly.20190504":{"name":"brs","version":"0.13.0-nightly.20190504","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190504","dist":{"shasum":"bc0e480c0350c335024b3fc0b3fd27aa585e5544","integrity":"sha512-YKb7HquvZ9oDMh0WsXrcAZ8qmdqSzrrlUOfHWjK2tzzdf+4Q+2XnYBTtYYutrB56kgye1zmSKLGNDJeIUS7zFg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190504.tgz","fileCount":114,"unpackedSize":638433,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJczTn6CRA9TVsSAnZWagAA5MAP/A20X7JAvXEk4DbvBdvo\nxmNh/pdb1SX+MKmqhCB/tat9pGM0FpAnxF9fGjEOXWWBgHJl74t6Y04uNv8b\nfDV5dp6qf00Ra3AgO4WzC1Rq0wToGb9UmMi/lTz3BzpHhBBY6jDI6Ti7u3nq\nROFUcLwLbKHQu0IOFWJBrMHH25pp42isfTsWPAWG3TYrqV4Fo7vHmMNzQeZF\ng5P5d5mNP+Fraiy73409WPHNH+jGfoeWMY0l4yrd64DNfHAfzsjJOo7eUVI+\ngoWvqseZ41wVjkxht1y9NnvmBRkszbWBwDBr9pqLvxUBBVs1FU3gePXTaQ03\nDGGoAtQcyns1U0bK9Z8Ib8ED2lyF8E1BjlLd6/Z5hDFj1z37q6VF67pHOIzi\na5omMum6hxRFc9QiM1VV1/lTpelcdhHGNBseTfoysWZVZXcwWy5LXG1WJkaa\n+mnpaVVWM088EQAx/UkIr3posO5NT201RDygzQ+Nv5Vtp9XscUhvbnY/rQyn\neiTGqiehUit9gsSZFtF7us8BnDEAvqFrZ16zSq5zExSkXxGKHZE7Sgg225iM\nVD1DvtU5kTBnDKzL1meu1Oq3Wtq1mw3OUDIF+pLZKbhTDBE6Ofzi41fuwnz4\nhMobsdSRyCySqLobPC+hREqOaoyvZxjeC8qH6nGOOKU+PafRPA6x+XR39uET\ny/n7\r\n=HY7O\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCj9lYLDriEj+r4mIuQ6VlZ59R2ly1yWp2rDEsPRuE2eAIhAK0Kou76jBOfWLZqct+dx7fQGjqlpdRAu1/RaUrgocsG"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190504_1556953593730_0.9098891028416933"},"_hasShrinkwrap":false},"0.13.0-nightly.20190505":{"name":"brs","version":"0.13.0-nightly.20190505","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190505","dist":{"shasum":"de0c6e0b4493144c3a6e510f4363197675810555","integrity":"sha512-QhnokIR+wHBXMPR/ls/P5FA5+R09VjEUN5J7dFJ98wzHYe0uk7T1b6eNX/gKJYLiOXTz0LNK/8DGB6ZyypP7yg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190505.tgz","fileCount":114,"unpackedSize":653267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJczotmCRA9TVsSAnZWagAAvREP/if0vHBTpSS12hj8E3SY\nnSUjSVvPFgpuU4Y7UQvNwbJboXBWVaoC+9A/GEInYwzzCPvf35SXjeX98OpZ\nWs8c/VunYoHLjQimsz5txWmtbxd89rLN1ib+56BGT9/2PuYupNCB1Ocn6OAj\nDE71r8eKhfy1ITqaCsv8sJTwHQc21A6UV5b8pQol+ibxUERmf4YjXdIWydof\n3JKkRYSWcW1s9JE5VsRgmrtYlIVNowt2dHK6h5ftkJmQZq3qforTu8K3BABY\nswxEFfN3UDqZ2bq80utmiS3dkimhrqh1d+VrtDDMpZUEeRETtQIUOifGT5HJ\nUxLyUD7QwMZdbxPybbCmJ+p2pZttx6YfqCy/NNhvlaH162Qwmfmv00KirMlh\nT5Ox0pTlYK1h5fC+IF3qwuvS0Gi68wStYVJmUMlqTNyhxF3yuSotj2Vwu+OE\nj1zFq68XxXVwRQ5B65IwuQhRlwsmDa35KcHbpFOKaZvGvKvcNPAiSTsTC/It\nNlpc6V4P1iwpMn0INoPibynvo1Pb23Ql4hz87zkp+9kgp1jVs6MGdVW/LMG2\nBhzaHkTONvI4xhwtHCfW94M+KrRHf3zyM1iHOR+A4KuC0afxZp0uhyB5Xkif\ndLXEc6eEn49FP2JzdLh3pI5EQgFO/8L0C95RlKdA14fPYDQlhJ50RdBjFCRG\nj878\r\n=ieT0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGUN9NbPD8xJSG4l+cblLGpZnMjIGm3W6/bJ6uID/jVBAiEAuIEY6ALSjnF+zpYLF0vzY1QiEar7grt9Cho8uvm6inw="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190505_1557039973468_0.44237738283549466"},"_hasShrinkwrap":false},"0.13.0-nightly.20190506":{"name":"brs","version":"0.13.0-nightly.20190506","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190506","dist":{"shasum":"f410c1dcf42f8e8b8e0c472a326fbf1dcf1023fe","integrity":"sha512-aD5iTGbKC39FFZ2OR4t+0+cJFmXANqbPbxrhF4nhqf0E8qlFUAvhiOXzi7t9hyyhSGUorgaPV98V6dKk9U6BCQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190506.tgz","fileCount":114,"unpackedSize":653267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcz9z1CRA9TVsSAnZWagAAjJ0QAJ2wRbMWUJiW51uZsPdI\nnzW7ZNOH0a7GY1oPLWmLCdkx9DCb4LRVQwvLEKAGdWHoOiO5kAOAxxL5Uq3k\n7PS57fFaL0vd181jwtBeZqdqfmD6CoztrQuBpK54vebFWcmYxWE2wsN27D6F\nC/Hv4XZXc0WMO1ooQ/0b477cLITvDwqnkJ7gV2ZInpzcy8TxlUqQS7abq+Lq\n1eS50qqBuRS0OUZXwSZMN8NNAps4MGOJkj2SX83liTDoONICeoHzIk27yuth\nvfp93S4dvYxoBZg3Ua79CaUVSLAj6DaNV1+0fT/CPPbJjZH8RSqKCI5ZFSAl\nB35EzLKkeCNgcOAksy4x3JQZWhrta0hIHXjS2PMl33Qj1Bk2PZyi1eC8Nqpa\npQ6f5Y4xlw11gZMBzLQUBDRs3klKAg/Psj9r9RVyVVqdbODkYe9T1Zfvy65w\njLyf0q/kyoV0mP6WId+5fKBhMfM+jxhnlw3UTAveQgAMxYK8EQaA88a2zThn\nQjyP+kcxNeUprgplPm9TSW49Rdosd4lR2gQBJjuDzNHcfeZaqUxta3yF9vi9\nYWPViYzzAZ+OwbxMXQiG1DxObi2HYOVbXozd2IocimRr9M9mZ78NZLZi/gNT\nND7qAlzI0E7d95Y980+Q6/083GjH9ptjDVHUlcg7CeLlG/arODbqBFf/jaMf\ngc7W\r\n=aGlj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDoSImOrjKY8Hy1iHCahXS8VxCDzM4iMu8fucGDK6rOeQIhALzR7oqIFIgDLFTI0IJTd2nQuNu91ur5Ksr8EJ4f1ET4"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190506_1557126388371_0.5041065035399195"},"_hasShrinkwrap":false},"0.13.0-nightly.20190507":{"name":"brs","version":"0.13.0-nightly.20190507","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190507","dist":{"shasum":"8210a8641f80827f6be1f209c8b4590794010b19","integrity":"sha512-GThzNvXzfesbM0fitGq69JJlUnADteqUeGlkMP24LBUmlzyTGJN9WTC4PG9kWMCKK3UzQQpIrPCeZzxC+47c7w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190507.tgz","fileCount":114,"unpackedSize":653267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0S6KCRA9TVsSAnZWagAAEKoQAJHXZAP56G9S8wODZUda\nnRmxs6LzG5ISiFS4FvvfIHJkS9oPfA59+9R0AROwy/aSi+cpeJYPYQ5UV2Mf\nvFOb0B4cQDHNnBiWzpfqjuo/+SdA2dWmcpJYLMnjMc4jxi1GI+9ez5W4+Nh8\nGcImvodp2DBzykKWEVntKfu4vNOFpbEOk+rQM6IIDRhj8biD2dOlzqunVR6/\nn7nUpgZwBr3kpI5eSI4DW08iz5Ft1IaAKFwPmW6BFJyQUMX3r3El9wuJfwTn\n/Nqs+JSYwwTBtMY0rKE7RaKTvwXSFQEFp7pSUMnd/GRMV5FRZAeh6w1ClvcX\nUVtHgeHYW62Wt8p/ZLjt1I7OG2djgkDw7PIQE3GGc3B9yXkwN2RXlU42ukk/\n7CQtQSCElEn0IBNj+5YNupjNyrMjBEVObUd0MGPQZOZo8IksBR6LDoNHSZkt\nqgqbdYqsASPlVKuqEBGljuDnO63zMLPpQWtMRauZHeyapcyA3iIMT95hsVZI\nKJ13Y3Ad3OtCvBWugmZqCefprEQ0qd0AeXFhPefPFB4Xe7uhvNeeQ7Wqvssh\nxTiDiul3l3GzYkSPGqHAQ0QfE/273XIvsjSC8p3CFynZJsDnOdXPIgkwQCHb\nwUxLcU6kVqOhxlPil/YKH5s9NG4z5M8/ORH2tHOVWi2wdyztsh7nVTedohnt\n6Y6m\r\n=Nu2T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDPKSoaHZlj7VZU702kuXR1Cd0/eZdE5c28PW74GkYDZAiEArSwe2o2C4zvZWZpv/21oGnUvF1WjhL1s14TwloGfhMk="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190507_1557212810033_0.07922206809107624"},"_hasShrinkwrap":false},"0.13.0-nightly.20190508":{"name":"brs","version":"0.13.0-nightly.20190508","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190508","dist":{"shasum":"0c1130460b3da4e8c2b847da4e1145695ba16ffc","integrity":"sha512-TwOwPuXxaBFGPIFHL+LG+SMPhqBg2ybJtKk0l8NSwjatBAr+9z4NpVwUkPoz9lQqXp5WcL4xl6tr5+tsAUjBAw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190508.tgz","fileCount":114,"unpackedSize":653267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0oAHCRA9TVsSAnZWagAAa7QP/1gJ5HV80srhwlDhwxNm\npiFpKeXnu/mhe4MugEV+hbaUq1BAqHxvfdP8PmJlKu8eNDrK0WCggLWTf4DQ\nqdWNtWIgUFLvRnbFFC+Zdh8EQQYP9GLzdhNRJrIOzO7ExrFx95eGfbWwxWSC\nve0fjWW/uACaVN2BRW5rNgweRktt3ZjpuTbQkEgIQoCaocFgK7NdjvtRcf+K\nB3NSbi51XfKBuFrh7BP6Nn3yFLmTIdJaRTTAUN++IjsZpQg0LHtpDRe6wr36\nQMyey3O2+h6YHgc9wl4hz6fJVn2HAdQ3udh4vPoUsqyw3LiBaaFyHEPT0rDn\nFsA1oCwxjeFkGQADN8HFcgsGvfFa0ryk213mXGLxwrUdEn/FE3EFu/gPvFwm\nk9Pn0UiVlKELk0xh4zG9cHfXTZz5QTkQryuE6ACu+6fFmMu+L98RVguZXueF\nD1V5pdztyb59WsDVNwh4+BVE+ifWBmrOJmrQq3Yo5QdWeo9RCTN4k6TgN8Zv\n3u3H8SrHPRYdLXiccOhDiiaKGg5yNGQ8/N94bs/qitd67KF+eQZFWe0LnzZz\noI4qCN19/KsvNcDgu2qZZKc1jV+rQHPyFsz9gss9/UjM/i6CLLWQ0R3ObEWU\n0poJ+bT78wBGQBxoEW35MRdXy0vyN82Tam1SXr4qcEYJ4C9AlbWtAsmyvc9y\nfsxx\r\n=zCLW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWm7wM5uG0owGhVcN6N09PpHkU+OnZFsdQMxwRpY7F/QIhAL6ws6gnOBwDK8r0v7NEanDUteQ91sKAQezZ9xz77oOK"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190508_1557299206786_0.8051591305699275"},"_hasShrinkwrap":false},"0.13.0-nightly.20190509":{"name":"brs","version":"0.13.0-nightly.20190509","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190509","dist":{"shasum":"f5d48c6ccd2b60f66e3bab4d56b9ac7f46bdbe61","integrity":"sha512-wMiEA3CjZdUijuZeaO4T/g0W95uD0lbofMbqx7wUvJSjqEWIJKR+Wh5s+RNAzZGNg6SF51bq4I6ACEFyjb3Org==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190509.tgz","fileCount":114,"unpackedSize":653267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc09GHCRA9TVsSAnZWagAArokQAI4orU7erX8T/YmpHvIZ\nis1vnU7yg4253cvetS4eCz4qdYN0tdUHUt60Wtw6RN90WCIluMMQ/38xC2yA\nEVtTreu5H+nRH8aWYoiY6FCZBrRurL4X6a2bzmNbC8GhnUqKUZ8y28+D7yMF\nccO5gXYPWukBtvPuLB4w7dlGhuZOZ68sZjmn3jb8s9zfVCh7HQglT1oIcpQd\n3K24wP8NY59gcYQC6OknZF6cLNodiu4A5RpEbXELR8q27nbjycyYqGvqycXv\nz3pkAxtJwTzJGxU1e+12w8TzqF24Zwiuqq/6tyzsNq+IbsirrJMB8vShbpGf\nkXdFOZSovw6W1tied8fF+Zv7lC52j8RmzkJOe5NbLNU/UtNozjvbrE3wc2RO\nlFbWXfQtD06JwBpJ4igZExVDKMFBk56IPRMp7hhdluUGsA0Z40snGExSdGK7\nsmRE1R0gLe99AGDsjhtP0wc5eHeDUZsbpZhetQgxtMwoNAqiq6e4tp+r11Bk\nsF+KtG1sXGoDmy7M6wykiyq/Ur4t6x838D0aGuQrcOfMd1kbV/ju1Z8zcC77\nzPxs3W5yX6Oe6tg9bvD6fAu1XZL26TUJGuQmvRDDfMBapz/4yzXiFeW3FsoL\nxrWulbIteKQG6rvgD+3N/jxpT9y0oHrhEhZrsfMUAGkuJIG0mEELX4IHJdSr\n7ds0\r\n=SgBr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH1Pg7n9AduxHWyq17e33gbUdEKSvMFPg7W7YM/deKOAAiEAjaZ1YsblNcq24lPwEeandaDD8Kmm0mdV+NK9ADUkEnM="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190509_1557385606981_0.31476970645172453"},"_hasShrinkwrap":false},"0.13.0-nightly.20190510":{"name":"brs","version":"0.13.0-nightly.20190510","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190510","dist":{"shasum":"7ccda4d4b22bfa05183f4a7946a5e3ad5e455394","integrity":"sha512-TXs7jYLJPgC11fJAHAZ+gXmSHB/BtQl3aijBf58e3eNSgoOFj+8dPdsJ0tL19SQaULJ7Twui1YI3x2CD7hmIIw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190510.tgz","fileCount":114,"unpackedSize":653267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1SM7CRA9TVsSAnZWagAA2v8P/2CW5Nq1OMXzV0+ArKvw\n36EhoSO39EVxOh/S/3sZw3T24FdwXABn6RsgOV/wvYc4wMuJdW8m74ks+SYd\nf9t3hthTUhN90BocG/5ugruNzn5CzQAzGEF+CD/TpSCITvsE01JjbMA7Qzfy\nPghPPs52Q+j5ohOZawU4SB2zGaZ2iXJcVUKILQdwn/SI3dOuKeCYBSLmA929\nP7bybTQFsdl8Ml1jqc4W4FGiHOPxskg9vdJzxziiFtxm7Sy3RIpB4PIBPXnl\nnU0t5PnoH/l+wOIAKLsucnblLjoDhpw722dBnwsicoQvpWBGcW10RMYOSGwN\niX0VWIyPS5xyfW4F1cKIwDc7F8mMg6cnxGp2ZCS/96MXQJktg69J9th4MGE3\n99JzHiYz9O95IZCt76VqT49OrkC4b9aNmOw3O9yaTAJxnJtR6J/Qk03mXFbv\n2xnfks5U2XAky+A4qYWq5Wu8BWV1E1CIUe4FRp8jJ0UP81D3cm73eXAb3Xog\nwwgqobPCN7XC/1pPG3nsgIA8VOn4Q2xHvRXLw/8gHB0e10Jp3FacDdeEYRcb\nsOc24cuB33UVzVtV1stO65axBkkKJTpdWun4TOUdjbQGc49lJN6avqCkDHl2\naPLK6SqUwV7IJytTndA8Nj5Zsw/ssG/gRJG/J9qIEjao6ior8ubtaeq+C4AU\ncg8P\r\n=iIhP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIETLtZJrmuX4rCw4WyY6EvyD4+fcDEpdz9J83LueeDGZAiBx8To+iDlVIKsREKLgTTJyKcubm24smKdg3XQHSjqIGA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190510_1557472058845_0.3097471579073794"},"_hasShrinkwrap":false},"0.13.0-nightly.20190511":{"name":"brs","version":"0.13.0-nightly.20190511","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190511","dist":{"shasum":"3847dba6079253205e292c09ae6bbc233a6bfdba","integrity":"sha512-5XhTSxHE4staAV5yI+/BYX8GmFI2six6kVfOEG2XLl8NsCw3v66rBQwe5kqhxDGFRVBTR78mr8zpu12fmN9qvA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190511.tgz","fileCount":114,"unpackedSize":662695,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1nRuCRA9TVsSAnZWagAAcnUP/1ay2vO28nssBkyAAf74\nqmcHi8xLYDV2WbviGUGUY63gK3k9gxiNhWJ4v1Bbdh6wWY5I6K/xBeolNOZW\nHDKGg7uOrw7VTNLsDU5V2Wvl30x9sm9rfzenRUj6LGi1jb9kE+vWtw78VKPU\nf4wEk2D9OsXTTcMHsChdjQ0MLhy4zEL2yvNXOa8wSjyJZ04zGCmxL3yFLkfZ\nDdL719xIhOUZVqTTfMYaz0YaQ0SBKcVZBYIwbGqpYG2KqpHGtxKU1N3JVMXF\nNNMNk3DKUjpLVXKDhJPl7kkkhms3l5awu325zxibiZ0tIDyrRByQXnFySwU2\ngNS0n291Tz20/SCVcajDco6DipjsknOW3ukho15Hjd82L6iqPl8rSSQMlRTh\npkes7s0Lh+YM93PPj5g7TpU5lDuNJ9XxvQFQ2tM/1SOpsldHzstMTn+y+H3d\nh3GkzM8r0696YJ/GSvZMvs+mFwFBFhYsiP8D16aOS8AdqH5jBlHitau+c1jf\njYd9GCgRARH2B0j8/E0I/F1gZ+yV6DfX3vPUTRjKJZLm0viipEPLNKUskDok\nZGyGIY2hiyTGVXum5fQZCYwX41kGMn8OEHMLDONKcp8YyhOctmqrwO0ZoyGp\na1VCY85n2ugZZaTgJBqV3ZEg7UhieJzqHURVvGOXI5p5ejTwhEWR/iysDwI7\nBHP4\r\n=TKDX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFIBuTLf1y+ha6UI+n36AfXHScxm3Hfig6KMEXiLcHX+AiEAo1s8WnEXQ1IquqUZ629B0NtQZ7OgCfO7IvzZ4RFkCXg="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190511_1557558381987_0.4786767956731197"},"_hasShrinkwrap":false},"0.13.0-nightly.20190512":{"name":"brs","version":"0.13.0-nightly.20190512","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190512","dist":{"shasum":"2bd9a413f996c2569db341af1101003c9df3a111","integrity":"sha512-S5m9Q1CGikKQZXAihvJhS+fFC92pnVi55Qurs/JA3CiWAu06FD4pdreP3BcAjKLNXEWASXo8th64SXdiV9gzgQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190512.tgz","fileCount":114,"unpackedSize":662307,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc18X7CRA9TVsSAnZWagAAXR4P/2LQdwBcaS8h3686LiCp\ng5GbiyUQRm1wra44I9Lus4FQg/+fF0HAJ92TzjQSsBRKARHyWkpUTSDURX0f\nYhe/fFAbH/lwxNc+EB9ekx2W766jevZ+pYApH5K2Jz4kKqeorYydUHxoTGyV\nsAyr2PdkscrtUTLZfpTvEOrPVx4Ax11CZpf2niQ3WwFhPnL2CmJAW6NZccO6\nzYuBGxQdZhbjuHfM99dxFW22clIkT2b1SQeN8B9MIzYdaVJ5QVU7lfZUMQX3\nISlJJ4Uqw7aUi1MWWdUv6dhg5nNd0+QOQ9+++noLp9NVFWSylVUmbvxFtuoh\nb51wE9e1YiAjnzot/r9iWjjJWaRL2mrwrIJc77kxIx5ueJ23SAQg9fVR5AP2\nWlWbbT+HQCK5sWmgmP5wNwIGXSXi6kYTLfs0bsRW+5DDzE7Gka0zPaXfgk5w\nHEcAzxX2JGEQS14vE/QzrRur+1MKkJowlvtrlyEDWWwUYR6puQZpMRA2ccVU\nGC1t+i/vGuZVK39TrqdTlLTzJRdOpUxkJmjWtL1/to+2L0LfBotWr8Xkfi9o\nM/0Q/Z+UZ7rw+mNjiffRCnfa7UbmOVOg8MgmdSnLJP/zn7E+nVInmiQBmgFb\nHS8cfhKy3P8xushu0y0Dq5GwxnaiAjY1LtHO8lTZEMu+tCSFDbpN0ID/uUSv\n5gkA\r\n=lXdA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAQT1hX3L3K8M5Po5sGBZ/KrOivnz8uySdA6u+LLdjGoAiEA8GhAe1wnwWgTOpq31ftJMMdvkqmq1kP3G4W6DlBykhk="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190512_1557644794546_0.4393859237317572"},"_hasShrinkwrap":false},"0.13.0-nightly.20190513":{"name":"brs","version":"0.13.0-nightly.20190513","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190513","dist":{"shasum":"cbd8f7ea22b06f0864466283f28cb3643ace89db","integrity":"sha512-0nl2pY4DHXeDf3ofwb2bB+5qUO+5pzvOIBy2aFzqTRwqxfIAk9Mlr+2K/Au2v+rP2QOj04Lak5VTa/8THFU1hQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190513.tgz","fileCount":114,"unpackedSize":662307,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2RdzCRA9TVsSAnZWagAAbXwP/1iNF4IuJ6CCWBCB3gpR\nWZ99j31akBm+OzkC0AhSXPGFd4Dnb0U5FB42l1+d2w1aVwiG+8k7GLPi+2EV\n6Sj0wKB2N8B5/RqWysF4BCjOHP1TSW32WYkL6sR8klnO9+qAmkvKIFaLp6XL\nD28PMyN/RIjQ+RNW+iyUakWfnWEpvXKAmzta/zpx0ipeOfhg8qAMf7cvnNPO\njTRl0ChQxoWnNdt7RGwg8YTzb8SLMSDFhSFwOKgyW2cF04jLogdGAZ2BCaJz\nRbrN70QWtm8+M9Cud36DwFsGkzHXohce7W9kprSWz7UNhKOgw1RXvkLsoJMr\nFelJgfNi8rtHjSZUh/98b9R029LYub8ZAFh+5XBNVOCIhaE/GV0WieXL2rbm\nTWL2uJXIxESpprSoMmcF4NpkAa64tSiCMgEbnVHwImyYD/LAO58G74QzN3Zg\nnBDIVUPiGRR+tzUlfGWfoxrHfutD0b6u9BUdcLBreg9p1i1Ri9znqaZdGCXO\n6viv5FLhlauaoNE12opYobp8VCMDlhAOoe9ut3KzxOs0FCtU1/nM89Hmsf7I\ngOWOF4zV8mvaa5lxR4buzZf10BEmsspHm2tL1zTjXfdIPSBAwNSc0EsykdW+\n2Qjjh0fr46wqJZgXc1qk9SsrvQe52oZd1xiOB/nBNRTLJ/muNML3GLfQQI/v\nnFLs\r\n=YYsg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHtGRu+wkQ2DpFA/FVG3uSPAsySH2hBL10qYmOolAhJ8AiEAo0WiZLgyl+irH8KgdZM+qScbDRmRIYsuaVRurgj15hI="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190513_1557731186291_0.8360147571029151"},"_hasShrinkwrap":false},"0.13.0-nightly.20190514":{"name":"brs","version":"0.13.0-nightly.20190514","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190514","dist":{"shasum":"8bf62ad15f2f679667ba727121b19a85fc6c4461","integrity":"sha512-saWc3GiiMPSQZ7bFuWaIN8Fq4PbOwJirD7Wa9XuL53V5FV6cR2zqfooTvFEd2PeWTBc5OTD/G/mgci+1BEh1mw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190514.tgz","fileCount":114,"unpackedSize":662020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2mjzCRA9TVsSAnZWagAAdMAP+wQriG1YRmNl3scT4Rdh\nC+jl7SK4qvml9fQZwqPFgu2pJhSD4/hSFLyVgUy1RCA4zo/mfpt+8y/ZB4Og\n2FnocpKJ9alxacQU2Y3fNkeEpAno/g2VAkM54o8zAPjIyMBRACo17Pq2oO4N\nqmemTcSqZga1ldxIo0R1WTxlw1wFi2oGwckmNKeYral/q0oE7/UYtT7Oas/y\n4vwbKYz9Zn2EPV+KFbupP0hkqAZoQdK/OKAXXWfBqWWVQKT5/prC8k0KS+r4\npqHXH8MZmaaIgozXTFyOyM7n4R9ghDsj3wjQdh1boTUPTaStDmP0ktp5CHHp\nhruqEPiMKSFRu640rWYd4XsYEY7NvLoV8ZF82yYqeXF+PeRw/5DCXehdiSkT\nH/B+1VmuTMWytGWnOmsj+7jH3X/d2s/w5Se2LczYUo00C2KXjaJpQnjfEte2\nonXgPxPdHnhFvcfcTltt9YTyacQ02pW/I82I8jdI2vEYpM+6PHJCMHd0i6Zp\n9qcmT3A/rNhjldsZLJLsKRBrYy767ZQs/ehw8L0henVCQOGWc3yDkESmWNbo\nE3xpMG4kJ+sD8ieNXCduI0sbjVXGiukCxDWayUJiDPhUSgnZjVkMDRK/Abx6\nx5oBTprR1kM5fffQTM+Am1s8thEXmUIEzoAoSqekqDizHwls0It9s+js22il\nG+j3\r\n=7umA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCs73jg7JB3DOjQ2poe/hElTfixSbVZKugoHxm8Lt1q6AIgNKcc6y9ps4cGQxnWTbppW8B3TqnRT18ucYJqrMpVQCY="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190514_1557817586347_0.9836109829657718"},"_hasShrinkwrap":false},"0.13.0-nightly.20190515":{"name":"brs","version":"0.13.0-nightly.20190515","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190515","dist":{"shasum":"991da2117fb397c3c6656028dbc1171f75ab4bcb","integrity":"sha512-0wTztR/kUlvKFXTRKVjm3Pem77Fxy1YKBQ481WGt2V7H+Dc/m4VtE1yz3MYBfCXMGQlzK+IFL8CJmI5dzEFGnQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190515.tgz","fileCount":114,"unpackedSize":662020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc27pvCRA9TVsSAnZWagAAc3QQAIGeSxpVVBC2VJXYeHHc\nqjZGv3Jf+3Wat0hm/1f7GCEQ7KeCFSlEi9rqMBGvbFwBllWARta54v2QkcG8\n+ihBMUCrNwslqWkmSqOm1XOsK48aA/Q54KYiccvkLoOM0ttfj8rt465q2nxR\nXGH8amy1pEkR0Tgf44rXG3d/GlubFeHcqYK4Jh+b3xCpdkNskbg5rcwl9RuW\n/FJTBwXg+I3/u+nSQYIcTpBcBtSZcXsiKl5ti76i5SQDZ2YGAha0uTxUVx6W\nl/+wA6up8H0dHk0ZI0mCSPl3FSlAfzk7NqJZLBBFkidhRdIFCBopIEIt9xBU\nmIfN1OuOMvNVrjAZKshXjizh/0ETAP0fYXtf810MLo1QQGFcuV7hm47728LQ\npvzSw3mahwtTqzwhVzsjE0nehiFMbTfCDeprgYu9R/ERF2Ahix56GOskVG/L\nRJM/i6MJ4x6J16iuy9wyZDnHAXmFr9eU1L9XVhoUQf3y/GJuS7DYi9pUIE+E\nfZx6qvT8ZVjTS0OeeLF8lZWVSOj/AY//uoTxfsY/Z0CzpqMQR/a/zrX+UYUM\nS2ZFK11IpCNLC8mSSMxoMJ8hC1GqGOUHOa9dqpM71cLWnCdqmgMVBa/eDtNm\nh6VjBLffYxhcW8YQijs6IiwVxE35JS67/enGGBFsfQUqiG4CNmPjhcO+aAnM\n0DVu\r\n=hUXc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGyVmj/jupNWUmqDDvq5n68VngUCzfp+TCJRnMbHSy/QIgLjzRiN+w75fLckZ+bU/a5pcG0b4N3hrFRNZDLDa6B3Q="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190515_1557903982737_0.5204074223109727"},"_hasShrinkwrap":false},"0.13.0-nightly.20190516":{"name":"brs","version":"0.13.0-nightly.20190516","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190516","dist":{"shasum":"d0d6706023cb4669a4378cac607d4232f7cdd760","integrity":"sha512-L2fNkKaod4tGMXL3F7yBOUgpKLYVtoJOACu7YGCUqphlY/z7hu4A27j3EwadtaDaX4pDsbm6dWExwSoDTgfz/g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190516.tgz","fileCount":114,"unpackedSize":662020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3QvvCRA9TVsSAnZWagAAFzMP/2hFzcFX+OVWaA3yyNgr\nEE4hT7EAu+r8+Q9pZcrY6fQV598fLJjO5U7U9sxJMWwPsgXWLk9//7xJnFfs\nJnZ6PKcKD5JrcHNeqKhNsG+fTZGGBTknjnlYBAUvmloWNW2tTFqF6pBCVQPk\nRx3aEbq9oB2iF+wm1HEjtubyANw2Ke6Mtdie4x1QWJ06IoYYFVrWACHui4yY\nA1cXN8jd7E9azPFM3ah+m064tlQ7lBZnFT0+bdM1hFZCZE6zkDFGDkX6CFMx\nPw7+1kpy+YYm7DmJgpvMwi72NmMhQ8HPvHII1muRLgNN6LCs5TpO5QqgRZpA\npYL3s/9epO2I+A3PK9iY4W97mSajQq9Mn0C7l+JJKZUncx8aBT0oOdde+Djz\nbyKIMSzNOjA3eW7EIXUcREnT9Z1xllbjfIF3ump6MwBbJH0VVQiII+Qrgyeb\nfcjxOQlXmoTlnWwKKMQ73CkcJ/eIvQ7Zof5AhfeDkbBiPgw3l3TxNQT7kYHi\nRQ78VsQCkFY8U1S2FUvoWYxZsufM/MuPDKzp1mlGPATccxylZ9OvvkyxuBhn\n16nACid0kQ41RpdpddxYj9JK9MNXJzVwuzQfRwTZgw1vWbtvX4wmCRqiONip\nqYbLXOX+XEt6e4rIW/cy9dv0e/7Y+uGtj+F2hWl5b9OKaYpaRZNA6R73pqI6\nU9jk\r\n=9/l7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAklt3xn3DLRQrlUy3jVIH7EiB8l799ocxtW7OOrcRnAAiEAwFbTHsxrAfKTynW0O6/iHhrfPg5MLGbw9SVhh/8S24Y="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190516_1557990382295_0.008689482849278951"},"_hasShrinkwrap":false},"0.13.0-nightly.20190517":{"name":"brs","version":"0.13.0-nightly.20190517","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190517","dist":{"shasum":"6c2a035d71f43fb3f663c566982bef3261c2c241","integrity":"sha512-wasPG1HlaIiciM204PsuqGV6Qj4KQvRBGAA8B4npZWVxRL7V4OZ4FIOuhzGJnomdVvApiBqpzQZMtDzvCdjWdw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190517.tgz","fileCount":114,"unpackedSize":662020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3l2GCRA9TVsSAnZWagAAi7EP/2ZjsKfKSfVjzUS4dzbR\nxrSXQ0V0zCSMU2ehIEbLlxVkgbZE+w7thR4Bn2G2xSafv+Z9A+FZE8TlKgnO\ny4c9NuidA6tsNx0NgtOPArs6b7Qo3hOqFxL86Tac2ihvJ7KY/xpH606HjD0T\nfimhi65BH8ErcW5fBZG3R+MbrUqBdeKYLiODJ9dfQiG3uMG2oE8jXrqHqCje\np6H0w1cBp7rYBJWFpNcUZ/E4lUDfE9Ng3szMwzGXFvSaG6eY7PkM0UirdM9b\nQ7JyWK6BISfCoCA5kxy9g2u6w4ts6yHnvJPT7sj8yUfVwKrM7u0OLI4AKHKW\nnZ8BXXqQGmUPWFGRJjgjn5AU6O2RMpsE31Dec6IIWqDhGiFLhBZqydoKXyGS\nDo93XjLGmEdoAvpzqAvXI0i256YSwVSxkW5jKfW7F4Gcz5ai3Fg07k0VctgR\nufrBzMDXSaQq0cusLhOyn/3dVR8eVjokgfo6EEPAsDmMkaIDLhaMx9SrTFHp\niTN4122Gcg26z5PqAxOhVllgTTypdMrpKN9m2BTSTVpr5GF3XLQf5kRk85mC\nL5QFeAVWoZi5UHVBOlpVx7fMVdM1bvKXRJXLGQDS/axLuEvXZguv5SxQtL31\ntHL7k7QtTd0L2g83ayiijOlx9mNGpKLms2xcPWeMKxQ6H35EE3JByrCcHCLF\ntCiL\r\n=NksX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDwmnFcm7C291KIHiYQ2AvTBGvxXJN4rraAw552C9Hx6AiEA7jBHO3zIa702OwGeSHr5v3JG3NXJ7WWXT0Y3oWmM8CQ="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190517_1558076805587_0.5505324689192632"},"_hasShrinkwrap":false},"0.13.0-nightly.20190518":{"name":"brs","version":"0.13.0-nightly.20190518","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190518","dist":{"shasum":"c4e42892259351baca212d606d16d4c08870066b","integrity":"sha512-Kkv87cAIBnotRQEbeRkYQa2iS93tiaxHszIrrO8Ys/wl9PBV3IGpydpLrDEW9MtwiQEZo/+BKTnZtjrIhxcogA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190518.tgz","fileCount":114,"unpackedSize":662020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc367nCRA9TVsSAnZWagAAWdgP+wVuZrj8NxZd9RhR5p1Y\nzGt/tVpFd/pSkq2LgtOVI9nNFm8YQK5jIzsck/EAFUWiheyHBwqzKk8OtMdx\nsmYIgwI8GyG2SQhUjqN1a1Ptje+4nuxfsUEpJaROMd5yogaLZj7i0SwbnTJx\nT+QIgT6lC5kp74klr57gz2G4qo9c+ulfB3iYeYi2k9MGvtRKtyJ2aHoD4eJ+\n5TZ55D9OJqjTgCWBRuTehJtbnHE5OYKavmuQrKWpbBH5h8Ae2LFxjFHQX7jN\nFnz1Gg4OwF+1xoLZHonRj5szU4gYPOxtoZXC3J2Uvc4Sjn+fWLYB94CP/5vG\nbbGZp0Svg1oiCowl/4lRDBZU4D/2nOKCsUms7GHYgJkI7Kuh7OtlIxJ96ZeO\n43bLdtYX4F3R84zO5MCAhvYFgbzmDXuca/RRZLO1ijANEmJTMKKerRAASZhl\nQfEjJ7N0QLtG5KeWBAZdG8i/iJ/ggWQ100QQ8sc7ReEELxy1aZ62QFzUiCCk\nHrDY2WuKZLQFiaxGBE02tN89plcjXPMFjwc+WrhnZPdUqfCks20ta6uKMa6k\nQgACXUvPfBMW0KMPzmU6DtvlO1klC1CURVt0210pMEcBZfStjRRqaEKkfj0p\nmcNSjX8gNbcyvXWWk/rjQ851cw3AmPOoGcgx54LRlQj7wo3Vq5A/9kd7oK0i\nWs9l\r\n=uzej\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEiNmAWeRkPJAQ499t3Bt8byYNDjSu2LrANcKLrvwHbLAiEAsqhEcMBm+Qvp1UoBJs+/4mHVAMcDXCu5430Wh+HQ35o="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190518_1558163174893_0.2958105507947677"},"_hasShrinkwrap":false},"0.13.0-nightly.20190519":{"name":"brs","version":"0.13.0-nightly.20190519","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0","pify":"^4.0.1"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/pify":"^3.0.2","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190519","dist":{"shasum":"0e50096246f648dbf30d167805acd62bdd5be6f6","integrity":"sha512-corfwGyVZgUr3bXxybrmVFSd9aIHkNG7Gvqg//WGRAqrb0m//keoUBabrJutx9hLdEInn060zYMQHaSLCy9+OQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190519.tgz","fileCount":114,"unpackedSize":662020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc4QBsCRA9TVsSAnZWagAApfYQAIbDXxanQ0oIcBMf4WGM\n3DJ3fgEAoid/QaxqC6gD0mjfhszY7OHTGTa5EfT9xOK37x5/93z4p2HB7Lno\n0Tg5ykVBOwh2ukKpiNqK/POpvG5/YQqwfRk/egxjw6FQaM+MKf2bLxX+lLUF\nNDBhxfRF/rdfLl5zcKQGEpwxu7JKwAfCaZouCyRfv4OP/exY8RdfpPvvl1rl\nAgThfOywoQ3mPoWvUWe57u4zObPbp7ykU95F+ExP3zidQBC9dhBtw0UpvYZ1\nNHLfrkFkPuNpPvgIJzgTb2YpRUKShNg/dEbJf0wTAIbrNHi1Xhh+8mvp7q7B\nJkTVvD0/lPx+ENlv/fSL6XerppB19tgXIpssidf119OlEet40eUKk9d4s/1/\neEsK4xGSYCvQepK7XuHQb+9XxNsdfGwUAmYx1bDD5ukqC7/pnopvf7FJceyB\nrtzs1rN7Q+VyjE8iQaq0Og/747+3AscXxkwk4YX+BjPU43uqCz5Y2X2kX50b\nl9kYMsX17FrpiLPUhcEWiLnIALMvmqx1vVUCmArY5kf6YdYDvi8iUJLEoJ1W\nYphQxPQYgFWCC3BGbNlIX53kt0ddTEX2k12/YtEE0/+TEmUiEwwWZqUljXxc\n4pCB/xMy+K3C3Si0c1UeZb0OQzNYgW7Z7qT+prAcTpHFEmQ3UsI+5vvEz/qA\n7tac\r\n=hwLo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEthf3pwJmCTmPD2FjVAQbJazPLKVCrjE6dAQO4mQ7JBAiA5g5jTvDiPY8C9G9iQS41ARAe9Laev1Dos4C3PzbNgnw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190519_1558249579515_0.929159097199002"},"_hasShrinkwrap":false},"0.13.0-nightly.20190520":{"name":"brs","version":"0.13.0-nightly.20190520","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190520","dist":{"shasum":"ca6ce339b97c35fdc6c75e59e339e6907c273a46","integrity":"sha512-tQg+cSXVWH9Av7NtaqRbZEZrImsYVaL/VyszrSzOcqrpkBGGn9ZxK5J7wd7ARC37HezLIf5k7Xl2MX6mBIBS+w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190520.tgz","fileCount":114,"unpackedSize":661645,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc4lHwCRA9TVsSAnZWagAAjLUP/RltPA1vFnDcm7pw1N+r\nqTQ5HGDbqJU+UkpexpmaFXeU9cSPg5VdHMtmqWzOPEAM0Yu6DXvvinORsMLo\nbR04iHtP8DsYBTGVh5asJ/oxZoTrNXgTo+Xutgp25gl29aKrdzcOMwH9jJF/\n06ZqUO2tSB6CpAyLDRS4v6ADDnQevG3a19OoHUCifBIbjHjXZKHcWbHfKnRr\nBpxS5dwATLwDjxMKm06eismiCspy0nW57pz7oMaTL+iBNdSOJ0XK94wsUk5x\nshgO4vDDMfwl9DNRWQFDKtNuaPA81KzSsCnpR9hZtXcycXpLi5wNL+u2ubg0\nm8EPbo6vKQRVE8QPuIh6fe5v62PIPHHdpMu6Pf+qfilEom9Tq/JzOrZt4dWt\nNbY80ciYGjh07rWZ8gv70OEn81QyD5ZAFtFU1aR5e2jQxlDua9XDFXTzXSdy\n6jsSMITPdCMhaF7mG4kidWVIta1xcrCX8FoKwLJ8WTneSod3UeSsDot3LFjx\nsCK+t9Ma1VmPvU3h5ZXM9xsVzCJXtNP3KFVCWv25derwdLJh3cQDqmIL91lb\nEz7NIXh1Ig6hiG8I8sc22usbMR/tIc/TnTG9e6zNNt+Cqp9w2TNuH178zphW\n8OD1Ayz/fgNGXhNyQ9qBrjIArfbhDn4D917xPBOPAw/na3wocmY+69W6rRNu\n/4jO\r\n=t0We\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDjG9cyM9A7wrrAe1tWt7QJmQGo6Ycug6EgnTZsFCCjAIhAJ5dCa/rVQSNxStynYCXpxcHeTMFvyYc1xSuDhZjZaVr"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190520_1558335983946_0.08203141752066245"},"_hasShrinkwrap":false},"0.13.0-nightly.20190521":{"name":"brs","version":"0.13.0-nightly.20190521","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190521","dist":{"shasum":"79f0053105e46056368cb31a1385bb0cb5f80079","integrity":"sha512-AtSBMe86BQfzU5tMKq+gloqgmPcDx59aYL1pjB+ojz+4dayLHzbVo6xOkpXfTeBOzMagQVqXjz0D6Yo8dr9/GA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190521.tgz","fileCount":114,"unpackedSize":661645,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc46NkCRA9TVsSAnZWagAA9D4P/00oubhCWOLsRKFwa2Lb\nU/e4D1irkUrCDsFnQuCcPZKJXnpNj4T1fsl012nKBHFHPdiEx0STXOPy2b0g\nAY6eS3rD+a8SUYrM2lfF075dgah+2aONVHiMgMdQKuWVmokBUQl/sMF4Yf8l\nHTYj80EGbSJNKvA+e/7/wGFvTEfdjnjafxOVrosPt3svS1YNVtQwDUId0akL\nipQpfMBDKm+BgoQAHCbbJDJganSvVbTCKkzgM4stsP3+5mJCeJZnMfz2T/Sw\nfQ/zTEUJ8Dw5XC2yRz15v+LxgEekYWiHrpT2pE7Odr7HPFKHJ+nmDANYYgo5\nOHSCoDDg12An0jflnpS2pa9C08EcioWvwKjEBo18y9rKeNsm+b2xil/Nq/Md\nmKVNyBTo7RFjcPjErZe8/9vfZgpJxUMPeI/GwUyTMfsmxO67qsJfuAvlZxyy\nZcY95QYWzQwVMeUpWF/2TMFlaXb1dG9oAn5m/oTGCzExkqe4IMi34CZ3QIzJ\nR3zGM79+M8kgtgV8TbgftIA0K4/wNsOyCieu1JnUHuPIDq2NM7iusY8wYLH5\nHrWSDRX0/HyOXCo4g0QyYwmnDRJpoUdw0XVTifAiOg8PkLqe6VMpPAXSE+gK\nU9hsC/JRVd62zpYPJcIqHrt8QALM30j3caEVwE112Wuez0uUbxqLJWsqwkRk\nK+YC\r\n=S0Fx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCl472kkidFkMyI0MHEyTOtqqcLlaT7nfeb9HvWLsM9SAIhAMFpHLI6nltgGkslWUlzaKWNt45URalFUSK34T4cYlXs"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190521_1558422371710_0.9209139296142761"},"_hasShrinkwrap":false},"0.13.0-nightly.20190522":{"name":"brs","version":"0.13.0-nightly.20190522","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190522","dist":{"shasum":"fadcd1088216fd41584cbb61e31f490237ad5677","integrity":"sha512-yr1e388B06ExTuXnqd+1r22axXRGzWjmTCUi9DL90NqDADe5EMwYULUONoAYev7VkGm5NgRbPTgrYsKWJs7hxA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190522.tgz","fileCount":114,"unpackedSize":664714,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5PT3CRA9TVsSAnZWagAA11UP/14ekLuM0ESV8bsgn2pA\nUXA0b1pVmTyulBbnRwhwrYU7Xst59gYDZPiH4hccKWOZUQElmKqbJD1UYsd2\nMU3kf/N5WoKJqlvS0Nfq4Zt2E45Z1z0ue8wdH2EAwH3xRqw3nb7JxznIkoDs\nCHLK5eYnMZpL1HAT11mR2SpBQcFu0yO2r4dttN2QUL9YGlcqdj+Alp/Wrvfh\ngVzPYYrb7/mQfrtkZlZLNmCMCQwLqkV39yDT7cUOTcxRRxGWrvGFYn85QV4z\nwNZMzogg6bNCNiTJ6lhP5NMyYxgK4jhtPpZgq7skfJU/D3wWK4axs63bwrN8\nfXaGv7SwXF4GJjakzPRAaoMTevwZ97MwzXHp9ErOfptW/z+SHDNS6eeKBszQ\nI1XWVhb60czNPWroUfv2mhappBzCBK2cCSK/yo+0ELCw1fBSmACgO4WE3l6X\nh+BjT4a8FZlNPT2XIVazvtofQyxxnErGEO5DGoNqwh06vWS7Njptqk27FcoR\nx9KufMG15qhJ23G+75wFtv60o74H7vYGA+nEaVFwmyWGBqHCpq0z5jVmXmdZ\nKMJSQqB6LSyhWcnsObp43gVQDtYQgBEdbtg/Em1613EiDQ0WDL5JUZCAdOS/\ns5elqyzvThAgoSqlrrZhTQ7w23CqZRBPuKYN7rLbTriQtyz6x4oNKwBmmBX2\nKx+l\r\n=Xoob\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDagR69A7Jy2XrsFh0WP7vaMCdLaAdVVUUucqGFuvnJMwIgEOZWdEUTOv1jg5oRv4172Dw/EzyAuI55zwXwPIp0WOE="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190522_1558508790353_0.4958890140834349"},"_hasShrinkwrap":false},"0.13.0-nightly.20190523":{"name":"brs","version":"0.13.0-nightly.20190523","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190523","dist":{"shasum":"33154c722c899a6e6394ac7743385af3f3cf4dca","integrity":"sha512-AeVyAwdBqmV7ZQ7PSGphQflIkIxZmPwQRl1mBZ37a9Yi+MB1ARbYNJ2bGBUBoYJoEc8wUlNFeDtu4FmiuSK+Cg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190523.tgz","fileCount":114,"unpackedSize":668936,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5kZ3CRA9TVsSAnZWagAAqg4P/i1Ti2kkvXa1iD7NYH9m\n2rJGg5JJslsV83W8ksrJOHauAmB3wuK3Bn5Pgaq8iGdNE9RdEXqgL8xLiCD8\nyOzUOb1IbI7ryY33nohLhBndImtESJlqh19phdXj5YpN69n4J08jwKJoWUzZ\nTfKuoGFJxP1K2+w8vFFGpGzU7JJ/TL7/ONkVZm4qvwwliFfLl5t4kFqIEZZn\n0rDjq+ZOfR1ornZC8MB24aR+iTyrRDWNNk9czqWfX1fICnEhD2xL/XVIApLp\n36il3R9XYGZlYN9bjfaRztvqiv9+HO2KP2X1sDtddLV9G4Tj7FVF2JF2C4bb\n5faJW21SZtdoW2Z+qKc+aksBfoebrmGI64KZwrVYttHq0+3dTz3ocY9bjO5Q\nHEreEGo9u4tItJ+ghIOmHhlW5daxaUyYWaLb7z9t75yF1DURIDzYEygxpisb\n+TdxnL6XNicrSxwZndDhmcL8TFTDm+o9Cf+/Zj4mn045IJv/mVvpdoherGPy\nlePktN7jUAPH+lC8v0PN0zLzbUeaz8ZS4GxKtIZMQEgyBFp1OvZX+vYRCqrR\nLnuMJ7YR5lUAFmHiQgdN5nvW0wBxN6b4ejT9Zl5Y0cKhKL2k1Y3ecedhySRV\nvZ/2ewQbulpCHX08W4N85I8n1Mx/vYGsU8pITo8gK9559FU/LRfOikbOuCBV\nWN+/\r\n=ysm3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKDPAqFp/h17OPkSqLqLjb7rLBp8vPqLGmr0KmByYznwIhAOhM2QLPYHJ1bcSw7qUfES6mNCUItApxvsSt8xP/kQ1c"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190523_1558595190460_0.18002380860801503"},"_hasShrinkwrap":false},"0.13.0-nightly.20190524":{"name":"brs","version":"0.13.0-nightly.20190524","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prepublishOnly":"npm-run-all --serial clean build lint test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","jest":"^24.0.0","jest-junit":"^6.1.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-language-service":"^0.9.9","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190524","dist":{"shasum":"3fc10b6bef007d80217e3b5ce6ee81714040a771","integrity":"sha512-nBg77bjVyVJYwM0zj4A8j4JwwhfLXwmTw1ZPZhsffpi3yBfFRrum1At93jDmHGzpsQv31GCc9xEmnWgBFr6BJA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190524.tgz","fileCount":114,"unpackedSize":669020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc55f7CRA9TVsSAnZWagAALMYP/jgKaxhltUSstre1oJch\nDIisq3+C58R7LbiAYyHj9bo5rvXGaoTeevDLr7rxa+YN0kvBBtZTINrtB9vO\nA12po8Je3pXvLH9Kdsq2rsfLD4o1tvLpf+GspyG1VP46P8QGGkXM4BCOaVDD\nwp+aFt/GUe/nvQSDlE6z8SvLynqAZ69OC+SNxcDM24qVeLes1efvc1SFgpKM\nMWCoLM7wutLIgEB/nidpbGhTAxfnVfYSpV6pcl72kCwH5FwsLlBvmWpB8DNR\nX+4Bm5MxN2WXMtCJlsrxMhJ9ho0fnzAvaGoJspqALzX4g5lDVQjPpMs7fJ/O\n1cFCC9YLvvFT5mU0tkzTncW2gTlD4O9iUFSdvomCZJc8GwFQ0tHI6zJQ0tpz\n2/MRIe89tacJZR10iz9klpfVxQX2C7aJKEl7CPIOXMI2xO9wmhrPt4iIQtpj\nmGBtSiHQpFgT21BjZiDInM2Gmne9ftR9JK3hghQWekoOMkA7F74sfIIkuNiF\n88MDqfiTyCH1Mn0Wm1eojx1LvPqEdCDaHRyQaTGYO6EFnh+Fsme5dunTtoOp\nYpxAF5LZSy+ZhkFmVghlROrLM54zRgEvAk1BV6fErz8612jtu7CSPeiq9Lt1\nG+lVUz8QFdEzE9i5jWeMD4uFZCjRFeNsXGr/KnvdYgWRbvAJ9Eh+9y6YbUzl\nYVRp\r\n=bfSS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGWOyMi5w/p5HF0AA6x+X5AFD6CStUqsrDiHoSb6yS/KAiEAomkSfH0btE17SZ6lfKHKEXQTaEDuAwW28oRUMv5GceU="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190524_1558681594839_0.5357885373949278"},"_hasShrinkwrap":false},"0.13.0":{"name":"brs","version":"0.13.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write '{bin,src,test}/**/*.{js,ts}'","prettier":"prettier --check '{bin,src,test}/**/*.{js,ts}'","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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) 2018, Sean Barag\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@0.13.0","dist":{"shasum":"d05f283b822d5027326a3d9e250d25a871167515","integrity":"sha512-v5LaVNEltZpO12Guw+TWicTwWF8oosioQv6Ln4u3eyBJI1WQe496QORBf1toMz1hiqmeFIGGZd+wT/T9Sepu4A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0.tgz","fileCount":114,"unpackedSize":670342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc6BhvCRA9TVsSAnZWagAA8J8P/1oJRnlWg2pWbE9H6hM7\nuLv0k0hxt+uHIwoYfCj0c3EPGa7ni5G2M6Ais41lVsoeHHfJYKlXfrEG3QMb\njHjQPog2ArTxolSVKMd4O4ocQRpT1nKa4W/93xSuWZm9yJcsJ0rgaRumbAui\nrlzZHG+5ZgDvxdPv9J1mRilZ4M7ad1Ei8h+Aw2TL+j614lt2ifa56U4eefOx\ncxt6/kS9TSh7jTSpKkEJLFR8Gva5bFXU+KD0saO1gEEw4jgWVhiCTPTu4wIz\nvHHXFRmky5LvdtaxM9ZReq08EaLabItfHVdwMkwm+Uk9VSXmc7kvAkhwrkjQ\nk7VIq2fLY7meSLSd7/A6naGVFAKRF1LIyTgO7VR4nmNrJ3/IHQbKh9TDRcFe\nLLe1MADqqau6cz6U3y92O7RDfWfyRhQRixGpjoUew2Ng8SL1auzW8J5Cc3aW\n/czcwwLrrj0E3474eUV3BOaoJdLs1/P+ftxkexFT8vvt7NoVzuSHTS/4sqcz\nBMRNGtp5vVsKLl6emmDdWX0eIQndbw680VV32Bfd10DT1oU362xbkMca/Huf\noB3qx1QPRL/tOpAQFRB+gB4JH+3oIbxXtwbfvhtBsQWCjIWbutjBNpXOZweY\nGkbGfyFcxtj9ctUtoaxENXXyOyvu68Srw7N9auIHg0FRDkIkB15VABlX29c/\nFfiF\r\n=Ppdj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAsLXbYIHSH8rIM0S9GvHDVWMVshHmUAbwQHN3/A2ovEAiEAgMHFNXT7jMWN7S/p+eH1pk09gEDZc2kFNVjNDDoVd8I="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0_1558714478839_0.3295661884887602"},"_hasShrinkwrap":false},"0.13.0-nightly.20190525":{"name":"brs","version":"0.13.0-nightly.20190525","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write '{bin,src,test}/**/*.{js,ts}'","prettier":"prettier --check '{bin,src,test}/**/*.{js,ts}'","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190525","dist":{"shasum":"40d0518f35dc3666df826078b3287767fe580ead","integrity":"sha512-B/xEKk8fnlToATdnUGV6Le/PFPaKl6R5l1nCezrwS8/o/YHlj4r8QXnFNxf6L4JA81pi67UlZXCj2UcCVjRThw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190525.tgz","fileCount":114,"unpackedSize":670359,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc6OmJCRA9TVsSAnZWagAAoy0QAIKRV0CivXz23OECahbc\nxFp5TEmC/UpUHYF3bzh5b/64s2MzP5UeFOU6Axmm9hs3FcfPzoUBk9KuaP8h\nGDhFEz4SdYMBSj4uICkdKHh1i2cfcu0C9U/M/ysjsqnua6Pn9m6R9voptANB\nxadHgNScO7fpRHVnG66c2hn4oGZt0oE684DCKOIarv5D2YD31mhdI2a7oyKd\n1/2WZxX6rey4okV+a5RppIuDlZ441VkCWqy3JRoASQ7mO8i44E0HOIbXYPnR\no1RxItBF/ApIHJDmivyMR5+rBBAytM8Pegezkbfgqo1jtxIm8rhH5K/6nKMW\ni6xjM8OHfWamZ5BrCXK9zeuNxKVA1kDPsstl5W2KgCIsAUmOtYWkH7VQ7deu\nGgrKTbzX199/EnPg6+/a+Nv+JZCYys0R8z6KLNBYbH4CtZGS2hvQqs4JgCmc\nL8sf9gGf8s3VWy+JQvlgT7k6HRnrizElwNpFC1uOq9sY+yCv4M5VV3xAUgZt\nDEShU6+ezHIudyI4aRFavy4wXNDk0+hQL8FcqJIY+26MK6gIgGcPdTpzo+UC\niDq5mAs8DwQUwft4xXbXt6F7RcCBSHdI/m3eiRmoLTGKfW5Ynmr184fvgT1P\n0S9tsPvc3/cjTDXi1vRGr9ujAE2LkIvvjmIygSz3a2BgU9CAY1KD7otx3ERA\nKWad\r\n=QxF0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGy1bISonf5NMipo8qY4asES5t3kuBcbZvS8m9wZb77/AiBnKUQmxt5zuJxoarqf5RQzAAyS9tua4+Vm1E6IVOnNAQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190525_1558768008871_0.17108642826362686"},"_hasShrinkwrap":false},"0.13.0-nightly.20190526":{"name":"brs","version":"0.13.0-nightly.20190526","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write '{bin,src,test}/**/*.{js,ts}'","prettier":"prettier --check '{bin,src,test}/**/*.{js,ts}'","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190526","dist":{"shasum":"f06abf044854b17757cdc8ca7696be57f60e73de","integrity":"sha512-GDL8DXmQoiO4k89AnhGpXbHQGDy/c19VIBUFVCwtCoA88GHMBHELZJykqHAjWCYTUpw+Z3wi6c+n8U3702/CEA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190526.tgz","fileCount":114,"unpackedSize":670410,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc6jsDCRA9TVsSAnZWagAA6YgP/1RueornI3iCzgndZdnZ\n3Fle++XTc2Do6L4BZ6vhwjgvCKhhg/iCtjVUrUS2GPHDIVYojtQYVyJUZU9H\nNWcM1qFaqgjePLazJkkWpVYR+djyQk82BG1Cuf49eAhI7geEJltyXPvj7f6g\nvtfRMNd8tIq/gvA9UbMpqv11jntLfWgsHjVgfWjrcS7F4M5+fD3T/B/aNDUY\nWQXviSJac3DqEQ8GLL8/Cn8YI6kLQlCnC4azYjMPhXCob9nAY33IMlnPWtGT\nCLvXJLSPYFHdos/nGab6MUY0/SFNMpmN4Eh86dbFhI52IINcDtvN6U0KS7v6\nvYw3LbUcEZWo7h9JQDrsmqjTkJpzHc4QpFg6T9cw+AZucyzgZFx3xgEQIkxX\noMbFQGor/1eV67xiVjgza616/CgXUrwnwg1mo79rbPeUhB6qCA0dynVWH2V9\nC1MyMHESoCRM1+ZW/7jmDE5UY4v5drIPHExDvezCqMiO+N2B3cR0njht9BZT\nL/Ii2ScOOKHaO9eCMrwlZcremcy+nl6zBZa2UY5cBeuOr1dA4UsMFpKApVcB\neaaaEparD3dGowRO0OAoajLYgw5I2praJleJFBaZZFALkQpUvQr4XP3F2Hx/\n9lhuvU/JSMiFNjrCjJmLeVCVTfl6jkDeURQP/cwYmEsIYq/gnrML1nvZ3D3C\nvf7C\r\n=DiJ4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBezqgMNyfTuENHu9I9GPkj/EKXV0RDQVg9I8l/LmzZEAiABiipu31E5EpRZXVPF3ubq98AxgaKqbudtKnEHXJuxNQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190526_1558854399900_0.33224948687382927"},"_hasShrinkwrap":false},"0.13.0-nightly.20190527":{"name":"brs","version":"0.13.0-nightly.20190527","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write '{bin,src,test}/**/*.{js,ts}'","prettier":"prettier --check '{bin,src,test}/**/*.{js,ts}'","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190527","dist":{"shasum":"0baad0bf2447fb117be686249c2ed420b518dca8","integrity":"sha512-K1UlafOf5UOuqFstnyQFXPAY8l91WaU9quHSJs6SQArnDeu+OM9/SVlAsTW24ujK2UDTKA2zmC7xDErohAe6kg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190527.tgz","fileCount":114,"unpackedSize":670410,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc64x/CRA9TVsSAnZWagAA8bwP/0JEXVlREW8yozkBKBxy\nxVbLG7avUqFgCedoEqZX8Cok0i7MMh8LJCovejDubk+ZGFIcoqeQnwZy2626\nYLFBi0aJD/sYYP54qrQ19jbVFxPJkX9MbIaBBMo+U88F/QQpqkaawtzDQm6l\nHoov1M8ZJV9lKRXjaPpkvyC9TYj+dW8efTHcDVc+cPbPBHnWgkbEjzNgBeh2\nscsd83i6UyOWS77tjWhBd/GDbunjgXM9hmnsYTST7+C1Z283Rfy8ZClcu8DZ\nkhkQbfBYquGSZKu71fkHU6YlQRZbC7ixWLekWu6OSZgoVQl4ukMbIbbzLMFO\nXxyVPtbJ9XMqTugEx7Kr0R9/DHV4kPVMld6YzwNJl43q18vRE1XhPJxHKx9D\nLKiGO8xSKJcEQZTgCeJNxzRri+2rJL9DAAbz0yteyJK7Ua9G7w2D4KEAwRJL\ngUIO9YyVV+8jNGB2Irla0ivwk6Y45olR3JjNwbRno8fhQuKGAKknXgsdttvZ\nCbKENpfi0OjtDQs9W4uDmqs1KWjx5cC0WjVfAJ6Jh9e5IoZmeC2RhfDJfjSB\nBit03dtg7o2y5ncGM2pKnzm1MWwCUaGen2g6Bja8vctniawtKa3I10PC/FFX\nAjS8lOwRa6T3VpzBpWe68DMH81HsZ5IkUCHEEFqYn3KpUYRquB7qnU2wYrHh\nGVye\r\n=oSRC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCY3ONzF88wrQoq3gP7u3LhosImaNoeONvdgwqe2VThdAIgJTxWZw4uYsQmECYfDW/DdOQPgu9mX+Bm6zUIvkGA+5o="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190527_1558940799071_0.3073749993518671"},"_hasShrinkwrap":false},"0.13.0-nightly.20190528":{"name":"brs","version":"0.13.0-nightly.20190528","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write '{bin,src,test}/**/*.{js,ts}'","prettier":"prettier --check '{bin,src,test}/**/*.{js,ts}'","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190528","dist":{"shasum":"5f65af0d03be4e87279cba92ae08b2c81c5e7786","integrity":"sha512-4lXbi7QUTqjRCQe4Dg1FdFxKs7FlglHJ+m7Jy68hiWNQxeWJKBLJgJ3JbcoR3yqn54BC8qjZz6IKsMn9wD/9dQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190528.tgz","fileCount":114,"unpackedSize":670410,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7N4ACRA9TVsSAnZWagAApzEP/3IL2eCCblK0u4ge30zt\n8Km5dyFtbRZjHG2CaHVYh2Lcv9mWyAMZGMcqZH0UtBA1z4hWQP4EmNRREvSX\nofLtnYTVtuCikM2qWEF8w5GDPOOTyu1fvPpqEkuvDwsR407JIGdVPTywN3H8\nOsA1Nkuce1DDDHsB+1R7/4xYRSh0X2yTvfUHwyHbS2fjWr3nPoPlKqUkKbQh\nMIHDreSgci6CvsHK45cbSaYtOw4LbLJQdDGFsvuxbd0teMP45NbCuLhfM7Tb\nzn4x9C62DJDC2+/t6dtFUKffHr6G2MYVGTMBa0X3Woua+QwsAzzUAW2cecq8\n5273Pakr34Zvh05iGvJn6O451suB5E9b1RToLYyAFmWAfMCpuehhkH/TImWS\nsHt8DMmTS9K6jUc0WUFDifWXDJ41tfqONMo2uagIhisf6MOqIReBQ5UA6/By\nPbX2Y1c8iytoojIXKO4DiQKiicEe4vg3DjH6hB8TJC+16r3SwrkRn+SMig08\nUiLWrmCdgBDNhqNyDeUk3ApkIVEM1dnzttDnnYYBgQMmpLj+viuVb0NXwvEW\n7hhxs4GdZXdyd6hGqoIAOBStILxWw8pPDy7iFLm/6f11TAfOUOXU9xp5OPHW\naLti5gaWzySFAJjeZZwQDvqfWmMJpGIiROgEamqEHaJkwS1FTVAO5IguOZN/\nxUfa\r\n=aB9w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDyAUpWH+66oIrw+uT35NefsWiZCFWyTI2O+Iv/Yc7/TwIhAIHtYTdNEMW9B/+bn75YUEnSeN0zCpV/OKXsEtzPEZCk"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190528_1559027199283_0.23005257533722134"},"_hasShrinkwrap":false},"0.13.0-nightly.20190529":{"name":"brs","version":"0.13.0-nightly.20190529","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write '{bin,src,test}/**/*.{js,ts}'","prettier":"prettier --check '{bin,src,test}/**/*.{js,ts}'","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190529","dist":{"shasum":"7279cb8a3936c07f6e51516c8872054fbb24ac9f","integrity":"sha512-vpcYHY4wNnZfO4Zi7ZXBT3a7VyxZhWrhZ760RPgS/QCmyz9OImMnRRwRG2Co9LpbDoysz6g7/gTPVD4w/7pMVw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190529.tgz","fileCount":114,"unpackedSize":670410,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7i+ECRA9TVsSAnZWagAAZeAP/3o//5OxR7kky8y3ruxr\ng8iaS0MNlqOxLg6TjawOAp8CUkUycZPSp0axyBLHAFjU+OSg+f9xoGsI/p8C\nh+UmW1NxuEGUDdO+udo3wlypKh9+BfEcK1dS5tutqYK/VEo/p3FNa2R6sUWY\nnrkv/NNtNUNmUq/9LhVKuPYDImnFAQUkmqfY/7aoQZzhV+loC2quaKLa38ak\nXiZJFzzXRjZPkRm3rpdzI4WZh8sw3Llc3ZoiV4alfirgiO0lmjb/GlGr3v1j\nfl+kqBWASJs+6jIynxsteSlTuv5R9iz+RO0cIpNNoYgeyfLCJ+4Bduf0XLyV\na9sRDkrqGgB5Y+GAOy3VKNzRIJmKSQpoJUJFBQUZ2xmhh97wyVvgWpiWyBoG\n0mvTYvac3+ZksJtDqr8ZrovtL5gzKp/pLjt4tZLtErNndiqtxVUgOFR+Tuku\nAgXStGBiFS5gAi1xGN0P/q8GUoU1rgmDowwdKzzgvFo4pev+myx4Wg4r126l\njbRuI+E/cwGRPbfuSHwzERYLQF5nsmL8A8JSPF0kO0hlR2kalN6MeuFhpoKY\ndaWp6vK1PHiU3k6Ansr5zw6HdMfiXKxL84NWeR+rKxnIi0JZeu+19pdyphe9\nbSRi8uENrYISO4FRINJdN+thfMrqqEclI670A73WWdeQxOdSYnKRTZfPiVQP\nd//V\r\n=IThc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICO2am0IFLfSW/HaaNa7Frw1HVGHdHO5ZNR9qrMvLFrkAiEAq9eXEObFq1i393UT4UGvOsVsJc/qz6Y2RrtiQ6ORX9Y="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190529_1559113603637_0.704222785203642"},"_hasShrinkwrap":false},"0.13.0-nightly.20190530":{"name":"brs","version":"0.13.0-nightly.20190530","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190530","dist":{"shasum":"2dca5ded2c683d0a78833ca5226b57897de871f4","integrity":"sha512-rT8IP5J2Uqo7Nt3YEYxbHD9AWQhvdOnI9I3dGdNEuwvHy/e6OT1H9OHCA2bNCwPrTcISic4Ysnr7yC8I4TqWNg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190530.tgz","fileCount":114,"unpackedSize":674038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc74DxCRA9TVsSAnZWagAAX9sP/0s9eCxvRlSF+wsOOWFu\nw3tikI8HK4qNBNUPJMxVCBsAKhXAhkzRWlF9zCvOZ29leEVzdmj//8ng5dIW\nNCyvR9oBGt+dQJbsA2ZXCECTs6kdGYNDld3rlJPSMcQNoHyq013omo2LubKY\n1h8ahwpeuzudMlHJaYBYhG90ZG6EKuL2BD+IRkU/Y/teSdZT8I8MJVRONniM\nii7kSsuVYrj3QTf4TSzDCPXgbxFASyC+TssMmRQem/Z4jR+YwxfPfPTsbvc5\nLsBw0ffFE45K+dGPVoyq844h+eAylZs8CBdiz+hCrebsDsNSuiTC63BtriMZ\nl58XMyoED/vQkVo5pm/1sX4NZ51Jg/1eoBtXVqe8bz5aUOAKQ1wq+s5qzS56\nfxy7H68DvcHyV/8lOGmHV5S5uXjqw8t20HNcw5fr6ilkuUQdKwqzGoLEi0ql\nQa2Z7ub/KAM4JU5PJok9v0DmZCOkNsWZPVgCC1lCjZJGbVYa/vFLtdW0BQuK\nlCO6ObdNSWGIZ3Tb4JVeMPT4+LWWs2T3F1SrA3olX2sAxXsx2ATqETXjGg3y\nqfrQ7cgH2fzXUhZ9ob5CyvQBmUzJ2rT5eoBc8hXMUyeiU0TyB4IgfpIaNc10\n8GISb+wjeH3nDvesKV+b1PD+46ZQluiWg6f0ppOFwQlczr/t6J8OdeZlV4J6\ndjv8\r\n=DZ+T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClndoN+qtcJrTOGg8G/89ZWoR1WMK0Su21F4i8VtCBhQIgA0868vgBUo5qfgBW99ZBR2TlAFm0c/t6yRsusDoKH/c="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190530_1559199984736_0.7376947209976554"},"_hasShrinkwrap":false},"0.13.0-nightly.20190531":{"name":"brs","version":"0.13.0-nightly.20190531","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190531","dist":{"shasum":"c6b769571d4af98e891d5cca211001b2cc5359e7","integrity":"sha512-ewvAmdnWn2ih8ouvUb6kNPpop27657sVSsdM7+TWgPSY3+ggv8kpL9mhfsLEhlNCAZoQPyWULdMyNgWxxnWE3g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190531.tgz","fileCount":114,"unpackedSize":674038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8NKZCRA9TVsSAnZWagAA8vMP/3Zshuwx3/iuX0apRvna\nkcmD+mWJBR8Nur6fIIhD7uLAfXv6NxM9RCJo65BIM5wgpNApAsHrtbhYRjls\ndttV5YnqBQNd6k5D8l6Hoe9lX7YYN8uhj+N+aYkQHJ7XZ8sKxzWIHO9Plqe2\nAhMxNomyG6jzkc6K82MOYix4htTnVyfBn7GSKbp+5o7iBJ9ychRJ7hmzTPxM\n1l+FvMM70U+DXIZp5Quw0bIma9xRbxiK2alWkC5irxVBF9eijBlivTv6XNSt\nC5KRMyVjlv9HpT5rTkXEuix4zFlcV95TLkSpJscJwkTqPSfcCGLcACxEzQmR\n4DOL/1vf+StwVdPJLkchTfSHE2waFNUysDEqw+yKAxz8QNFWpBjIUgJ7eGSa\nm2foE9cX4KSH3ZThzcgS56/Fp5OocvFW32Xllp4xOnsDYJpMgP/RoHIAJl0e\nQHLSZ7BccLcYzRJHGSm0rqptHDYFIOLnAnlMovNwm0Yzjo2qsApePkYbh9C3\n3kyE+M1fRUTiOfGBjefEaliA1IuF3tRu7XHvtfSV4RsoRCeM2pIjMpSxycja\no7S75Zfw+rQH2NhUZ2Uoy7InPZtjUDFcNSaT8MhvxXCcm3uLwVqVY1wMQIGN\nP/NTp490x/7mcmkUe1wEAqf1ZYhqHRmroXf8Isw2tQmWaZoe61nVh06nol7R\n4qSv\r\n=0Zcx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF9/bQ9k3RJSIoiiPSc3Iilp0b5xxalCya3lSzoYlXpCAiEAzLb4GxlfFX4ZZCXBWbFvjRmDIPv9wT+nAIvQ0wlD+xA="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190531_1559286425205_0.3856464899993841"},"_hasShrinkwrap":false},"0.13.0-nightly.20190601":{"name":"brs","version":"0.13.0-nightly.20190601","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190601","dist":{"shasum":"ad746d0036c95da7243fb2335c730f6d557fa9e2","integrity":"sha512-knE+kgeDIVGh2NeTQK6hBQb+83pY8VRlY1bZx8xqOZyhlh9ox4m+TNBcCpfpxsNucNYQkCRVXYfNJRYjmNDVUw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190601.tgz","fileCount":114,"unpackedSize":674038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8iP0CRA9TVsSAnZWagAADQwP/juA3tSJYyvU98hXAb+i\nlEU5NRUBX5cVHysiK3Wk4NqaENlgtotDspC0sU+LoHdchKIvnTOYiuMHeNlU\nyqE1guUE99UEIBbajINSmW724oAC9tLCnQFVCsBq1nRmJX2JTTm/LnxIrtSK\n44SlgnKezcTEogF12Ew1cmmrkIDrrgV8v8ve2NJUFJ+0TBV3NLWzl1IaYlr+\nHXqTZ9IDC0zm7Ns2PxxbpY4YloRBnus/jzK9Ain70pDaZw0VrW99bGxmKPLn\n0LOw1SJix3UIGN1GByo1cnx9QAOhkGCiQXzzOiUF+DHQwVd5kcD2pxN2fmBi\neSOwIljZcz4ZiY6C+ASTlUY0CNqtkBLMRawxaTMZJzEdYJ7zyk9z5nRVFGFn\nTBxeihk8ESHBjwdEPFc4EDcixNq8iYf0pBLKxvNuxOIulmPQVEOWWcDW/6tq\nH1obdZt36jDg8jnkv/gCh44GYV/Fj1Gt4IaZDil+1coiqZfxzgUoUyiXWl3J\nL9mHqLOCcJIuErLiTFX1wxX5Ks/uelgwAUQ7hDjdauPhDfftCQ8+mjMXF266\nFamcshdCwwAdUWliW+YYlj4PnFEXE8me64RB8ByrlkVexnfbu+nFbEtUCLzb\n4pYsmJwqJyPz5YLpf6bOtAyrjQsxSELaYVKY8pl+Vxhyy8Ed5nQfKUmlSPVQ\n559h\r\n=U9/f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFz/iaWcvBP+1p9G3TZ6dpCZ3FADafky4lFxmi8jGLPqAiAIUvkxo0C8MRTbmu+zdciyjhTqRo8BinJl9bwf0zz/2w=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190601_1559372787793_0.8003534915746509"},"_hasShrinkwrap":false},"0.13.0-nightly.20190602":{"name":"brs","version":"0.13.0-nightly.20190602","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190602","dist":{"shasum":"0f61a0d70ca367aab13c6209020757f27e06534a","integrity":"sha512-BOI4MXfr3hrW1PJa7oI1sMbvYoV5ctKTWJ3gIYGrd0QqKGBKNFmDzn/Qa0ySHh9HNjInCctU26gAGR/NvQGSuA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190602.tgz","fileCount":114,"unpackedSize":674038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc83VzCRA9TVsSAnZWagAArHUP/1KPmr8cK/URIMhxqa8c\ncbYBtMDfkcQCZyCpnfAkYEJ6pv9LPk+0H9xdhNEgbMQ7GY2D1+vd+3ZOc3Nn\ngYx5gl19SId4TBytEbbrI7o+EsjTiAYgHxQxOzfKKcYLEcPjOtBLIy+hIo0r\nxHHXUOELAt2S8ZHnVOe2z79iyHDm9QodTG+aXCV2VmP2jKkbO0hpeH6v0ih6\nxFN55dr6VLo4fX4hbJKvhDTbSuz4QkI5zBeqgqcYyThE1p6vVCEFhulE367r\nEGFn/I2VlfHEtofXnCg6Qk8UXJWwxoU1J4nl3G0gZgleqt/alSp11a17zCqm\nnuuwprhojXrjnn+PEHpTrdBtx/YgNkihZ8OKUPswVpBcwvXUtkEGC2RLz2cn\n3gddDt7zuZZUUVtRUFiBI8/qMau4cpI93pEQLzdWgh9z/UY8eD6rAdOOl8m5\nLCfqHjjl4ma0g4f4TtjNmYm2vaLFyFKFHtNTvgrTb6DsNMBPQPF5DF7VWFiP\nsZGLPzVWyuAOvlBbPxyj8BsPErUtZaCRJ93/SX9C0ifyLTPEHwAc6Sy+uNMQ\n5WWUFPP/YM017miYw3DuGoBgGlfjg1tich3g2F1OtIxwVE+Q2SVhAqW9OA1y\nf7VhAhdp+uz4jfo63QcXD5S3JWPWWz+sPX8qjbY0DKmCL+atJ5Udeyr0VoL/\njAeJ\r\n=kvMg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCY/y6DgMlqIOfmRARXPbVdWWMCuVTk3qR14/w4eUi+qwIgKtQ12ygIaKTAOWQGTxpMDuDwkqOA52nimhJrAH1wYfQ="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190602_1559459186924_0.3704437817727311"},"_hasShrinkwrap":false},"0.13.0-nightly.20190603":{"name":"brs","version":"0.13.0-nightly.20190603","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190603","dist":{"shasum":"313ed52579855194cef0301825ee0accc455ce11","integrity":"sha512-U9VaIEJ+4fTDicaij27EIhmiQD8PI/OcKh8AiaBuBd5deUjwAcwngCWtSGBAlIXN+3rUpt7AUxKlUshAPSEjVw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190603.tgz","fileCount":114,"unpackedSize":674038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc9McNCRA9TVsSAnZWagAAoYkP/3rXV9WTw7IHf4cP4TVy\nmm8O6IGPuKv5GcUHDpJT1ya0XU1kQJUb7GpMGSUBhVRsZRGn8RHRncZKkmOK\njtohT0g2f8KyAOS+wj0KtDe/A2jFWyi9NaCcgzF2meaSLDdcnSs6yAsO8b2Z\ngxqxxgrPxkeXR/KUqrebx05Pn3oGptqI/w2+RcGqRP6Z6CVgqpg5vJiU9kLN\n7ceLzb7LuNiTRvKHD2nQRzF7+W74j74Kodlr1a42CKOuQb/wKxvDheKWZ57L\no1qMwLH0Di76NtbOHCor+r/FMUkpzvtIApLL5XrYNYwwGuRB5+eXmG0qjxsC\n8uGwEZUgBsed6f8pQCJWPOEwCwmeev9KyUmcQ5beocIyiUE16x4OwkSKQ5VW\nryo7D6J0tYC38w5qhPdWvzmO0a3NHGAzPEKFOdCyA6vevyefSXhseAL222uQ\no3KWXv10ofOEmGlo8BhgNVuoWi7J1GQ/PDNG5TcYzBSTZ2VC8c33KUBK/Xro\nuxDZz5Fg9B+Unfwp0IhO/f0zIYrhfHWU8rPQ5GzLucMvUKlxOigtZmxNbh2O\nv4ab/JQygEOAWIO9aZ8m1q/imAzOqOahrKS/Ws2sLdExJcXYBUtmqY8ncIU0\nE0ZPUqKULcnix1QuQDRGlqaGzgbT/e4j+PoZXfUERxAaWqFvwrfOOTs2Wrr7\ng81X\r\n=YKTq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCP7yxIbeJPQh8EL8LLFrKsNQa8Bu6sx8/M4OBhI5BbOgIhAOZVfd3opVptXUyGZgkGKuGEHtuJtzfG/EcavZRNoqGi"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190603_1559545612873_0.5624426640932216"},"_hasShrinkwrap":false},"0.13.0-nightly.20190604":{"name":"brs","version":"0.13.0-nightly.20190604","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190604","dist":{"shasum":"54b0b8490c4815d5e36ea790ef4f58d4bb9c2fea","integrity":"sha512-MquOj5olcZrUwVy/70bzMgJcQkwYhgyx7g02L20ctK9CksloZpDygRqQjffLXbzdPsU6gd+qpkPzh+B652igww==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190604.tgz","fileCount":114,"unpackedSize":674038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc9hh1CRA9TVsSAnZWagAApakP/120ruFcqsg8ApPTBN72\nD91rAG2wU91p79MOrqS0i0RNfhIZA4tVssX//3Aox3ML+pp1smYtDBX1/id4\nKodY1LZLUi6t8k0zR1jqn0dVLvkASz9ySde4HDvKwCHbauVisOwoLvuM/3MP\nGEmldwDL8eVxl/RwkXdfknc6WG8/tVu/TcdVkfEOURYbCyVEBIyJi6e7Hn4q\nlgJbr1lTi1XiR+6c7cKLKm19zG7NyfJhVcTMOJLVX1uXfvRC99A6VhvRoY1Z\nULF02ImRBG4ZR4Yoecuu5uy655o2LvplMCep2LLmpIz+6tLDWF14LArOW77R\n5RtUGuf37NkHbrQPolqulLytFapUt2SrejeGo/8FSFg+WiDY5XgfZPoFbScO\nJzSpj+XCQF9JdCf4dW43mIBWfSlVeD4uvSBvEQmF7/phLVnMWS3s1Ny7sEWM\nSxG7h0OpQNDxyo0sw0knZlFYBaRvoWdzIgG5fA7QICrtrvJeDXyWnBey2mTH\niGiHs36bUftdZ0pqYcSbLita91QUiC2k4qlegn9IHGtjkQkQrGMUElNSTdTz\nNG6B2uoQ4KEWsj8uA+yG2Gf5Ac5U6VZWLW5+lEqndZ4u0nLr1O1Z3A+bycpe\nDc1cNv5slWsGJi3m0MvBdpC0aBGwFlJExchmDFz+POWDXVOu7ajXag1u5huh\nv1V4\r\n=RHsX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFA+XexkjXIWkavNaXEiCcZ6UvNVInOzTbXGADDnBWd/AiEAwzi3iuAP9Y1eI2zkH+Kj6fVer60GHwxm5S7+vhG61FE="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190604_1559631989266_0.44590999572271905"},"_hasShrinkwrap":false},"0.13.0-nightly.20190605":{"name":"brs","version":"0.13.0-nightly.20190605","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190605","dist":{"shasum":"a27bf1fa8c9e46f9e154ec2d65d696e6b10873d2","integrity":"sha512-g1+Nw7Nq0HVyM97G/VZktKT9ionqwUdDpVrWtqYbc2Y4rUdN6QuXFqzOQqFwd+4YXLz0c5RdxKEhdyBVBIb5ng==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190605.tgz","fileCount":114,"unpackedSize":674038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc92n/CRA9TVsSAnZWagAAuV8P/1mLqLZBjDdKmaOYJMVL\ng3uwqJueMxl214yKLuNFgPYh4jtUS4LZ+5e4mJMMe7n8WqvHQDZY0diJbJsM\njhcsQmRynaA9hqL+8kWowXORpVZ/OGyuuqwKPFlcoDUtSlBrpvA4iLN19qiC\nX7JbV34HREfERLPjdPR8O2ZFAiiiEtcf1JDyZg+zW3YIHpvE1AIhUONJMglq\n28zR1biVWMkvqQEFlZ9qBnSMNYZpwD4y7W9nIieMLpZJIU5j+IwYLLhy0lVS\ngVanHiVE82YXxIXySqP8VMEko0UFeegWggbsX2ZuQ+FNrSNp6k3YG1o8xLSe\ntc1QCLzH8W/tm9GxxduZCUqdGyIsXd09MPfCkwKs2H5TjR6ustA5OWOjPKC1\n0Ke5Q9gRtlGSv/3nGpsiNBxQTNF7gy9b+DYwm49UC49ZNn2YWl265IQcNSdc\ndamNz77NYWlmQvqzMlUJ7f2WRvHUf9qC0EE/LrBFfOA8qbdLC3gqdBdCU/Aq\noh5HcVmlO1ofu3M/PwQOogLq1W7gO/Y/RCJAKeBHpAz/reXUtxpQoi9twTjc\nH11oL0YI+k8bai4Jt8UHjGBi3urGoNATjEAsML4clGzDtOn4Nte2lLe9nUH6\nPtevHESAARYvpR044zjFAGAK9F+8aSY8njca4/EgtkAtotc5R5EJVuZ+rNvv\nlMX6\r\n=5G+I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrjvs1MeCQSrEA2VPTLxARKyvM5ZiC4DqnGDs5AiqPugIhAOzewJdxnWVFQCQfvlF1DgLpz+fDMu8ncxXZ/N5N21bK"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190605_1559718398449_0.5896771475734195"},"_hasShrinkwrap":false},"0.13.0-nightly.20190606":{"name":"brs","version":"0.13.0-nightly.20190606","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190606","dist":{"shasum":"1649832ba3f0615bb2d0e2eda267de4f3782ae58","integrity":"sha512-DVtd7vTQoSCTgzgjY+uvI3Ki3XWh+MYnV7r2IdzZXnYrKgcT3kuH6odJ3ShlpJMdpZzRhWLG5lA4KCfZWY6QAw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190606.tgz","fileCount":114,"unpackedSize":674038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+Lt9CRA9TVsSAnZWagAAd34P/2hKboJcSzqNp941bDQS\nxOZMsGQptPvQrjRM1lZAtQ5pb/19EqU4jZwWLgvKGNUrn+CkzxAkA5Gqy9O6\nJct5gZLr9MOy7kE9TWza1gEC+hWdNRKE+P6HATi1xknrktdH247iBEgTaH8t\nA7gM23ndksABPirUejq5bqFHr8ToKq4qeaczgkKwsge+jeQmV0OFlWRTd/6o\nzZak6Jq03jYpkQcF0rHvek7p2dG3xS/Q+0YIXlbHEEXNu/HuwI0iSd4K25Ni\nD6XXXHFhzvE5pEW/synWO8/XwtGP0B41Lkj8IhIT41qEPSrreIlyYof2dzoM\nmzpiE5S5rspB5MITO9BTKrXPNvrD+b6WXuPwgGb4u3phFQ/SwjnHglfg5jvO\nlT2/LhSH2N7MjzY9ZXJ8tT1NpghDlkWLnM+KnQGKOo1kQ7XscK7odZmOOiSJ\nIumXRTfwwZ+XvoTerraLwtSRf2eF+U62iyar6UAcNkWWT+YP5C6D3OPQ72GT\nD0qsSlhROLqlBcace2C9iXtG3tZJpYvmb0vn+IneP+tFdvLKpeP3uViNOnIz\nNP/liTRILECUJxrqZwguYeAKun25v1U2CwumVkHo+jfkUeUUhsYOmjm0xprp\n/EVugyOYNbsW7loBrGVHMJ56Tq23tJ+nAvtBKWNvPWvRkMvYVuqU4ysBS65L\nHEjH\r\n=6Q3D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCm9UMvCEewEVRhx0eD7HADENRf7IvgytniVX0gZbLoxwIgNZLZ5y711PEQ09w9dNmjcya2CicV8+oYXrwGIu5nseU="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190606_1559804796395_0.4582942668135983"},"_hasShrinkwrap":false},"0.13.0-nightly.20190607":{"name":"brs","version":"0.13.0-nightly.20190607","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190607","dist":{"shasum":"e4c4948bde59850d9df4ab3b3e052aa2e1260171","integrity":"sha512-0ZmrJr9FDbI/zcjdbiiPaLVNnvCtPuHkuES4AO88oqr5YSwDpQps7keloo/tTvCakcUgka7g8LjJbLoJ5hEj9A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190607.tgz","fileCount":114,"unpackedSize":674875,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+g0pCRA9TVsSAnZWagAA1Z4P/1N6e2gxvxEOtzOPeLIL\neks85Xvin5/I2KhyUIYRIsL2ZcZwIyOXE3a6iWCCoibrsDAjTzLNWpPk3OMA\nfxBAp503NQtb18Fbh7Q+Vex+Hs+GGGEn669okAHewXn++VyYe3wWVHnkQvXo\n1lohYw/2xqUxZAzkjaSPJt3GkPuXK+H47ErLVCfKwN4u/ZIp+3A/BB5YhJO7\nc88e6eyJxSqWnqCbZAoOj7OSlauqRJ4jz2GWFFt4mLEzCIAEFBn6+TkKra65\noPX7UR4SGfwdIGm8izTwx+2dQpkmrsGxaPRRh/h3PLwnsRpdiHSwhSIf2NkP\n4claZd5KWlYP6uEtpfLQgL8Muq5xrkEv+49YQbhy4Y9AsiLrMEhHB9p2PvQV\nW3CyrAuvG4nbTfsTW8gI8Bo3yPMthwe4HUIqk68qQokF12K6r6/3pYg8n2WL\nzHRBoggnNWv0b4+UQysEIshhsCtu9qN50R2R6Y9MUGBlUVl73MJ4XhEt0xkG\noDrgM0hxuHObCAdJFEUuEJ+xQTCWoEoON0A8t+iN5rR9FZTdOOhRsTtefKQx\nYiLT/s4AK3a4Nl1C1AVVqsO98+R3UqpQO8JCa+TklDZxBfmbFOJs5TxdNqu3\nNkzj4bNGX7FBaVcX/aIWoVenn8Rq/z+ww1hcs6ON5r1HWz9zZhL8HnXxUoFD\nh9Ib\r\n=YDX/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3OLyHOmh3fbkasDJkjmWR7NntPqXEhXR+3AsyfysTlwIgDsRCFo/FO/TwSr/gkPIL0MXXxeDSjzreEWxdAti7SO0="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190607_1559891240890_0.4782687469143272"},"_hasShrinkwrap":false},"0.13.0-nightly.20190608":{"name":"brs","version":"0.13.0-nightly.20190608","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190608","dist":{"shasum":"9180131dca0e3cc56722851430ab8d8b5ef9d784","integrity":"sha512-vY5lPnjy1AK0e3Zh/XdTaAWxM8eoqVWt3KiFhvZ0CdF2b7ESH0WVN6ithJ9zhuW4Ys52KkXQu9cN7x0MC/SQUw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190608.tgz","fileCount":114,"unpackedSize":674656,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+16zCRA9TVsSAnZWagAAPt0P/RtybNkHDKzMLjGzboWw\nNf6P+EAEh44oe/zT9PLSneGNqAFJAcW6Mf8BhPNXHWSgv3RDuvO5OZ92nyJ4\nRpgLvfwSw9hJS0tkAhVy1M76wc0LHjIx12qE2wflAc13wEKMYWqJ4h0iQ5Hc\n2QxQuu+GCWZr+mPH9Fjp4hNcAZ1OXeErmGkBLMAhz2eOoDGl4i5/ZyyjF8sB\nCkA7so5YinJJ2PYB3xMqajqx9G4uRejcA11SGtHPS0by0EkcrYhrEFIQQ3yr\nDzSFfiJFnn0NnEcM6oFThArIegu9KMJj8p14PfEaILcbWvfHkw+RxxnaJRGS\ndvrncXwPXAd3+bVN44BlhJTPaWWaoQ2rTKfBT6B4ljHgj/8ctuKQ/FhwSu9E\nz0LICxRfDbG3F/7wYM5Tu1O8G4Da8HrabhA964jBAG1ypvG0qR0i3FtDS0f0\nVLYaBUCIfGHO+vJ/csKOWCuDFrQQNn3ZYRSPmR+DQX9Jf3itT39oxTfytn0r\ncLCJO8QqW8sy6P3UqHfdWM1AQ4WVgz/FvVzrd1Zp4qFOL3w6NGmdOC6lo1BC\nGYNENW25xSOXSPLyUfkxnZCauZq7fiG1KQj4lKVIGThFLVl6wL/OkNqbEONf\n3JP4QafjkuoMeBSP6myb1bp1RHgSGaCEPQwAxUamg9pyOR6vODm5nB8gpF4z\nYj8Q\r\n=bwK5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUWbjZ0KWbYv7G8iClh8ClzjhL6vzSvMt9gYbcr5J6sAIhAKqzC3iHhWIj7xxBBwrP0tVq1WeoYnKFIsJD5dimZ0UJ"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190608_1559977650434_0.8382594357463824"},"_hasShrinkwrap":false},"0.13.0-nightly.20190609":{"name":"brs","version":"0.13.0-nightly.20190609","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190609","dist":{"shasum":"4c1fe725c3c5bcdb01e304a8f521a7efad6b35be","integrity":"sha512-C7MO3ljNQgzAAG9vKQkHOIC6e7SN3bseDbVBKTbNtsMUtosPI3exd1iobKhZ76yuUTZwuIVIx7hBzm7RIVB0bw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190609.tgz","fileCount":114,"unpackedSize":674656,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc/LAPCRA9TVsSAnZWagAARMMP/07qOCaF9bXH7+QrcRVa\nkY1O9PG6wMsgJq2Oy8s7aMhhCUtakLMPlUTUUrK6St/KECp5lS/IU2zg30mj\nJCNom/y+eNhn4M6pKk2zqZYxcpcgRQmITuMIzqZJDGJRhTj3wU1iZ0cVCmel\nkq/UkzdotBmkWToFXF4fnmmuANuU25Og5nE4Y1CuCOE+mR0vocv0nmRKgs+N\nAtBksesxkfGqRbyfyNH2OTT8zBcycswYy244d1vbM1sHvSJ+b6n6x+dODRwn\nYPjD4xKb92kHtwNZwTqONUISXkLS9Ovtn8bkvJ4fJPfJcppQkfKeqx50MEH0\nrqDOfEcG1UTLm3YTeVLzY4APQ6Jp/j6LtsXZKEA7qEi2lhSTo6UXppF0uZp9\n+N/a7kBY3SNMI3NfM3PDdVjrPWQjptCthu9CD9BNWr1ZLQyWa7QDRnULXsnM\ne0ZagJVWCnIizP7pL90hJ89IVJDWVG1dhWPuKIBk9T+S6XdBdoGGB1KSixj/\nVicf2qBmTe9sFTZWDRadhwphfRBG/Av5uaUAKaX2nzx/fvZbiZQiKVtNfOFs\nRtn4HIxSyoTHcgh4eMvVKAjrWQo8XT/gmei8MYRXWDchFe6YB5AGTyL9vNcS\nwmY1MCjPQUw5fDO7PMCw86mrNbp4g2uDRNQIgTIbJloYeKDvPxFeHyNst/7b\nmkP/\r\n=IDjM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBtc/r24MHb6cmoKL2P7yZsET+xEKBsSKa6YU4zi41QmAiAggHz7bIv1u2MErNWzdGmiPz+wcxE2Ot+aq7V3kHgpsA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190609_1560064014858_0.17782911537155766"},"_hasShrinkwrap":false},"0.13.0-nightly.20190610":{"name":"brs","version":"0.13.0-nightly.20190610","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190610","dist":{"shasum":"d4a6c73cdcd50b7ca684e47af05dc9b3755dd381","integrity":"sha512-uEnXZfEZtp/mlcTIBwFPig9W7a8pXFjZLAJ8MrMpVmLfz6txDgJTTyWgbiUu9wES7voNbowUrNOg2fgaRsaynw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190610.tgz","fileCount":114,"unpackedSize":674656,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc/gFuCRA9TVsSAnZWagAAB6cP/2x1JDF9qrVIqNZMlvze\nujonVhCF7apF2C+GmqyD+1BBeMdt4hZbdibylqDK3e8ifGa6/2PZ61QvBCJm\nHziyiuUZb9gRS/rR9MPMoZi2YV131825xAUxDORDm2PP1DWAW4eUjaQwjaB+\nb9fsKpg/zIjITltwJ5TX9PpPbRVxFVuoBpREauKzrIHn26YMaO98bR2PmmIw\nyD1WEmZyoO+7Oigxt8u9BfMgBvTscaO21OH9SW5hdTm4d4SqOth/BlAzRxIx\nwrdp40jSmA1V+lF0PqDO9gsmPlSJKPx06skBOeFfPtQhXstWXXPrAWlE80FB\n7ZCXgkvaajVkWnv8a/zhUHbhlakh2R/QV9xJ0M5nia0EYSa1Xh8uri+/Dy9n\np2JymIix8Zb2VKgLVN7yzo13BUlYsuAVJvLAzaxDZCaQ7/foBQN/lrbuWKQi\nboS4DEKCTLLm9vzishQ7kn0chkoKTovRzIFH36pgwUThR66W/gyZ7Dw7tGwa\nDzID6VMisFytnCk8sr4p+QgW/QtYi5HkgDd+a7W+ErTbpvIpejkfRnYTUsH/\nuFDSBsX8j5gBOR6RR5PdQYPQWygEINwSA5hgfj6YSAfK/PjKptVLCCz7hMQq\nY9Fj3eQG17PzZAeDqs7yl5VcZ/ffiQFffiWePK5zpAo4vT8/QlS0Uynvxojr\nwQHg\r\n=PZcW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJzURz5JP82aemZbvdF/wWt38Dq/EK4DoEI94xzWqy3QIgbg9Gyxx02uCFkocDfP9C2T8ReXl1sQlfvFffOFIibag="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190610_1560150381500_0.8520240982202847"},"_hasShrinkwrap":false},"0.13.0-nightly.20190611":{"name":"brs","version":"0.13.0-nightly.20190611","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","lolex":"^3.0.0","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190611","dist":{"shasum":"6d0770ea9ddb90d64bf7cb488b04c3a489394cda","integrity":"sha512-+lPtiNnKGH1lmNTsdbD4xyCh/BG6lYyOO51ilsPBqYMNIuyvbMGV13LuwBzpsV0LdO/7LqxOShgm6yKpKf3iRg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190611.tgz","fileCount":114,"unpackedSize":674656,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc/1MDCRA9TVsSAnZWagAAHusP/AtA3FLMJJFo1LjEs0QP\nlnSCPV5PMke0HDb8gIQF0hT9pw35zQYv19LQgbrL8UcAuRQJ2dUneTgC5sCK\nly+bfUqljAzj9c61dJR9AfTOrJc76txbTyKh2+QVFGdmPo3sc1f6PoQG1w8r\nfuJGGtd7JGzNEVOnO5/2nJj5LrPZzvbKpMtCKphl5eK3JYOlKeVLOTLH8yh9\nGlXJ8Wsv+ZWPldMouuibsO7sJX3Nq23XankqJAS3vJ2owU9B7QPQGd6UdMQ4\neQC3E9oes+NFKH//8cf9R2tTrMOn6slGINQI7qsxUVUjenJsp7ppX/ZCgJJx\nGAqilRh9VVhqw8dAoL+BNtAscaJuvcCNRHeaDt+0TkclLnzKwrAiY6wsImRz\nYS7BKN95QgC6woL+P5/ZN7nWuABp3ETkcudNiRF2/yd63bvV+kOXw1+qM671\nks4+f0sFxLarYIFiXj8MTxq8K8ynFeVTy5cUr5SVEuPe9nJgv05gAtRebgrR\n7ENZSvh64iV3VLAxu4nBa/KVDPKCDRvIe0NVhDwE5wIkp5Y4tT8Z36IUfEwa\nlscL0L/Rh8Kd7tstdtrkBM/AXodstWU7InByQ+4omHaGpaCx8Xwk87NFv3I5\nEXVdTLkaUzjqIigh2gVdUNIM87iWUHeF1L+TfL7CvRqMAlBRziOH39x7ZFRk\nyNKm\r\n=365G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCimJpVgN68WmAp0NlP5hzL15fXUtSakANRZIqG27LyQAIgTED1pjcppYYJJ7ju3rf5VMvYGCS0kfE2TaE7aQMLAJ4="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190611_1560236802153_0.5318727430539667"},"_hasShrinkwrap":false},"0.13.0-nightly.20190612":{"name":"brs","version":"0.13.0-nightly.20190612","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.13.0-nightly.20190612","dist":{"shasum":"390b36ef15fcc21a7d4deab38e94876e5cba3c9d","integrity":"sha512-aZ+POGyhk7RtujSRmCjzcEXaLj99FjPpfjY5JlWprh8mXy6xYAc1Ub/T4vkt3mQznTIWwzz5RKuU0lpgKQiWlw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.13.0-nightly.20190612.tgz","fileCount":122,"unpackedSize":727494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAKR1CRA9TVsSAnZWagAAAW4P/2/tyiBpU3rRxvgutDgp\np7ZtiHUPDL7bruPDtGKNN/JKoFqYlC3jQ/VTF+ZdxSG74pEj1KdfU4pmUHHw\n2Tg5OVRwZqYCW4176+uCT9HuoeSHL0bklMQd4STuRPLKBJiMzDvAfq0LRi47\nk/ypbqIhdvr5a/z0FHZVHJ09hCuYKNNRLIF4yoCLWZ+OLA0A3LKEh93Dkcl/\nfaybvEu3mIYkcMt9eYdR2AatvExorjwwi2Kubw8Ic7GZ2GW3ZgBxAD7/qzhj\nqPU9+B7BtMAP/gUiyZ4nmfb8wQpwKzxicrxSOXsE2ZImmLaYHaqAzwnK5skj\nice+zI428ny34dvG0rNQtzGnj/QQcl2FvkMtedXBOHD2ahSWhdQFb126CuLe\nbyh5/XTY6vxPIUHIwdJfcV15jEwtFzz5ICxyVg7Zt0vWoVkb08HJEGiUeMX4\nZ+wYxOOkAaNvwqzDv2b9D/i49cJ+6ZodXdwx463p8jMT/3dyNQHVhGHHl60a\n+0mDkea84dz6RRkfzVsXpyI/UxBglh3booyNURppxSydTIm976qEpathyj2E\n7EtEakR0Y2WgNvptuRAmvlKPuy3gTBfNRdcYXgQNTBD2NDkq7PU1ItX49z+N\nhAqu9w5ntdGtqrs5wLSaeSlkhqrsmGZ7fZwPtOQjrDgKirHFwwM0dYAQRxwR\nLcVC\r\n=zVe+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWKiLyM1jFoTADbNHa8515lTs+SKrrdKyCRLmMxLkBDQIgUh99VlPT0mPwmeOKjVA6l5O0eZBSm8ph1lPT47GJ86Y="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.13.0-nightly.20190612_1560323188407_0.15634859718081295"},"_hasShrinkwrap":false},"0.14.0":{"name":"brs","version":"0.14.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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) 2018, Sean Barag\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@0.14.0","dist":{"shasum":"9f741e593c72a02589dae08cfc25690e967d4653","integrity":"sha512-AeUGgzjzJ77uGfjaSZ5scG/Ekfzdiow+UDvZrlaSyso5N2VSXCN1V9NAh9Bz2F1NbwumTlmKCbglIEZ7U5zv2g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0.tgz","fileCount":122,"unpackedSize":736456,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAYB/CRA9TVsSAnZWagAAN0YP/i6BYxLFbYjPoCvf5JMQ\nhZmj0J1lfhY744VBrf1ZHcWKz8Fq17kACGTNWTqViWA/krWa0/Ow3zvaZlOq\nwIKnoaLV/F9wcihIffGPxcOuHIYaG7PjpI/T49OW4q/Aoxvtqajyrn065fJD\nM0na6r1opdClhiOZL7IY6ymxdqW9oQ+ol3UuM1zMM4buxPtERiEgSOwvx4AY\nSOtRkI8bRTkgWiG3BtIRu2uuX6Bkcbl2MSPXMP1UmudgmLYQVA8mS4yxHLJt\nozQTT7A94GOXpgRTrd0sdpjsILS3LCvVrVRoy0ZFRV5BMDDxnX4udg0NWk+p\nqC+cfM0p5K1Hn2UXdbFxiyk5ELP9q0PfnMpnjDSmhAwFKL5CKv1X1ZOUKnV7\nJ8qHgrEuyzIYW331tECnkj3Ddl7Dw2v1ZYHT+VbxxzdhYjdL2szExMXMSvYY\nVv9vIJH7X+LnBlUfmCfIfmJWHidZfRrG97lVSvoawsC3NO0lNWp3Cch5CPLN\nh9zFtB/Oo0Xrjqqea/Ti3l5nxgmXBmryfF6VFJOxi0Tl7V4pPRp6OSolaSWJ\nvBfKOMt8Da0cF13y5itSz2dkO0FxQ/1x7HKsDYSxdOKiqZOmtJfobpEV1RS8\nufelR1afiByzjcsVIG0LT0oHJS3aS7oQcDrpoWsX6w9ZAIWP2J0r6D7G8r1i\n1dGs\r\n=REkc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLi1ak8GQ5ro+MhDkAEQhaY0/1i/z4ptxcX5iseFljXQIhAMyk2mzijabm0rDmyH/7uacC4Qg8a/t1OdnAp/Onvr7S"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0_1560379517595_0.390931483061832"},"_hasShrinkwrap":false},"0.14.0-nightly.20190613":{"name":"brs","version":"0.14.0-nightly.20190613","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190613","dist":{"shasum":"32a65a3a5e7e92c00b894b32d4bddb48972fedbb","integrity":"sha512-+CQq7frjIBzWL7dpyQqCc502nGvORhjhWtXk37SSvVdtt6P7jzhw6EDb6Q9qwj5QppzLRp7o5wVb3WB7rYbqLg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190613.tgz","fileCount":122,"unpackedSize":736473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAfYWCRA9TVsSAnZWagAAlXcQAKIKoCOtNNZ/yuEWDnqC\n5usmsOjEArkDGJ/Auk9YTpXxiMlD13ZEyxl5LQ3yHNIpsJxg727spmnVQJOa\nwNecxL4d7gixYGP13yTsLzY5RjQnV0uYm8qkSE+KhIqINveGdE1VqxKq78UU\nWLX7xTOAKnNAgUVFq1eaJUf/TKY2XXuIwjBDRAapx50HONl1sB76SZL0xTLj\nS6URs71qSmg6CsAt9ehIUxRY1NUTXA43C0Blg2Ip6tmBtkMqclPWKN4a8rMg\nrLWLPMS7SNSOh5DBVerCk7U074Sq4XTAkgMv+9M3U5Jq0kOBmTEwxXLKgXIU\nCKee0CiPfzfkk5J761fuBury49ijihlVRQDUL3X60kb/M0kfmbjY2QpYy/+f\nbyu5pMR19J+9xG72A00zA6av3J04e+w5cerXdByRU0OsrgDl6+5mOs7GupEq\n26liZs9nP1JTMElISD6PCK160zzIWorQFpVs0dUI5dfa7qQHdA/7sqct8nz9\n2cUgDBiNUpC6UDUwcmFCsg7pznTFRD6YpsSfKtMtsHRLk8xUtmugf0/uVO4g\n6BfqmH6ATM5oc8/NxPrfoB/KqykIFfw3zocDiLDw/jNbd8eXRhz72R+ReBAg\n+Tqn5qjaNOGI0iWmD4Qnup8JOLBW0KXBcWvQP/3RrPgPV8Vua7bKf4fPzoZg\nj6KR\r\n=pyV1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPTDEKWQ6Y2COKO7e11iSQmNgqCzJE6YnSPdW0x2b1qwIgUreh4c9KESgYyOfX+E0pHnn5z9qVi57UJRjJgyze0Ys="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190613_1560409621536_0.424390988088055"},"_hasShrinkwrap":false},"0.14.0-nightly.20190614":{"name":"brs","version":"0.14.0-nightly.20190614","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190614","dist":{"shasum":"5d1e807d341ed5d32b1465bebb875e9b273d1b2b","integrity":"sha512-CPYFiPLGd+31/2/I2C2TZ+IjrBlRO3ySVg8DM2LDX6xsy7ugfBNKBVdQG0KNZApwtjKE1fCNB/SFTq8ehEIEVg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190614.tgz","fileCount":122,"unpackedSize":736473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdA0ePCRA9TVsSAnZWagAAsgwP/RVP8vznjBMYy0ZtEobO\ndKaKYErqfhG8SVTVCVk7bCRzrvvoIP0x+1Fm0Va3dda6cN9CKWvv0NgpMZOb\nM5N94kUDEN5mKuBv3r4khUv7KQ/nW04T4lTOJg81K/VPilePhKmpPzvCl6jX\nbp/LDhQf59vZKV1XMVoLSgxoYNZExz7l0HF9e7VTKVU26CA0iveOAqpUmwqT\nrNUFF4TtaUzzEpoauSI2krKWbxb+d+Mb3JRY+EcPbdxAUs4onAW2rfTXCBV4\nLCbuPew0Ox/lbkitfScWO8lQ3VJ9LJ1azqBf9FpS3ZFEhABlE0d6miqVm8B8\nPy11l2KQ/vLdAZQGUJFz+QpvX9rUhjce5OrIxy6TUobDecYQbfvmzK3YAr+I\nrq+fsbGHu2zDR7HtR/SVwPScgg9lRz9ICTyAt5z7/ejwjOj6Ix19dPP0zWji\nenYfmF28SWvykJdFwkdYHWHmjJywnIHRwv10bUY2mURVOkJIF5mUhp3CXOPd\n7HPVcsV7G1GMVVVzj/qZEM2/2xdj5kkXiLrhJQx7E+nlQUP4R2LaPPpyU8ll\nL4tWkC81jnV8SIWuexic5Ko6HP+AdJcikBPk6rJnBBlY/8+RodGgVXG9uESR\n1S2j9oHtKaIR8YpexHqB9/byVrVdV5Kjya/ohnG3it2JJyAsSW5fr3tCf59v\nKd2g\r\n=G2rM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDof5BG+yR+SYC+IRWPC+vuOFqf3Gg4/egGLoimrGGbVAIgDBN2u6cncccVZLBW7nlP6q4cKT9e/EwT7WOzUo0po+Y="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190614_1560496014854_0.7571014922492771"},"_hasShrinkwrap":false},"0.14.0-nightly.20190615":{"name":"brs","version":"0.14.0-nightly.20190615","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190615","dist":{"shasum":"97f358eb463020e80dae3a3335542df6e1f4fb18","integrity":"sha512-oKO3jncereHdC6xwDfoWwwTEjBu7n/pVGSl6GXeTRT3pW2bpv8BvLYh6FbYPdhOHcfhiTrWxcNndsmDe5Mmz/w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190615.tgz","fileCount":124,"unpackedSize":754360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdBJkDCRA9TVsSAnZWagAAb/gP/2cDk7h4xlVtasFGhDWF\ntvwC323MOGSI7PpqpiSM3SKRGkH/jHrJd1iVMAXj0fQme1zzs/4qsTNpC/nZ\nz0OROjzYwmys2Rc3hvjYJT8ffd/9P+vGJGu4kxvKsEpmZQ+VrMKLrN+qSD+C\nxDmM3datpyd0wJYq22AwCJBuaZP/4cUuH1qhN/rBomTd3dM2WxTsmjyhNcbF\nX3/ga3DLGD7sWA/zuiIXOtH8pfKeT+yi0/iiKxnVKnYAeOjmM+5sILei6tkU\nCUfApVZnC143KNTT3jz8zyeiPM3+fy4tiYwLZxs+fj6wX5dbFoaPheIxfsAr\nvz3cirx4eMiGqhFNES68oA9xxmT/Q4c/CcmwU4zIkk/usaSonoqE2PDHKkxI\nGGlranIR0Jo/5eBltx31TOSAO5gYdilk3i9SmGDl3AEdz4QlAFwpUTCi5B8r\nqKDRAo/yZJfU5hiCP3jXmJDv+Pjv05m6elLioyWn+yDSY5qTB0tHMmhvdvMA\n4yVw0R/COilrDngY5urY6ow2K+PEM+8g6rCcuAbpx7h/AmJVEVM2Z2cNaSoz\nAIdfq8EfEZ1fr5JmWAfLxBwu9ZIlOG+qGUCs9INLyKO506ImMdFScyv8y8e7\nIkjiNKks0gMa2vqrkWUj9fIJXWlplko48+M5CQvWEwSOeKOimwY36gOEO1pT\nhllt\r\n=ba8x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID1X2HGj0RFxxJz67sNxaqmTBuZGMR0NMLqoM3N3ozuPAiEArfmJpTzxgemaGbEvgaiMl/9N/7su3M1BDHJZ8+Ldvwk="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190615_1560582403024_0.6315205862700415"},"_hasShrinkwrap":false},"0.14.0-nightly.20190616":{"name":"brs","version":"0.14.0-nightly.20190616","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190616","dist":{"shasum":"03a61d86f4da7aca2af4291f42d5b0786461b16e","integrity":"sha512-44cBJh7LPp1SkZi8JM7QxHr6Q6jd6WWSjNvWNQnsPfxOG2C2UPTOJ240kFsMmAcrVV7HoAxrQjIvqiTgkisGvg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190616.tgz","fileCount":124,"unpackedSize":754360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdBepzCRA9TVsSAnZWagAA1u8P/0oFV4wFzDSnCp7+CrCA\nuswvj/eIwIiICX12tuvB+pIzb+pDc4dwWaHn80OhAo/qp9uL5QzXi1scdF4L\nhRHxlWLrwVbn54/NstsOsl6zYYNedVEu74mc/ypjStCL55x4sjr8cK4k+4hW\ncv3vxfhrqvfYp/LaRMitW0eE4t0S3MWniBKYxkH9q2Yi0MzPJRv70n7fCvRI\nF3sOGDoFZV9Xtmisdz4gkxpMf8JEteaNm0zcnaigN0lDDjkdFAE93IxpGKHg\nhi4DvxMzHLJSiJg82WjbmYKVKmiFtx8g71s39khVnetvrjGkcIGRYgcLSvD8\nJ5nq4zd4ZrRccv1QpGsmUVkOGlS0nzpYtIqoXxzhECI5jtFhGi3JacETPDiH\nLcWh10WzIobT1qKPAGhjI0j/g5p1BS5gic4U3ZVRKqQP5UE3Bps7y85YM3Ny\noN6CeDDAl02Oac1qVeVbY1ts0j8t53vL3b+8BYpKM4n5hXhks17+8EuqzNLA\nLIhgYjA/+216ZOMa7CWkKSCbSkNwktF3EoQmESWw0kfOUzDUq9UOKyVuDoqu\nAMJBIYTmStXpgKQ9HfF0MvkZ3Ml7tdeBCTM3w1Rk39LNVsA127D9llMQz4+D\nb6BPb5JJKSyImDZ9pdoA+2nAoKrFMF2WlnIpxxO5vGlWxbx4cAFHg4viv3MF\nxqaa\r\n=owK6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBv19SzvoJ7c7HRZ1/Dull/joC+CXRj+6mbxNHtpq1zFAiEArQb9iAt8GpK4utiKKpnbV5g0b8/luvkiqaD8z4jgeK8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190616_1560668786339_0.4316381807317258"},"_hasShrinkwrap":false},"0.14.0-nightly.20190617":{"name":"brs","version":"0.14.0-nightly.20190617","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190617","dist":{"shasum":"9cf074dee84ed7c42e896ffa4c34a5c7748b0321","integrity":"sha512-FyjaPNyPrXQEFq+k9ukb7yldnTZ8mhcr36MkyEKIXFeRiyeDQPJUdDZSTQGVjfg4LHcK3npzm+vpKF4wnkU7rg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190617.tgz","fileCount":124,"unpackedSize":754360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdBzvvCRA9TVsSAnZWagAALt4P/idfpG9c9fvtH9NRKNHF\nk4eHpyPZtrVdcRNjML7rAoAmhbTbEBPU3RsG9ejQoE4eDn1yFzHvUB/3m+sQ\nEgAZvQTZ0tUuo92/bIPqxKfgqlK1HT58+E96vUHioaUx/mhh9cPNz+PkeC62\nDTvVddTQynpftGcFxwB0EZ0wggAG2IcXDhwdmQWtLUZW2epjioCuNegQ90Bn\no19qrzVHrJM2CjFCYFF5vPWXA0Al8Radmm5EWiawlI9GMReJyw2S4BYsup8F\nxeMG00S4XS3LXmNio+Z0Qg9QzD6qOuJ3nH+ud0ApmFE+A1wAFYbiDiUO5gd1\nCkJiEUic1JmKO5upn6h6bOOihESB97MjYGiUX16AzYoAwbCb+nLn8GPa8GIg\n6Ulh0EBSItQnZINhkh6+w7KyWlhlNvDs253qSzOcYXUbRX8EFoS87MI6Sdlr\n1//gVpy4U26JRO/Ny0g701d2p42E9AhhOd3+7ItAspq7IKt3YS2Z0XQFN7un\nfKEQrTRnQSs2D6ZKFxBw8G5pPUbX72TAjANost6melout7LPjzjF+M8Ik83Z\ndsaGxl53lHbjlIHSnBAZcA+ExM4prcWaUdJLe0gejzHanfnbm1DRGMFQ4Zrr\nDlcggTnJQajpSPEIYgB84T4gxo7KKj4swxWIdMUDlsNUGx28oOOzwrkx8uuu\nRiIW\r\n=lPpw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB9modfpdvI9UTeXAxN/W9VfpRtwqDr6r/vtArSRv1L5AiBS53AOZZYmfonfKCcKDj8CF9ITHokuNQWMZpw/pkHNEg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190617_1560755182456_0.9134097667727932"},"_hasShrinkwrap":false},"0.14.0-nightly.20190618":{"name":"brs","version":"0.14.0-nightly.20190618","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190618","dist":{"shasum":"c719bc1516934af9d6478ca7e38d3fdbf4feabee","integrity":"sha512-NLHYvUlBOAfor/egRVtVV2ieNY5zWJ/AQ7zpcanFua81walpw1Y19UbEh7MAE1RIuEDRk1usiqLMWdho3GWrNw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190618.tgz","fileCount":124,"unpackedSize":754360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdCI2VCRA9TVsSAnZWagAApDEP/iUOoDPKAH1YBM4sXebz\nDKT1EJQeOyT6o/aTVLGOW5GJP2wmBZPZ6v3Zj8vAfVs/AxDJLB/oV0NK9+iL\nniVErNJDcKAlr3/ZJ6RFfCpwlwXhfAJ9a3dFhGNzMP2MaJyj6PQrTJSqN8k8\nxNDl1uDlI99nZ2V7kmcEYPS7Dksyb7D53KTcgkpfcsIxy34g2FMFd6tFukSW\ncvwcpBZoYcNDTn0KVMYBA/3fqW5cywafzMuH0UU68iS6VI5RtCxDSvlMUFgG\nZJxFAkxejAqPGGAeBdTLnkpvFOqnYWtSw7MvYfWFgnLfaDQUx7/ysJn/2ADX\nLKLdYtfZnkDClYMqLPos7sn4f1LRlxkdFrogTqotwnV8NLEP5yBWzBonoyjx\n1KathypVcuYJah/ao9t15QDGfLYudDVYynRjcG7JWPJfXyPsfl1ILYr5Uoyb\nfuzBA1SidOb0QVDxT8HHnqLu5GrSUvfCVyEmefU8Kiby8tmF6zbZIIJR1tUy\ntWxByuKz/3PNHKVDLLGGbIwj7h1WQcd7M9erDAhhGV+dQrvtJmHNsTbfZ4jw\nI0qRuoQbsKVaPmmtAeCLAQhD6NNKleBvo9rP43Xu3jU3TQfai6AuUeS04mcF\nIphZv26UjL9GrN8OeB3v7qhuOGQV3QMS59pbE4emfvW8Lw4OyQyv4IEUmL6G\nS711\r\n=Jgeg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFSZ/hwH4b5JvJ3RSyD4NJtQnbavTnDJWHTZuG3CzK0WAiEAksK4hIEMausLncHctPCZ+pvkfEebbKGwP4zBZ6TxVlo="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190618_1560841620317_0.5684432503913008"},"_hasShrinkwrap":false},"0.14.0-nightly.20190619":{"name":"brs","version":"0.14.0-nightly.20190619","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190619","dist":{"shasum":"160a9c1e91aa6d86e60e84c310bee47369ccd11b","integrity":"sha512-oh9PpTXsakaBYAEP+0E3fBAQNzJZ4+dPRbbH0hxxjZHEyrFphsQudiQpavuWdTxScp82yOoHBMC8xnsv0xJpng==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190619.tgz","fileCount":124,"unpackedSize":754360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdCd8MCRA9TVsSAnZWagAAwtMP/0KCH612l3fGg+uAow3n\nsN1/WfqchFlMGUDtyOB/pEXcBDgfAKdnS+6SvcuJBWhNyPvCMUoxl2XUVTN3\nWGtUPTLwhTuJHhIuLzymJTvDeyehsPVw7MyX84CmFRIysar4wyRtKywodR4S\nlAP7h5kMsSE2G0TrY3W2GbBgZ4S7MMsVh7fSIyhYizaDrTk9qYGQEORXvB6e\nUHbsodCoBZW3frpYFFtInor1jwU32OpClV49e3bOk6YOs9YeeG1JpUJBdyty\nx0rR9d8gwLQtAoZGpp3b2q2BnKeArLiKQj5FOov0PZSMwq8pgfv9M7A4142h\nPSAWgk+SDOQJc4XQ8GxNUJKAjDzqslsQbORVR4wkL4DVrO807n3W+y53eiBC\nRIICWZDf3nkuIANFTAiC20JvBsbgLUeA0vzFpxz4HYAYx3yuPoPGalLo2A2w\n3SZAftpDWCtsadBbfM2CNDB1P+JhW8qArc/nsWChMB/YW6MK+WnlE2xYTLRX\nv7soRFySzQVi5g9mjjU41PvQwU8tPyxx5hyNqabc/7uV4DPN3qW196UW2Udu\ndswWfv46tht0uu9fcvwkA4tycOYGRgr+bVmQjAweTF3k23qNvCSCgElNijRg\n10hRn0gq0aBh6QRoNrIhuCDWSeAMTUOm+bmX4bwOaIf77VsdJ2Dv2Xiu+j5k\nKunU\r\n=G4mP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmu6oSuc8x3FV78nfmzWWH+Sd8EcutzIJen3AeaRFzJAIgHxY/xuoXvVsqexhRvf30OXgOQ4qbjfGqCeuZ5WfI+Wk="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190619_1560928011532_0.5619979555770915"},"_hasShrinkwrap":false},"0.14.0-nightly.20190620":{"name":"brs","version":"0.14.0-nightly.20190620","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190620","dist":{"shasum":"755911b0acf467299c120e6f045a565e251c0f62","integrity":"sha512-J5W078tfx3vHSSolLN0XfTVXgnmT/obpLLNqqVy3T4bi9sgjFhbX2+ezsSIorEzA8eTVe+YNO2y5pdTPZq4N4w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190620.tgz","fileCount":124,"unpackedSize":754360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdCzB5CRA9TVsSAnZWagAAp5gP/3kptMwv6zWXPux9dwui\nLhTiwbNMWzaslH3JU96UdQQbJRlsDSr4le16ZT4XH6mNx0dORzBh2H8edG+S\negpZF15ZrXmoXO8Etuv7FlqXhaZcAE/9qMKnJyZFwYVCv7Q3id5uH0mrt/sd\nDbTxYP9X6VNqnM/r7KktEK4hmghP52RoJpgzcsQlqrUpJ832ROxQKVHaksLo\n8FpViwQNCDCaRmn1gIn8XUCN4UppO1hHCd0MtGNZ1UwwVszOxqVN/+GscSoh\nGQb2PrfU1UM0bNRVHw6zt6vPsn86tPhP7y2POJ5PCPynxNHtrLqxr99+y6/i\nqNHE+GqQaI/e0fdiohe6EuTs/0DjEfzmVxAW1i+NQKxEyuTvBfT3hI23aFqK\n3ihva93k4cpHqBNvbqukFSFw3XqWGBmP+6DBUOl4DK3L61S/iQcD/DzQdwU6\n2Qy5s1zC3cQbuGCggqFi1ThdQdqx0+O92obRppJD3fVQpcTRkougwQauG3iT\npJXG+SC7zWupgvGnYb43RmBg8Gauh2tYP7k18IW6BNf5SNhYcV4AHyXom+n6\nIStCwhx4Cyx7qzMEXrNzDQ+gneTn3vx72XMUIsxnrEqPw0uMR4clZ0Qj5r5x\nB0wLKSr2T0blWK+tLwGH1Pf5jXKQBpEP0wQC8kGIjLmT7IFmw0VTqPZHwAdE\nuSo6\r\n=bheG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC18iA/eNxIKJTDlK7FI/Y0us/dZpU6yD7T6xEP4cpAawIhAP25run/QtWiGP41YcOawIFgtnYyFLOUE60PwG9rXhE5"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190620_1561014392374_0.2078032381577395"},"_hasShrinkwrap":false},"0.14.0-nightly.20190621":{"name":"brs","version":"0.14.0-nightly.20190621","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190621","dist":{"shasum":"e893c0af9455ff0a1db21dc53b26a013db236bc7","integrity":"sha512-yN1ZhtpIdvBVVLW+jaOHSaCIXvLco01QgYtGz47CvfB1rC+iqXqKOah8kJeCLazYqHkzOGSmDdEzPsC396j7aw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190621.tgz","fileCount":124,"unpackedSize":764746,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDIIOCRA9TVsSAnZWagAAOtQP/Rdb/0w/aq2XhT/CfBwC\njAz1cxi8BthgZlJtN8odBJ1Q65Hy4nd7+Ce91dtncblwz+Vcj/cWyj6mtjDr\nOsoZL8sJnQaSOZY4fpmHGXmjsRTk3PCcdDNomPJ6CAJINUmtU5x+JyrlQtj4\nJyFm98AKDBU9Q6/7yg6+W5QXE+piXBdUJmBd0Wf5jeGRTpa/yrZNyWPw9wH2\nE94G5Xd8AcvMksVnpbP7BRSj4vtpCkPUloRaMC6Z3YxXe6ULVZS/ewaDxhh6\n+XUM1oOt0kiRnPl8NzSoqkLCbMa8RRRsgDFfWKXYyD9kjEG3TL5TUZ2onXmm\nOFamqFls1Ou5P0JVhH0QQYH+GkC1xLi8tLuofPu7LZRRmfmUWhtrBEcrDGiu\nqJw1a7m6ISX3/vE7/bcUK9bUwOudL5OxGuATqMVZJvZxx42qX8pYeQIWXSEf\n8HY6TA6MImjnCSZdpF+KzA7xjop2AL3KgW42LZLH6W/fLX00AKDAWl/eY6hL\nBkZffYxguFVYSK5izG9ah4TpUkT9iCT3JGFEz8jf3q/4HAf6cG+k1r1zl+rG\nMt6MbNrkMGCW/tpZjW/p/+kwSGP/WFJL2vRKKEwOq7F9jvp8hxPruU094GHE\nu0rpplCndM9BAiELYs10e5r7gn1aA37ScHie9qcha4lVN993zpWMTM/ey+3c\n4qpA\r\n=cRo/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHSWPuIWgcnzIHzMowcK+sSXxBaBRZ1ZixlPvC7fX4USAiBpABF4fkKOQ+lqWYikdFE4LzLpDG0b/3dVXmBsfTS5bA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190621_1561100813909_0.5082584924553495"},"_hasShrinkwrap":false},"0.14.0-nightly.20190622":{"name":"brs","version":"0.14.0-nightly.20190622","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190622","dist":{"shasum":"370f0407eb7dedf2bc8ad2a6c8c067a4e1430574","integrity":"sha512-lt/Xv2hN9+9B35V76G4efRBqFFVpzIhxVutbtHur+xg+Uds35Q4Bz4AhueqP0oeiBd2exvRp1yljga3nwGIJag==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190622.tgz","fileCount":124,"unpackedSize":785476,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDdPeCRA9TVsSAnZWagAAjfwQAIdf51hIK1ewq5VpzXhM\nVfAlm8cAeTnCNYEt4yYvjDqhTJACng/BMbdkIuIm29RAWUpprQSNLzN+yPPI\ne4HGu7uJwOw1RnoZzwI2xo0KS7fpOGGDYLFSCQ7RCBkd72XE6dIZHl4tHv3A\n8UvSxVuSmxVY2y6XEPJW3KcuFUKhFP1/8LF29KIRTIzS64CB5yGpwWEeXSQf\n/ymP4pVK02Wqoa0Gx6ghZoIBFhAxUP8Q+VEm8wQUUIcTP6/vOQBrQMVYg/Dw\nSMMinHdXCWP22RRJSewKvNSOH6afZJ2gK7eOkbbK0G4Mp1SMFB7XfLRz5nOz\nIGIMVx/O9xlzrmlWo6wyd54yS6IdpI46EVEhLsou3/fEPEgNMPpu/Oao+APF\nz/UehYBLrIIyzoQNY9uyCM9ggPKK4hZC2R7Kd5oJ3pS7H0a/UKyWomMQJVgg\nL228OlL1pg4/Pm2BRG0/2v+ZcGEMXnjCNZal/vUYALcTiKy01spy34r5qv0p\nqBvpAUCShIaNjDO+JGtR1p5CSF6pBW+9tn57aScXkjmdxH7pC5/EcsN7ilQ1\nPkC/yB0lW8pJCXiZBO1+o0UqkBXzufNSPdmfpJigFjEp8hITov7K4Vpb9YT+\n1UEepc7zQ9G2Wdrp8LlF0BULZYepZQodm4vmflC8W9Vol05dCm03dHCo7wIJ\nVOwp\r\n=i8XV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFehJ9rRKIoLUj4bdAH2QjKpSTLViSy7Ow+t9Tp8iHUqAiBPW6ue9aWyMobmTbJgygGijvYlvEIJfU+zf/x9T8hmaA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190622_1561187293331_0.9170087670717668"},"_hasShrinkwrap":false},"0.14.0-nightly.20190623":{"name":"brs","version":"0.14.0-nightly.20190623","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190623","dist":{"shasum":"205d9ea650071587137d125e8594db393e3b349a","integrity":"sha512-V5Q4LaQnD3GqellzIKzF1w5JWo8NIEk92WH8M0AfEitDWMMxb69nQmHc13VG8tKV65FZ+qxviA/6sjg48reCUA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190623.tgz","fileCount":124,"unpackedSize":785476,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDyTwCRA9TVsSAnZWagAAAUAP/2t88ARY8MtN44mAE7ZB\nPx4jjc97HLErFvNloCrFvBI7g94Z2AV3p9Mo+Smh6+d3v235o3V5mmTE94qm\nrecc0qslU2lzKhsjH4FPKpJwQF882IcdMYB5Vczz5a4m9csafwGRNW0aJGmi\nU6+EtTLDPIXtZ8eLcxzAzf2gHB6ar37mGzif8kQW5Pxnq2a8cCd8lg4bv3qa\n0wUvIsdUF52lQWl7tGkOe3rFqQFxw6XFEdToDVipNefajqERnz/mP7ytGSvy\nZP7+LgM+gBdkALQg7IvOngdv8mzaUWOlFXqZk+QIR7ta9C82ncLobRGNKYiV\nbiZMa1KtV68+BnkalOe7pCkrvuWJDHGltRXTHebfXrNNNE4Vbxi93Jb1JJAp\nz/3CdBeqAQzF07zmsoY1RUNVIXgL+s/ErStUil3yywF6TS0klzC0sBIV/LSa\nJ1t1ay12Uy0mNM1kOawayhO29ZbhpjSXZcX9LF4c7hz15IjDyalGngEa0NKe\nuBNIN7gFffDFmAb0hq3oZFk1KDXb+j7MZT2fWTMW+fdJRkXnH0AF+8igIqEk\nE4ryC6VNGkXxB651bmDW0mQC6CaR3CLYGvvCUtOxdzPTHfpWCNeeljPA/N1W\nuzH+fmvlZMkLrtYWGwrWBUteMDCMRoiFJTntigHH+zWPL6Fzqyd2hOpsCC4i\n90GY\r\n=60H6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIERvGeF6w0n/dEqgL6QuART2vc3KzoAKZvt0f8F/2xmjAiAJ/j+J9UtqGocjItCkegqk+yhcqUfMQ2StOiaIDtcy6g=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190623_1561273583595_0.8848510001593148"},"_hasShrinkwrap":false},"0.14.0-nightly.20190624":{"name":"brs","version":"0.14.0-nightly.20190624","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190624","dist":{"shasum":"40bcffdcd9ef9df4d211ca6bf8c2079e868b32d3","integrity":"sha512-vuM9MObykeRUAwOmu6mvzSRFwJGPwW1TjzMStezqD6i4kNynequKHKz0D9lJdIGmFC13EzSuh/e9cM+jV63lBw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190624.tgz","fileCount":124,"unpackedSize":785476,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEHaKCRA9TVsSAnZWagAA7zIP/2nyyIjtFd4r5ToXhg7o\njPJdlupfTdSXOXz9elarznnPhNMdaCf+BD6RdRekU+bPD0+uGT/IGsMl+/1y\n6+FAZPkpM8wHqNt6hViIWLusnh7DegK9wGJsc5Gt58ZBMKVjpdxX5RcFSp1I\nAS1/9hzvhkR6pzudBO1Glk26JYZxeEfMhkZN1DG7Jh4z266m07ht8AdGpRnX\nITMMfDrGMyEwKpUU0AARSbQ7dvp6yk7f6SIaURFfBCtn4wdepAnzFaKksp06\nuZL6At62Sdykm+AGbZD+BwDAFWU8nQnWZLPf5PZaV06PWIglpTls9/9nOrBi\ncdDR4WzqTvzSr70U4xWFTPfwdQXg2U0dWEy3Vqc4RuHwbUQ+1YBKQL1uskeV\n/iQHogj6zqi19yn7T7rOeTJOFXUuoI8UPjZPDlmfzntMfsJiUTPHc21+KoIy\nc02ELavghc02rrNwdpKoBloEnQ23CEL5mBTITOG7VEDdGIoU/PaAPLKUcitO\nFyApLQAJIe92vfaCm+FQWshpS5utHkBLygvZ/su7w0PaIdN40XjXNoGaKjMY\n88SYIr8SwfPUutwZkjccAPKYk9z+ALdWS7zQ5HtUx166owlT6GtZaht998FQ\nsLxFBiTm/m9ZWuGArVvYZXWOhUDN3k+yLMTreerQf5Gh138Ijj1RytAQoPei\ny/X9\r\n=KaLP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDV6br8zk5i0gZEYput8RdSGqtKePb/4jQ1RJ7CnCIMxQIgdJ8LNscHhRHCVwEcnyYIWUxegLmgbtMb62Zeg4tNA5k="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190624_1561360009516_0.39414517771651947"},"_hasShrinkwrap":false},"0.14.0-nightly.20190625":{"name":"brs","version":"0.14.0-nightly.20190625","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190625","dist":{"shasum":"f0c2cd3a272b2131fcc84851d256641061090112","integrity":"sha512-DEyN0H7tl6WzHazmSNv5qCZm/HpFLbphkKmn7ZQpj/rknzm/r06o2Qc2L2HeISBw60HcmKm7lROjIs6kiub/Ew==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190625.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEcgKCRA9TVsSAnZWagAATNcP/3p06gLfgKmLqVmNAu5l\nnxTw9WixD1iOudqAKG0RRpT+BfZLUgNqZBsIc7n9FbWGNMZ4teBoYHfCpUAm\npJsLg5QQkRK9Pr+p1B1Ib4x5VXezd8yMOmEuZJ4iZeYbehg+RNVt3tItNM2O\noBpQERGgIQ5n+NUc/db+uOHYxE7AYnQJENHSD3GZrarxV2u+fmFU5rMXNXlf\nb0vdiiKDVNPTZjP725mCcxYfOmU9gy/gyD8yj/3Q1GbMnx7aygithopmTBpj\nqokKNW0L15s2/WJTl1Ya1z+Tyrr8+43VrvnwusGY3sjCObJAmSXQk3XJ1qlh\nqDAgRMrDLmtdT3WViMFVLJX8cg5rNKxA+R4JYd2ZyjQISBVOrOiNN7Bh4q4o\neBv7EHjRpoErHMk0iK8MY1Zqs0LpGo+6xgqSn0UJrvBsBQBXW6unbGuCNCLj\nNC62BouXB/gYjPEKNygMXNzyUMkiQKIHWoDiNAkgDIR3QVfP4wforYnX6Tap\nzDsnfXQCvFaoJR3e0CeqGvgUJCp6VSrJz9Ja9W8nKBHN2z28gUrBjghN/zSl\nwIdNOQDC2MCBbrnjezvrc4tnyoptOxES7HI4InDSIL2GEaLDcIc5SxQmA9pi\nOUVe8cu7HvVTBgIvGKdk2lfJJP8SrXEzZvCRECb/hLQl70QRdAgCqQZtFB1V\n6lQ9\r\n=NyHm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEsyEPMvktrvM0TcWeUwGGkk5XloCUuRVI9PYzW1u8fAIhANpAV+1zT/MaTGUd+z7DjWhf3ZGwI8sKaj8/9AiWDZld"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190625_1561446409598_0.03133647819593355"},"_hasShrinkwrap":false},"0.14.0-nightly.20190626":{"name":"brs","version":"0.14.0-nightly.20190626","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190626","dist":{"shasum":"4ee85989c4a99185d019fdb5295b2989403ad793","integrity":"sha512-8y3FhDmnhuWi4U4ScSAGKrEPJCMfftpp4slGoQY6yp4qx2A3yo5TM+2v83sgd/4ZPmaLa2BndjlnW626AIW3jg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190626.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdExmDCRA9TVsSAnZWagAAf7QP/AruzHJ5WnRmHe1sbirM\n7aeGTMAS4wUXgb1jst0VcjE7ziTp3+iSczkieOfDyJvSbScN728X/9qPuClo\nJdJQnByTE9t2aezbh0qgvHitIETyjWvCRvnm0bHC0tqd2FJ9yI+NOpd29jm1\nLpeTmqICjrTiW+B2VERD1E79OZpQGLF9q3IzmTzE3clsWJ8Ch75Z37wz1MeV\nwEtogyOPastir+NUJyZ3rPNR+40SojNJGl7zeEh/buBEanVSyuLG7WXOthja\niJh+8rgI4cnbv4bfxsLKLcfquP/Jn3y/D9r3x/m5z3K0d+MLbxTZQgt3ynhg\nU57eiNndwEB/7o230y3d5Our0odOd0Oy7tDXJS/Pg2fGqxA86HRAgcef0V4o\nTku2UMq5IhG6paYp3evy3/dTWwywdlvGlYMleIwuJroIxIyaRmk4kSaFW0tQ\nI08YcPqJE3p31oMrLht8O1nLrgN+DX6pp6oIhJmIDwt220MXLQUFwtSZ1fLr\nnyhb0am8dl4cu86HLSpdUVqo1X5ekNyuqlPAATeDVxbLL7D5wN1qUtZozN6R\n9Z/Sg+I+hzXhmeBdxwxkr5Ws9OHksOIj3LNdMTy2ZlC3CwpEJraLaeKTFbM3\nbVhb8mbUDb74y022yl9zvUpqa1r2IHPCiojJpopvslTQTmiZNepkTzyvHF2U\n6W8b\r\n=XCsS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHXQJhNhHEc3ptWVKtDzo6sf6sFp01xTB0OIDCrb/L44AiEAlGdLqLy6BLJ79koD8cVEpMBadwQ0RxB1ViBRa53+0Yc="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190626_1561532802372_0.6626386917415581"},"_hasShrinkwrap":false},"0.14.0-nightly.20190627":{"name":"brs","version":"0.14.0-nightly.20190627","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190627","dist":{"shasum":"7fb68a1d0d608a7163c2bd327668390d4a9b3c48","integrity":"sha512-dn7k/nzBG40a6bHMc1M7OqLRpuDFxn5IvDwdS71x97DiHfZ+iZz3OLJpymfWoQnBaugf3ntCabf7TCWgpiaQQA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190627.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFGsdCRA9TVsSAnZWagAAGOkP/3AzE+Ou9YLOVvDl2A0P\nYdYyYCMASXSZFsgxfxQOKdL3di4CWXETv2P9ZhnNZKPm4Jhw7URXi/XqNuF8\nnEui4yPvdwyYsrFuW4h0+cVGKPDHA8FWbBb7aeywdspR4AdqbJuDZIakR3Or\n20cE2kmwVbkldkO7j+JUOd9Vcf3doIBbqXWJZAHVeHABeWeFxAOJuGagfrTA\ngE3moiMWIvzeMKICRmWM3eKfwe4cS5pwQP7L6EQ9wU7AOnmzwrocb/DtN9xN\nIYHrx6XpPH90Vc/l9jQJgqa1/eyqodHXhMgWirPGbPEHfeZdhBQpaNxr4zrr\nxSxoAoIby/1EQhDVLvbMFwxoNtjk6E9+Hbk8mA7MnxZ0IumoYgpGuM91Xwy6\nOCoZG+ShjBa9KmFeBpwlw4yAmxm3Va53yB/wMiNoVKqfMmNPm+1mmDJgcRnV\nSJDRF90T0pEzjZtsqkPmd2fsM8i0a99aPd8DuG5VvXtMK1JJxUErgmXXyYxm\nbuVoUNE8nT96UmBgApTpC+mzt/w7IwW0iMJ079TdWHHOOiP05Pebqm6ePC3D\nFkKU7liLRiwSq1+mbRRjV3tTjE/q9Unrt35PKGOwXHMTAc40r+ijqu2gMP31\nPHs1qo75bAVImDHChAUeeRxNDjbIe3NIOE6FMju/XkKTZG0y/SRlN20eaBwC\nZBxB\r\n=7MA3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMBPZCsA5mIYocBbAMfYnnuIuBJwBAH7wXm6Yl59iPDwIhAKKqHhLcn+32DqB7TCe2CTJPMvouOkFPGikM2UZz2Hin"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190627_1561619228461_0.6934560500489579"},"_hasShrinkwrap":false},"0.14.0-nightly.20190628":{"name":"brs","version":"0.14.0-nightly.20190628","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190628","dist":{"shasum":"e858c3c05435b85feb90701f543053114f0d6deb","integrity":"sha512-q4gyw2FpRZCHUoC5b5BxJC11tVi9+UbGYCxAw/qKf6l90gjJAP49uCGxODVrppABpUyJpHUIu/xv4ZYw494pNA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190628.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFbyXCRA9TVsSAnZWagAARe0P/2gMoqmPI6EyvSvQn99N\nb6JI5d5BjvlvRQQ6XaRWanPpzVS8zSghoJRWjVWpuLSQnn9vBdv1gX7RusSU\n2Hyu3U8LonJ4tEJhS1PElqoz2WyubKjsLlVavBrECJ989IbOOkIT5kRTrCbV\nXwN8f9pCGQ3Q409JE6veZpFQX5pDfHyPpq7L8FpS+71ED8DUZnB/cZVyz0Oc\niG+XXFCjV00H0nsU0gtGuucx+22SmLRT5Ee9Ql06RHHfHt5kiZmjX5Y/EUCN\nEkvjfCtlQshbsxZ/XZbJDU8hvLq1bAiyiN3tZ5paoSz+ZZ2+BVLC8M6zin3m\nKJMn9p0RernpPCE/7RSvIP4XGiD/d+iLhqLJAHYJYW6Fov86SF8gZFxmVSJc\nI/dfXWLfEbk3jELIQbpA2Xed9JMtCQV681FZDKKkFmckH38Jkko6JdChHolU\nypGFiJGw8AOpelhfAjL40m7WNM8vCKygaErO1wyzhnEGCQXd9zYPKGcLc61s\nPcNxRWIX4vgoKtj2iS+1Cz6VVZ1CLuhdeLL322TqxTZK+WkDFB8b7KqJRbxF\nYQLxlVmuIJvp3nSEl5woKCSqgNt2IK/OGwWZs+Hjaz4VdPaSufp00F0k+prX\nsFDD2Nlt9ufa3ozlxt1G/hOEKuQBRDni5h3p27792QFaHsBkvoow0khkwKE5\nD6h8\r\n=iAKt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCySi/DrwDobhuivfDHEFZlrjPFK8xSuxVHoylVuBqPtwIgGZpI3eNo/ZcZ83tBbvxfX1jlN7gyHbhSuLr8nhwuDL8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190628_1561705622999_0.47681071510302075"},"_hasShrinkwrap":false},"0.14.0-nightly.20190629":{"name":"brs","version":"0.14.0-nightly.20190629","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190629","dist":{"shasum":"55e56e1db18b513216072db4ce81c2818a94b7b6","integrity":"sha512-qXz9POj4vJdHpTS4i4rRYgEPZXheLy+ezheOOVW+rI0MTnYuknP0oARUgfsbC5jVdkLAWHlNNTUEVgpjKcPWyw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190629.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFw31CRA9TVsSAnZWagAAgb0P/AmEvmKAgOU7pacC2aym\nDz6OvEbwy8dYxhulPc0cPnGTkZUus0BnaayFb5hb/Sks5vShh3/Xbwo+W2xz\nP+Tio+RFVjqipz7xrwqJ1bZ+R+Md1hLLLC12ELaAkoAi4TFwGqhdJLA5mTEu\nmps55ghmTDcXY2emBwEGAWE4Sbk0qiyljaSiGtN4X8mzoZUngANNsuIgz+Ir\nUGkzERdXfPh1R/shesMjUrwrBfWjW+J/g/KsCo1roWqY0a3C72lWKiqyqacM\nuPjQMhHk1IsfqDBHz6p0+ofGSnxNAy39A2+F6TACO78cHbIL2OH+gIYTWkY1\n74axxycK0TJUVielK1drvwDjPOLo4dTRkvALdd9zfEO5iBkhSe/+RX5sFFEv\nOZe/wHLd7E9nD2woKJHZp/ULCd51HehWrzGJg9FkgH+1s61TKrMGSG8MLoer\nRzl9hiqPQsTZI84Dp9uYTO7q0E1QXX5hdVwzGJ5J+YdnbrxdWtfhO1qMzw7O\nXEdR46ViPRFDB0ZrP/h9ZTl+GtqslWDAAR5S513wnQ8W4oYIFVuwwE3jHw0B\nW6SYKE4T38/ItOuRCyaRWu26TlzDF7qm/ytnAw0iDz6sV9peQ/FBKEnCH5gQ\nzuWgnk0xUheLgVZw9OCRn9+hgbZR2z3er9+BU6WXVtPU5aU7pxiwqA5SGTSt\ngr78\r\n=g/GQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEr2Dw6iys+Y3xPERAu3O2GxQlfreOs5r8r9xIwMkn2hAiA2l15AeHiXUOsnKhd3GKCAPwiJJdGBP+qaJR9NAorPcw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190629_1561791988427_0.2540356273380495"},"_hasShrinkwrap":false},"0.14.0-nightly.20190630":{"name":"brs","version":"0.14.0-nightly.20190630","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190630","dist":{"shasum":"9b0ec461b26df61a2edc5c8a656afb3360477811","integrity":"sha512-a7+yAsRkP0s6m5Kc4TBDCx1g7xD17S+RItxbjXgaigE+dIZCVE3rOBDiBtcLQwtG0wAAeVThRLUUPS9pVn9C8A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190630.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGF+VCRA9TVsSAnZWagAAgd0QAIc/uRTfwpTDN66Ya3qT\npnIWa6a11qgvb2dbZhRYB6ch8WkDo/Tzk8GcxN7V/OjzuO+P6Pl94sBE9iST\n1MHMzVrJ0I+DXE3o7MHA2/cB2oS9WRmoybGstPK7xxKfSAUVi6dyGEZy8e99\nNcBZeeki8DAlvSZ+j0FDZYj/vdYffmulB2HYbVyU0xqIEdqByNex4AoTABb4\nvzAyb7zkEv8/bfnIEP/9IhoZKn3M3T8k3PywFFttDRkpw+VdOL6wHuC4jPMO\nW0R6ECmA7MMzxHJsiDQ6adddKQZaNGT6qwA9ygeiGhSIAA1fzQ8S+0EToMpd\njIjDyrR5eBCOXoaPhBRr2oOebzs/KBMxl20Z4MRRasKDhKq8oUyWOXXzQ4Cf\nV3snwL/hckJM2ZDkHDCD/TkYohmaEUozZPvNTmKB78oerJKVsGnNX2AZAllM\n4DzoZlrxIoPCTEikpl9t0BHRrZ8h4jFk1mUx42h+XJIMGJ0xwez+JwZ8oRJg\njFcFpBEQxhwvhzxu9ZoBvqPnkd4xCrrlDaLlX+aYG9oNq0rgQeWG9ZhFxE7a\nWm/oJmB1WcIC3v9hEiwphLPud1/S9Z3lDlru8lMKy3fX5bsC8oEb04hkJ4v5\nT5EEQ+z4B4W5MQhko0naAJ2wxhn3nV52qtWvlHbXKqK1TfipzvoRYWAEuyoz\nV1Kt\r\n=/pkv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIQpI0J23VtcjDIXv1yGPSXYySy7MzYmoIYjrEeV/EQwIhAMf53kqfQlLIcpQpxuICLQ+8d5wyIuzMU4kwkqGoPUC3"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190630_1561878420795_0.6754256844717259"},"_hasShrinkwrap":false},"0.14.0-nightly.20190701":{"name":"brs","version":"0.14.0-nightly.20190701","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190701","dist":{"shasum":"bbf7fa77dc9bb37f9f4f31c5b973fa80401e797f","integrity":"sha512-JyPBPg+/+eGy+svH7y9BS4q4S8WBT94H/ayvIeU9kZyNufLnrYXCuzstrNbxG6ovgYxcZwN9qs0ga8DkXG3J4g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190701.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGbErCRA9TVsSAnZWagAA9ZIQAKOAFEgc1Xy8W2KBP5D3\n3UUV3H9cR2ZbNAwV3B8HladoG4UyORhFnzcd/P971aBTEVLUiDsk67J5btP/\nXgVjmf79QYuEaDoSAn5q+F6vduUZL9cDrqvkV4W/vxHXtowBNzoDt3jUnLQh\nrwy45YJQn6j/hf1/i9y1mGfnWrUap+FW6u/ufeoimDxKycuvo7N+B7+BJE1/\nXMhveXqPVpxTYeU9P0MiabgeIoL32vWXQbqdl4l54kmUd1+d80jXBqv1nZ1C\nJcdc3Jp0MN4XHcDGypOI1qna7ht9xWf4k8z54xJwDtJWuwPQTJPeBU3IBKmE\nkZFwWA4Ky7WayVbowQgtIRrN53VOCpJArwjMqPi1W/pVLSrFPYrCT5Dpzllj\nDgRPRJE48kqPdiVftKZONv+GwwfWxkq6yVGdqz638pwAmB1kdtpmiTmQazVT\noWJIxgLjb9mtjJZAeVQvnrNAwzXY5OrG1R9lSCZvMXbyiC0hBpM9+cuUJRSn\n8L/191jLj29Hf4LNs8A0xSVEJWJ48ys2NjqOtA7ZBBrIBlvWnEkI1mjoQKu+\n6xaYKSsSdTrUVMz+toK99qI0flCszAcAgTi34M8HP8Z6rTaTFHgi/z3vi41A\nov54va5+0FC++Jl0wabnBTVpImqFqgAW58yDuIs59tG+Vd2VbubBTINUJ8vX\n+tOc\r\n=2F8F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDc+jPVeIKBLT8iznSbzOyE/0hWdYb6/Kz0aqU7uxuVywIhAM1uabToasB+5ZRpvMv7o/8haHC0dQDMziUgwFxvIOHs"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190701_1561964842414_0.15836796778576523"},"_hasShrinkwrap":false},"0.14.0-nightly.20190702":{"name":"brs","version":"0.14.0-nightly.20190702","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190702","dist":{"shasum":"7a6d61139d7026fd9ffe7ce768c233d26d96e836","integrity":"sha512-xTcxR1XDiMFn6akwZaNKBruBlxHQHr7Lo4J0QnuNcYw60nq3pHKdx6ImACWKs8SspfKrs5CuzUdRY+A8fSdxPA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190702.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGwKVCRA9TVsSAnZWagAAdD4P/R8Bk04eDOosB/WVwaVI\nMn+sO+FFlE9kotnmzFb9a/KZN/UbY6gFg7h+UoRK2rgF062BXUmwoQ7YtD0w\n3aHNcvFzKZXRk32rnccvbibAzz64y4SrNNJhC/7xB8c/ETEikKeGyVS7hJ5O\nujXcpA4huZjHOU2aGEhmCCQu9mGO5McJxHE7WZ5defy5kPKUxlOfnSzS2Bss\nuSWyOEaagUhZFZjfPIqLsyigPM39eG6WivAScabzPATnyoN6McUee9M1g2J5\n0LrKUyJ1Ce/oiVjWeqw0Y9t96VM3MVDxh2Hs2mlJ+EVROo9iUjn9toQnGDvL\nf0AxfH84bvtvx8YRGQW+EI2q7SthQ7Xl+ycaXcXXPct2w9G7Hgqs1BRJ1dxw\nnj4uJo8iAtjOd+PltospZ4nsUxlUL3krL5djfo6sG1EeVhZfA/fJVPTov9Gg\n6wphVe9WB/EpHCeX4FMbM3iBDKseIuCA8eL/xgpUajNnYQwWnF4znlPPfB1z\n7QKEggTSFue+/48tLLAUqa8MiBKT7M3j9bhn2RRZvVc9ZYxco4QFPmeIp5Ay\nqv2VwLxQu9wVSY1Uy05TsjlsacFBoGyTSIYTIGNRKmWvVjDYyEwAOuGsSeyN\nkjvWshgiwYHQIGgi95zpoUXpk+1MAn0rYy2t8Irxc4tKNL+nrIkca+WmTHIj\nh9n6\r\n=S09f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhmgnywk6H6M8WhimFOpOosXLDijgSDuQFQETNvOXstAIgP524sMMQrKzOOX7vDZ6+yvGiNgV/dAvyKCYCdoMXqZU="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190702_1562051220610_0.9826817076122114"},"_hasShrinkwrap":false},"0.14.0-nightly.20190703":{"name":"brs","version":"0.14.0-nightly.20190703","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190703","dist":{"shasum":"cea86c0555943e2bf160c7359cf5e25b26f79e9d","integrity":"sha512-Mwehoa/jVgMN6S9Uqw0ErCooi18GMp3XIIwsAmsKD75wV2vqnfEH4+sAo5Qjt6uiJFLcGzgLfbEv6HRF07sfpQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190703.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHFQRCRA9TVsSAnZWagAAAUIP/jIZ6zq5lCf21632IGem\nkr/oU5zUhrlp3p5ZVgY/P2wrPEbN05Wzme7uGAh5hVcODrWFbV+h3h3lPB4r\nVuahUC+oqCuunCNIdiG2uCve3sReZ8BnpFpqqasrTrv7wXcTM2Y5Vp4w+Ls3\n4sZxGfOi8InNJhoY/1oIpl3kOvIoQQ9Cf4bsugmhTQYiiS072K2ljqZuP/7z\neaNXG7No0auNBYjv4frgCN52gcwpws4sEJLLAcACSTFtQzu9upch8RW177Ko\nIMFSRzlOmw/ETclPVVP/4sTUaxsmFcX1D/lvj3K45gPQZYiJvH38WVKQcLYg\nMAS6f5KSLuU0Wc/QcXgF0p76nCB39yQ0GUWfgVAEuyRTNq9+ujdsyOvCYg0p\nQ+Q2n3JSBUlTDejlv9zAx0bwY+cvX1OG/pqXPmyaXz9679FwfsbKe8Vti/4O\n0KJK2orf/b2ZTryvoW2xVmEi8txJm7TVZRX7Fampk4aK3j7IpVAyrqIZ0CXV\nIfycmfJxqq/mEtyQGl+naSj9kkUN/GusvekEjljbIDZfSa2pYpyaNkeLEtIo\nc/2BE1mWfJc5XRWw7dTZi+j/MYh5irV+bU5EU0xsKDbFDZiT8Ak4hkxnNQxR\n0tKDHzaLitB2yDm8O0ITnZdCCESBgnc6+t1nJBbUcp7Lw4lvYjy1VJP30eUx\neqlN\r\n=WJnt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQeTI1On4k09SJzfMn5mgshmjCOxV1sdFLZn5FvFfyVQIgVYVEXmYcpDAgamtPM6fqBFIxwZJRXqhLN7WPSRkn8VY="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190703_1562137616711_0.6296532444013905"},"_hasShrinkwrap":false},"0.14.0-nightly.20190704":{"name":"brs","version":"0.14.0-nightly.20190704","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190704","dist":{"shasum":"748c867a5b37813069f9cfd2a1a7311624b6622e","integrity":"sha512-WmUWErg88ddWlHUu3tmOlXJSaKmUg+sfoNphuSQxdtzzDgH868IethpCCghAlPQvS0uSaaDZ2rHRnVvmN99epw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190704.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHaV8CRA9TVsSAnZWagAAwUgP/3tZ5ruBdMywI7GB4K4D\ny+5KYKY0EEj85e6KSGDEJiLm0/1fvJWB7XvdQTSKc01T2O14n/Rdv9Tjyu+i\nrqzLY3bkn3xz1HIaqSOx5vx/YZbhWg0ro+MvajlVb+mae5vXNPdZtzLmZRVb\nWY7ZpVNwgvxlSmc8spo6Xcbr0Kpj2RM/popuyTe4NeM1CbUGcptG+xxlDztz\ns+mO1hmpBKLEgN88THlGYF7WSWhlORfOt/d7bWRaurlU0sLj8vkBaeUUKGsu\ne/T0G9vy4+fmct+I+iwimYenWWmunN2LTAuv2UQPKYpoyc38J5n+iVWblX0e\nB6SN0Qa2zuewV1OVtH1Efg1Jc0ewFsYwAYYlVWBsXur0LonDN153nqhtMq6Z\nq7dKc2QZjmmS/PA9Pl/NIKqnIxLxgiHpRz0kyCFZPD9EyAE2Pbt7uD+DbdgO\niRFCp22jeMH4bBMCfqlwt4Tj6utmdWgrxdLefjyNqOtVI0Z3dm0HJU9gE8Qo\nMF/mtG6SbNYpHxFnXAhLOcb+jaDzMUCzxoYXdo7SdaW2we0Jb2w/xQs1mTUq\n6eC5SERLeY2JvYXH1JUyfG/PDt3gHYxvSoHMSFCm0Mzp8oslAEEcaykqU+qI\nrJ41fEW2JSjYj7sUR9juI3adprP416DlwwpVsx/cp01WNtfEanozSFkNwQoa\nLUGh\r\n=TYxD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICZxek70vMHZR3c8mhJ9UkSmZ/F1Lz+KrKhcHLVJaLfGAiAsqfP2hJe75qhsFmnhNr3AvqBE241vQA4k1lzs3DV1qw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190704_1562223995280_0.4019967543263805"},"_hasShrinkwrap":false},"0.14.0-nightly.20190705":{"name":"brs","version":"0.14.0-nightly.20190705","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190705","dist":{"shasum":"abd221a6e1643f0505c6186fef88f1622cd9e9ce","integrity":"sha512-K+K2zIVs8Tof5u2T0btPEt0FTpGEfZc6mxe8jv1ghZG5MCERTa77SnAxWoypIdodVts61mvjDA9FyrRcd8KXKA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190705.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHvb+CRA9TVsSAnZWagAAfUgP/0cO+8i1+E3HnYAvJDI0\nVKJmkB6PTxdq4t6q3K7hh98QgA/CfeMaLU+HjDVGwRxiXgFlb7p2eixhg7X6\n2DEqDW1eiwvzS+ekJiMOL9pZEYIsrIhh50QB1Ahw0deTY4V/1XsAGg2IsfQA\npuZT9cEWl1SEdE2x8fVuyCkHCTECD9znYSkWnElh1om0hZ15jHMncilg+0uX\nGAZX3wpW5oH5qSvJv1Awuaqhkq2nmshJzN15m1v4xRHl9kmlsGPneDVR6btv\nWYkK21jLRojcLtk5vgMB6mdZstb6XVtryWhC7wusF/oyRpiMRiHUVQbaoWWL\ngH40qgFWcwRiwzJ8dpFntCM3gsmXpgpvuSNuvu1293a/jDBPdKPM3LkA9K7M\nf5jSw7xy+3vylCT/jshIIjRkvgbnPGg9zCitdPFvtpeWQ6BGptTqY1WiGm+s\n5lToO2f/VlzY8SSgZ2dxOQP//eLQysi+JFrKgWY7qIf03Qkmvv/PfC7L6gFr\nI3fG0j3537G+4l04lcHYNP8GVSomUMqcvYtmb0F4pyvIv09iYhPO8CIRNIQQ\n3VT5HLZ6GMkA0rXGJyE2dZRnlnKAXRnXQ53v815pgMcLg1jt0WVs4PIcg8cp\nSJGOaMkqE6uaBy8ui9DlAy8iMfeOiAxmmehPBKxeRf7KU8WbG0tFNge4bhtF\nQLTH\r\n=mAHu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAxut6UhF5B31covdO8erq3NojPdtLVhS2Qx76ArxnjWAiEArS/R22kj3zCzLlQhev6eV1sRZ8aG3+x4qrjwhq4wRW0="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190705_1562310397628_0.7374536172119477"},"_hasShrinkwrap":false},"0.14.0-nightly.20190706":{"name":"brs","version":"0.14.0-nightly.20190706","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190706","dist":{"shasum":"65ebeab34928c7beae771384b0a70b78cbbf1559","integrity":"sha512-Et6Bk9k/MjeQIKU9k1Jih0X19W3q8GQHBjxtkQaxVTyq/fhQpv2bcj40NGLIQ2ujqAuvv8NuE5jUqzX6eIAnCg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190706.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdIEhzCRA9TVsSAnZWagAAhb4P/0A2+mLMnKnahiDxKD0f\nDpEuxnqDTATsUEN2MpGUfXgucQmQP4fBliMZY6XTATtjcZkpwSooqnrCsNdg\nYkERYagrqaEvzKW1YnC7k5lIigYK0FLYXghXuxRC0w8K/2S6DFEQH1gX4pYL\nSbV/KpbeFtp6+j1u2kqCwhaE/hDejgZGj88cgUTAKgCj15yJY1tT4m48+mY1\n55q1vCbkMGipuajS4dxGKMZRM6nnp7PeL1nMxSPlCJqREnPOA/g4P1OzofAR\n/WQZiRmbWeNu0GB5pvEgldEmU90npVaRTbugqBsJ0oYMqaytD6Quc7DMYuR2\nL2+SV9r77Len870xqBr8X8uoViOc+uetIfdqB4bw+m7rJiPvjpyesM4H7slc\nMvE+A/S/G9kbezQX5ic4yuzsK7ve62PtIsRnXkCb3yEdpGPsRkUkYli/n1N3\nUsMpfmzWn99ov3htLDPbkznTwFuFv6FmHG5OcgnanDVe0VhPr+cU9CmcbYqT\nTe6P0OzfkI6FM3msMaOhdZikgk3udFYMB3A2WcZThZH7a4z1U4KBTt8jW5En\nmATGbnLlpd9YyjKGkxfnD5yVgcdVIfitOVLPqO9+Pfxtnn3bAcvPcwhRAjW2\n2yhN7zQYqbQhi+GGi9LIoiF8U8UalZFSTc7yVI3aNdxh9P3bcjXI2Jx9dnh7\nuSh6\r\n=k7Gx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBfqR/wn1XmaaQUYtLQeVxWgzsP36TEGA9Xm4Td/PrnBAiB+Wr9grbRt7wHohzeBJDJiaXoIusdm47GT06Fkh8RG/g=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190706_1562396787200_0.40337008609971936"},"_hasShrinkwrap":false},"0.14.0-nightly.20190707":{"name":"brs","version":"0.14.0-nightly.20190707","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190707","dist":{"shasum":"65781b4498332ae9d56523cf21e37e12634e669e","integrity":"sha512-TtuhDh0SclfEpD8uRqVNocGmVu0bvj03GbSUqmdFreOUjPcDjS7mGs+QKrnN/MDktCRaUbkET6v1HF0Nfxo7pg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190707.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdIZn6CRA9TVsSAnZWagAAJ9YP/0MJeeTXMpu/wAXdBz8f\njubtA64splYhau9mCSJRDadstiNpJx+VYC8luhknOH4URXRdZfJo+3p9NIXc\nyA0r+lpVSruaNm7TP40c5fH3YVjwidv640OJdWX9Fz0AAtqGblVpBLGkj8x2\neTG1fmRs5/eelUqiltNFe24+bi7Zp1E0FiSxP6vo27mrrxHPpXFYouA977dd\n2Mg7khsJTkXshyidLmZA4uhXdrSRP26tF19uv+bn7MyqMdkApvOTQkbxUIfy\nnzIdEPqdg6jBlPs4TXcly2CgVIZqiV8fLGlGoPKq1qgUbXHaaRa52Ti8OYR4\ng8bxcB20LFkf2siWG3jx0X/WRUk3QWaJ8iZWjr8H9f9la1+wFk1GwpaIYRwZ\nCaE7p4Ah3mvjY7mLLfkAN2VATuoxgnolwXNzxwTb9Xi5io/1Iaao/ZbU0ETl\nLxvZvGnpg9okcUQngSWNrmJzfOeuARfVIJkJGAPHbo4UQEvx0mWsuSB/GTBx\n5R5JU3czjW2Nt06j2K97nTal55xQOCVT5VThO7luTZtU5He5nNmaUR2rBUyc\nPR36+xJsHnabaPfj9+H/ab8ZvY9GDvFZH2RSAuSS9egX0d+VdRUYVtS/pAz6\nlD9tmsZgHmrmqKwNMxNvOUV47+IL2GJlWynfMQTjsH3hTiOdfAoR3Q1vwIx4\n0PBh\r\n=TU2J\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBLUlmyickT7JfaRd97JChm5BZSyblsozcH8Eah+eChAIgeInjgwDE3Ml/TBMxKHyummELxx944Z0BbfQQugXyniM="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190707_1562483193860_0.8725315651585603"},"_hasShrinkwrap":false},"0.14.0-nightly.20190708":{"name":"brs","version":"0.14.0-nightly.20190708","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190708","dist":{"shasum":"a4459e0377a3750ffa21e0ed696bf6df78d00f20","integrity":"sha512-ikAeqa4sAZp8s1Bqt+WtNEb+3fvddeSSjGahcBSGy2ZTDyUQKXHlg1qasBIDp8i2wBNv8IbGo5P4UunUbhdbCQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190708.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdIuuGCRA9TVsSAnZWagAAt/EP/2OO82bUKTPc8pqdj3w6\nT+VblV/Zkaxfbwb/kYVa5YZ+hhFGGfZ6hLn3gT05kTluJvthCvob0NiNPhbM\nnAKuDTZXUAdLuGmvBf4Xl2RD/+GVwTIyB0KchMHod+0opflSMCvKrtknU2U6\nT1k5kwAXbuGy1yf1lcLpxInptvAaHd8ijvJpAHaz6LProWJIST3/rxsm87+U\n7lt6pGeaEFl+palv1YGaVQzVu14RPjOXav15itjdLfFOUhbUw3nX6ZMP5WFR\nrfLRcgF51vlWn7pbPAgczwqNI/n5Q+zb+lUfJBfprsfkwGJH2XTVWJF6wTWh\n6DSmfgM5XjA1S46XXfVO6U8AoqCF24j8MULIaPj+MDWKnWzRmOAXeypN3hrv\nsy6ywtzmy+FXUODe2SraVOA35ASuYN3LsvP2PRUcDbAQ+Vi5EMnkhwPyBfht\ni69MgeM/i/ClYwg79IadG0WsxCZM3pHplIuWdpqg/VVkDxXU8peDNR+KA+re\nNCKzGVrjF0K0z7bBxzTpRwN9IW+YmfaKT6nO2wBQAu8UTR8G+ui5dp8wnWWN\nwufWqVScxBoQWhPTYQS/HS7wIfQ7hc43pqCJStWu+sLPygXin+uRnyykqeLu\n5kWszZsuUReyfG3JV06693nMXQJRHikv4FHVNO+7b5Vim5Ds29eH3VpFzvVt\np5LF\r\n=QIQ/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDikiXXaYb4Z9VkukK+d5onZDuNXx2ZaOybSJk4L4/X2AIhAN5EelCAEfBYUwn2/+sBpwP828Y5vwxFKh9ah4SSWk3P"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190708_1562569605470_0.8172145663110599"},"_hasShrinkwrap":false},"0.14.0-nightly.20190709":{"name":"brs","version":"0.14.0-nightly.20190709","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190709","dist":{"shasum":"b7b77bd7770989543d563167569246f7fe9d8935","integrity":"sha512-oyXfjEIyBe2bj0VuFMwvFdNo6NuFlHi5YEVOhaPnpzkPw2iyG3a6T2+DAn+4mjkkOPtYNjDrBzWykc4J/3oO5w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190709.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJD0ACRA9TVsSAnZWagAAsIYP/1RabW1t5PX4stYOZdBT\np7l1tGxNraKYSkKwOa0UAbQM4IqWcScO0Uh3buk63FgxSgpogExdgr1LknCQ\n20AW3Kb18TXAD0OTtZU7nVP/YrZX84e01oldVfj5/G5OKVcOhqNr1Mm8z4ct\nqAplgrxscuosix8X5Qj/7VOirTbDOywjdqnbwYSCeR1iE7Ht7VLyjll0a7HT\n7wyQFH7Ru6fHjT/R3Si8v6m3OwuhGHAFwuULSwbejUbLatZGegQFS7etrZrA\n8wN79vsW2f8pjie4MOebGH6lCtS3HAU15JPeCuLnUeU53Yc2bzQNFXTD1Ax8\nN1Ni2lEnVaaRVQelf/Cfi/933lzXqQq5bcGFjhgon7trWjIpS4V20BZBBFiT\nVWx4fmFrwBbYmJDG2+pJAFrnbhNhY7ulORSAq3fi6BDFsGdsU4L71TXDMwtB\no3ejQmUrm922LdXuygUv3RJAwrwq4YncjFqexHqPSkvDWQqo34fWvFGI1zo2\nUFwuZwaZdlWzPj2NgWAVrwzsmGZYKwyB/2T6hOGr41ObRmb1rHeq1vhJyE1V\nCUv3/i7NaewDhRK9SaMghZtRmUFOvHpX8fgApVQl+NgVSJFnBr4Vj6qLZBMp\nig4y6IczBF0d2zRs2dLzEXL8bTdplZrkHwRw++X3IBoiop8XO+zkfhEdc3cs\nu3v0\r\n=B6Av\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGZ2yUCxtHswbLfz1hIKsH8jwr/L0RRCHpfhSG0wQVSgIgDy22EmyYCGsxhMOvsmhYG1AN4xw032JNtw/ekFLZNnw="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190709_1562655999864_0.38826763560227895"},"_hasShrinkwrap":false},"0.14.0-nightly.20190710":{"name":"brs","version":"0.14.0-nightly.20190710","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190710","dist":{"shasum":"089441f33e7a498f4c3b4392b76b01040c896d0a","integrity":"sha512-tCse3xFqNn4QkL4AM4ErmIdQGkBo52taNqxrTWsua2v/88IuAU4ggL0Mq4wAxM1ONj6ZzKmy438IWv+evnqS+A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190710.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJY6HCRA9TVsSAnZWagAAWYMQAJ79/FiY5ukQ2RY5621R\nneSHV320gCXu9xEhJfYKOE2XqUA8Kw5+QSDnKKKT+LhmgU+wsbePqgLkVXjN\nkyDvbpCMEVsecRAaqWeEDx6Cf1aYM12Ws+y3ECHb7nd34R+OLAWr6vbvm74d\ns/9Gb86NyHCFo2RY7yJCJYfFv1XjgIs1rtLF0Mi7tbDB2sOYXGLi5RLXerDQ\ni1AsmDXBCgaQKDJs6KgRFJdQ1+hQr0lsR9mkhqU/8tnhRVmgtxvIeiIs2sHP\nyrudwvtpdVxNQmWPxRaC7/SFS88atzcFKb7VbNVFTDocmxnoJQs4upk6lR8t\nS9mF8kMupxDlrPs1Nf3dgQsY+qRl/+F7Q4j6Ml7+02nlq52cWjqKRCPj7dO3\nRjy3AZOI5L5KhbK+qBRczyickwL8Hgxr+flzYOtFSXeu3A5MB8JxYPMWh+th\nHtqKHrI/BDKeQsTomcYGx9FWO5DLRC/+O9of3sY21G0gQDkOXW1yo0GTYmyY\ntdgcqKwg0KdHi9Leb0tCcztknAxeY5favrbmJtBOlLQhWt9OTiB9+F403GoS\n4bJFo/eygoHKJfkOt2uLybcN1t3nKoEdLG887eEG7S4AbygCKeR7ihO5r/uc\npjLg3kY6jtQhjKfzHJr85my/jUTmNUiY2lbWiwhR9tlUk22juBpgcSqQlZvj\nGbAU\r\n=lC6o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCdWHQkIBBabAsYcHAJOifJPh1cZMU+LJfUuWMgcMKdHAIgahxdgxGxPBEYLjgHML/DwMIHotjfT84F68HUlQuO2CU="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190710_1562742406759_0.3712950069477685"},"_hasShrinkwrap":false},"0.14.0-nightly.20190711":{"name":"brs","version":"0.14.0-nightly.20190711","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190711","dist":{"shasum":"56d5c1a538d58da5d6007b4d3c70669e359d7fcd","integrity":"sha512-Dtr8kcGpFNSvx1kCYdXFRc8ICwKidsMD8oyCUk37RK/4yEbXdV4zfsIhDt60VB+TIjaG8CnNCe+k90+8UIVx+Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190711.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJt/5CRA9TVsSAnZWagAAAw0P/13EuTGsOMew6eAtgp8f\nB2Cb1YVx5cjKnbkpIN5SxMRqwFztVGm9TBZatSH8Ot5cWwQyaOEjQERrijAw\noOgZoKMsw0OEQl63v+6S0kxnrN9ImXj9c1X42VSxvlgfC/KIsfokLf101J87\nVUgGTQ7xZE8GgSLVwmmWdczZPrKtx1UzZHGljzPeRkhyfyUqeHw69ZqhWAtJ\niX3MpMVjHWUQEnrr8JwZi1T2+qUuy/cTWcP/DtE252k/dzVe0cueZmg2Rxcz\nEVPZGR6KcTz2PbWZM81vsI6gcWljQtFOGRQjH20Ph2oMN3+0pSfNYtVpp99Y\nIW4KOVfsqdE1FPOaGMGNkX1tl+71+QWPN2usHV3lpl2/sltkwu84SUqhB0WF\n+SeceL7MeO0sodRYsk4s3Q8OxLNV8h9dZKRNKfMXN8Sn/uqVwQ2xHXa4+ej3\nhib0wls4CfmX89E7dIah8XXnNus/rpWppstfIvZiRtO10nvHmIlnvy+7Hq6Y\nWNCc0I5Ls1tfcH1UygPrtFtooWgCAb6rdno/PmjLpa02sqfRyRkS47NKFe8i\n0myozuApqIbIKuIwOh493vSfMvM3jquGDUMwOq5orzpXH6hzX6r0yPmoDHOz\nliq9/0Tj1Cs0N9VNnXfWQUjcnAvTzTr6s7lrfeGyJeeugP5nRDCdbXVmmhsm\nwY8K\r\n=DfON\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAv+4Qw8XhEXSxoHI75xLI0LZRP1v6OQkTGW8fDI/gsJAiEAzz25LR6Qr7D5nd8UVgETLJahr5zhW6Fvuc/bdlgUM/M="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190711_1562828791586_0.08477333848521873"},"_hasShrinkwrap":false},"0.14.0-nightly.20190712":{"name":"brs","version":"0.14.0-nightly.20190712","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190712","dist":{"shasum":"eecdffd05751b50a880e4195939a9d22062f4842","integrity":"sha512-lFBaxoAe0wvQBWpc+wvxk8SwpOdIYVy507M7kgVypC0hL1NnNU8+liMssOB6L8eOoS64x7Ns+b92PSQuseQY1w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190712.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdKDF2CRA9TVsSAnZWagAAmR8P/2+7sc6tR2MdYeFnURAe\nQkhIPhDv3gpSsrSX+Y3ATKq/6h4MeS2RXRE41O+B+KhDMACxz5T++e9vkyWR\nlRGhlWd/RMdweUzYY9elBpQc6aVGakCZBtFdJYhCisfzppSOZjYUnBU3Zk2B\nmxAuN/RbkkoegvqNGNl6VLU9RJmVKRcQxcZZSOFETL3ggoizrd0oZspmN7aE\nL2k5mMUHy0cqHTQnRFHr09DUETK4G/Z5DZ4bxjjk9lUVE6vFsEVvbNq3NNG5\no9W2uzbivbx72o79EU1ijpOFHDzlfGYR4Lipf72t7uMw3zpZo2goZ7vE6C3y\n4sLRzRTHvc2RQDQAjcgnmPfyEpd4OGj2oB/tuGXmBMLzEzEAKhaqf0zaWqCE\nVCZczt4UyKU+fnjN7UpjJlgqSaIy93m0AXR2gFfaLvl7ejLifm9Z2oNPj+LF\nR4yQ+ppMTtznqLU03wFC9oWK29uM5VfFydNShedhIjIDc5sdYbrd+5Islxom\n2/clqG4KrqPmyUo7lFYNMaokSXNLi28uwjIHi2r1z6yAGeJq1T4E7iGOQSHX\nmDOrTAmJmYIGSR0ewSwceejQyHFoy1Z8Qm3Wcr5HAZBEPwBNl6xqqG2hEko7\nAQMgwmhV17BR//iwHcrOpjtOdthtuONV3oXi2xkP7BlncTgMyTDIcVv5q04l\nq/wz\r\n=qMRw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8Dl9NDncc1Wg7Rh49ugqsjp1hhoLCv/SNZ9NJOqLLQAIgWR9y5tAXG5QK5sRBx4XHN+2AwrYhtKY40hQO2yPOb88="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190712_1562915189243_0.98953374488708"},"_hasShrinkwrap":false},"0.14.0-nightly.20190713":{"name":"brs","version":"0.14.0-nightly.20190713","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190713","dist":{"shasum":"a642d075c4c376ab6f04745c800766132cbbc7f8","integrity":"sha512-W6DkBtTvaAj7MOJnVu7g+Rg/t9m1xJCQi12dUs5Scox2n7HfvGwQ/2O8LTO1/8LB15AVKuTPikCn1uWIrPKIjQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190713.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdKYNjCRA9TVsSAnZWagAArjcP/Ryn3GzY7kJVw/ehJRL+\n7lThnSL+AlL0Usk1p8lryzgustRuLtsm95/VJeFpNEzj8hr2AiUmFXdKdEY1\n67wHUirPqXxu+35s3H1vHLUp3QApAQZaB0MYzHx6nr5Xp3ugLols7zuFwKHU\nx9ku/PGhBIFEmzdmJZSZcz83/eftfE+KORUUIu11cIWqY1mCNloblKeHgIWC\nEf4qq7oJkS+5Szkuj1XSgIS8f5yB0/XI7+3zFhJnZHTXJtYf0x2slkTk6fhD\n86tl1giHYBwYNyc0qdzPORTHFlToPy+EubXdPau2g80JkRFGRKAcqGONvH1s\nJ8y8unr1epGcqqlwRqBXmcubbwc/Ui0+BpOtBRlKaYB/GlZXH82nhTmfxhMv\n2k/pfXTVX0CgweCqtCxtTAzAOvNzsE8krbr56/YU5NmYS1UxnTJLiKsn9MaD\nScDILBa9VPZHpk1a1YQGW8dligst7YgWZ/xmVXbjIbCZikoUKqxUp5ABnGuW\nOFCu4t9/m+wzAa3SnzdgK+r9ZYXsu+qdhrgrf7zqBAcPmXtQx0YXTx/mHXWA\n7AEhL5bToMFfm99eoqCoW/Z5XnBobp0M2un5Gnm1Iaja7FirDk1+hKcBEInj\n9b6FhaKOdd07oSZDr017iVNuAkmTpcYuEQerglRMPAGsmc3mdrn0ALqiTwYt\nkcqk\r\n=5kvG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEGhEUGxkzO1c808RWiMIPwdrE0v+rYV1Epi79HZ6OjPAiAcbO4M8gxjGQJxDy5wygGwH+lCsLQt7noZFLpCFYrUKA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190713_1563001698529_0.5820788687827734"},"_hasShrinkwrap":false},"0.14.0-nightly.20190714":{"name":"brs","version":"0.14.0-nightly.20190714","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190714","dist":{"shasum":"9933c127344ea4623659a92a9b1a6c2ded6c8961","integrity":"sha512-acuO952OWbDyAvVSnDXmgJWlB9ozEmCMfbYu3YAHUryP+hmXlN8Y6Jdubq+Pwv104CNN2xY8uyyR03iuf/wbZw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190714.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdKtR8CRA9TVsSAnZWagAAyKsP/0D6/r7E0XQrJmenceAY\n0RT0AjFQEI0VsLiymNokNJg9LeEiJUwbrMJseh0Tp2HrmTpIMwj+Zk30OQeb\nKUreLYY6gMTPziQNu7DgAJ0J7zJTsjdYL56xH80Egtc0rxY1TQwjhAU+Wzpz\n8LXuGnMeWk/LdLN/hA9Dt2pQg7XhYiiSW5/JS9uoIhC9zGFO5QnuF3IjQibf\nKnaW92kZZguAm6WkYT6Ocsg2bSPOFZnX5C2aVC/n7WyEAtgqORBtN0Ym2Y0u\nx3TkARYbZ9WKlRAF0c+rosBvwocsZ5GG1rn6NGJxgdxmTxdYxJUN+7jSz6kK\nFbEg8mWK95zg/HvXWHI6ZwcK5mxtHJWzn3RFhqVV9c9p9d+wFwr1uzMATmOD\npuidzwRLSUHNj6319Of2MtLEoS7zzi0ofSmx0BTjJlGxa+QVub4K4Ku0+Agx\nN2IFSRfJ5BqQLqPXz/x+TqYCnNJ8BiP7Y4ms2oiJbBs9nCrUiyKLPmVI23UO\nGIpaaOgJ/GcDEn03BblpTBOzE9cwufOv+ZthrShQ1TLZi45fM9lJKk1Ndq4U\n5IPc8wYpUYEPQEhAX3KHVusJjrLIlMeZfop6dETJhzU9KlJTIdL+rEVzJacJ\nedPHKfdOaY/JSQ9AZsq8pdZEIL76f6Y/CXiKr8Nj0tfLkRcg7MZDOn8cPucZ\n5IDY\r\n=10mV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDzfMU3XIfCJlnsIyRj9qHqGT8h/Xw1f4lxNmStt2QHcAiEAl2xSpVOpCTgPtkaDD1Ys9jqyi0psriSWJEn4F91M4wA="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190714_1563087995577_0.6031934385990412"},"_hasShrinkwrap":false},"0.14.0-nightly.20190715":{"name":"brs","version":"0.14.0-nightly.20190715","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190715","dist":{"shasum":"7445460d3f8e8bb68592a86de28c0af0b53324e6","integrity":"sha512-YIdZm8uCncW+1XmECOuwE1JcNx24gyEI5D4+em66VF3OWBp/g1Ral2ZpdDi810A7GKmwjDQfpYvT4at7JHcYmA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190715.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLCYDCRA9TVsSAnZWagAAuQ0QAJnLlTu8JCYSl3FPOvRX\ncIyTxLYHyIs3ppKVCHTrzT0qzxiGXjIBhEeA3KAL3Ga6K8W82z96F65Xk2ng\nbkXaPtzgOAxaGlvz0PxRau9Bm8eK09DUf0FSbBdiDYHEsWSPfiuZgD7ScsYl\n+PQRtG2W4jRQidIFePTQETmlTbFbXkAr0yEtrWooDcwYFBIUmjmS3Inofuc5\nD8DlrGMEd05OIbaZGjyzMoqkMnOYNY7diEjj8BTXZvZ7oUIUDTk5LOBlUVSx\nArwOF0NrnlSVmBYlIaXmpX0dxyfbmgX2f8wTqqQbitEUxUIUuzd2i02LrZHy\ntVl20tOOKBtm8ngozuzPJId9IsBz/+Jl+YyugizPi9sTGdh7C71worWIXFhM\n3aoeiD0tS5Y8ardIUBa9NXs8YEeZpuKpZgcfqZC9ep5j6GHDIhHQaoK8yYKC\nkoQrGGUcbgKlQ40xCWpgDDAT+HYZ3D1VpigMrSLqSQ/GJton+t6OK2nH3cpm\nXPsxmCj1izw2QiwlSsDqDaEGj3VT2zJ0b8MKNTwaM0bz1/TykYNgB2zUUr/3\nlfCffLkOs/izma4Z2GLM1ju4XPzMFFGksrd0mu0TsRJ4XQ9+odU+f9sArR7P\nusWj9Q4WAU4n7Oh1MMJM4gY06oVud0enlgbCxLrlDH3Wfma0A6qrbnEKCk61\nUC6B\r\n=HX8d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+qMXvks2IiYljM3VZev837zf9b3MjsKct6+EtGTWV3gIhAIidBvu2YyOr3bBuyJsCtkSRKIjpWnXYEsqR3GaFwYj/"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190715_1563174402973_0.4272342236197564"},"_hasShrinkwrap":false},"0.14.0-nightly.20190717":{"name":"brs","version":"0.14.0-nightly.20190717","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190717","dist":{"shasum":"ef2ee73c70eec334a6e857a4e412c3660b367e07","integrity":"sha512-8dGzyJ3xssE3qoMp1aYPFe9mgaouRsrJCGsq6pyPCJB5YtJWH1wDbVSJzHosOtLUt+AJkvI9ct+C5B5Odpd1Dw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190717.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLskCCRA9TVsSAnZWagAAdC8QAJSbuZ58+/0IhroOOAB5\nYtrAdaY3pg56c/64nJjwcEpMJi6ffWgUhDFX/hElYspPDBfUMBz+lARx0lq1\nj6euceT/pd8VB7Lp48TJJswLYl0714zOyUSJFtfZYmsF++bGR5ZJ6bTbTrWT\nJPdUFIss1/yzBMPDvAzNwAmEsjoFyjuWlPo9S771LGgnC9ktT6MKcZMwGCE+\n3i+hyY04b6WjuxJ90EHC9M4LDN9tgy/EighJNauAsX/FPTqHmsMgjLGsQ+TC\n8n2m2l4vXYxyBjKFcclVtHAkuxRfd4eldDtQSektiBLQ406oI7IXjiHjAoZY\ngZ8qiblr9Hwo9sk+EU7q7sEV1swNPzp7updHvIvZzelgHQXM1qe394MNXw77\nqBr75zwOlN4BseFWX5XzpOV5mRCPfRLEvSQmtW7nj5gXU/ERGSs0ChH/6cS3\nEAOxt9mSDrJL57/zfJJTiu3nq3iFzbFnlSkUwPb6cY+aG9TdlM6fxyjq7SwO\nHkcCCWakYucoFjtznILfYdZPUadHvZ0bXM2W9naA2h35ukxESwH+2cwH6MUB\nVwhqoXSfLpDNr8XAWb+2kZ14BUmCejJdZannuaSGIR5hbJ4GQjK3fx1KqwGy\n5raMw4yB7BGJxoe9aRT+Y2vu8ioVmKH1kYcydirszHdGuwMo7Dp4iL/BRJSe\nR9Y1\r\n=6wJW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCeFaxBeLHm/uLBfIze+x0tuMaABF+jEO0seKXpo/O1dgIgBReB1NwJpjcEcTdstekr2Xj3dtlwSxuxOMftnOSilQc="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190717_1563347201294_0.10058881259143404"},"_hasShrinkwrap":false},"0.14.0-nightly.20190718":{"name":"brs","version":"0.14.0-nightly.20190718","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190718","dist":{"shasum":"7c1248ad28958d1a9564560451f4ef446a28ed0d","integrity":"sha512-ovMmUf5EmEguxRrU/6gAEmGNDGCsV4LbZKpfv8N4jS6zQtfY/7LwarUqoWomICNhFBG269qi1qTL+bxGzM41zw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190718.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMBqBCRA9TVsSAnZWagAAHKEP/3LjoEM6aBojA8xzeNCy\nBsEbIwWVu39F1lxTVF2lbfWSwVfBfp1UbMZzFf2J8UZOJrQaeNrNEqsxxPiV\nXehNLvEcmwN6yYMdzhqn8B0sCG3KKyNRtTSTG4/WJv0AG8ndtj56rfZQLXdW\nbVwbByBxoza1oAWjZJt/atE4t7n1Zew0TwcKjYFSp0qt/3rVdXwrBXil2zL3\noxFWuN53HP0+f7j/nXiBRH2DZVp8cKVVDzY5Ps5EM3vW1t//fypinnWys9ND\n5dJnx+ilHW897hKgBAtWCp/zg0oW3cCwE2M68nDJo1KnyhByOzNeCHM2KDue\nkKR8ZCFxD1h9OeVeobrQPD+vCl5oAubcy3aUeBcEeZO79abOR1nVHPqhs8fr\nJkyDW2rngQ6DZpEWQSyXBnM7hX9tTyeXW4ZBeENoajI9WosPK1nZ0ur3ATSi\nOQ4JwqpEM3d8kw87qrVLPQ/pmtZ24Z95v3wAm1AxFSDWCD0tPb1F/UHwE5TX\nQGsmXVbFHw0e62FKW+gLSF/0GCsVNJ/jkvTKAcgnBXMgh/waiHygLKZnZb0T\n7ApZAA/a/FW1TNEJRglFVePBmFb9A7+nQnLtZlmrQQXrJvtGEOSIE3iGlJiF\nPgTnu0Nu5Fn2HwAL0Y2aIGel6adYuadke9B1j2EI8pwywLItWfWs3Y0kILRs\nTkUo\r\n=mIVE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5kHb+jDuXU5PI3PzlqUlakSSrgxN3F8q3TThIVW5spAIhANxSMP03sa9/Q0v5Kv+LIpoutr7lO5ZpX4L7VwSDYdTC"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190718_1563433599991_0.477958210630798"},"_hasShrinkwrap":false},"0.14.0-nightly.20190719":{"name":"brs","version":"0.14.0-nightly.20190719","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190719","dist":{"shasum":"81f02bf7459b9f20852c720fe9c7fd5168fad853","integrity":"sha512-yPX6XPvxdKBHf0nT01tJ0RGuvIWywWFCIvTe005GFWOQGT9XOnhtNd5j+ENiyEwJGx8E54LpBtjcqEZcZrVzCA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190719.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMWwICRA9TVsSAnZWagAAo/wP/iVMAaK8/oWw+6OJgtJD\nrAih+1sTInA7AkhiHlZBSYfkZFXhnAjYJ/YaTcb4mxONCcSfRQLJGeeLtYMu\nskCmm+mBY+Yz7kxV5BizzmChPcGe28A9x4+KlYhs5DshKuPN3T8adFR5l1h+\n/Y8cc4029nYh/e7I9RkmI075BZc+EwU/RIhB69mmRYOmO9xe3ryMs/feGZBi\n93B46g/XDBLM1bp6s8OIxoLR60X0zaa/j3DqkCUDPLXnpnPaxk3acoi8yWG8\nypxP0HZD0mSDVGFgPpi0UIOrmRmPhRQY9RyVoWXka4QS844aAMhMTbbd08Px\nONn7kVAVFjevf3Lsc1AYPPoUplkXVSXEpVrPCYLDIqu1HF9iGBgA7CzFw2+4\nemgnN3eI73a+ro+PWsj6NUwIVU8Xj5UHI3j9VqvEogFr75IELh8Y7lzOFfDJ\n8AXOAn4TrNKYKSQbjH4z2HA3qsdPuDc9KSYiVyD7an94BLoJE3CmwrV9NIqn\nRqELkEL8XFBVf7PM9s8XXMzjtZKwfq+ThSMPCb4gmdsmVFh3/A+JK2Hrnubc\n+UUXX290lC5UWelk/yrNRDi2N1KX0NJVS7oqNTgfeNRTSJV4Iu5jAxRkzU15\n7MCSvwwklJgkdtTjL/ya4Hsp//O4QN7u1hRsEq/vKUcnLDlFeu7Ak/MGI0It\nxdWy\r\n=AelZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC5wEe4XAoEk4RTTGQAOd77kSmIyqWnMFYBUknIYkuy5AiAyJlRzNB6lJ9sNbhcSmFW3JJ1sPOcC4ALerXRtjLA+9g=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190719_1563520007850_0.6185277241373948"},"_hasShrinkwrap":false},"0.14.0-nightly.20190720":{"name":"brs","version":"0.14.0-nightly.20190720","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190720","dist":{"shasum":"b88a56b4c5af74b363caf550e4fcd53a2aaaa5e1","integrity":"sha512-aT/x5TltwBu6exSwG5dC1/sJ22aFgxrPCFXA0FBJS07YM+wx2ABgSrQqm5wXfcm58ciu5CM0Zp+nY5eY41HulQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190720.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMr1/CRA9TVsSAnZWagAAw5EP/iKMtsrLJ2jT3taG3f4g\nNgGF/MO2MXkTxVPLSZL54G6VWw0xiXb1ov4CwoktM2dqeVFa5Q6RVscG3QUl\nmZBJjV+m40H7LMsxt4WRFJfG6Cr+XjlaLt4smN+CpskGTgxIxNrQsCvMT/5+\nc8H54BNrL+S7TgPb+gMaNV6L0Eb91+XQJKPfuF0ftmTAlXbBX7J7rcHtRuFp\nrJWkkQdgpyGXDtfmnE6rFNjtGdmuSr6heSPWLuSfH+pVBNjpflCgM3yCU/Vv\ny4upVra2AdL2sb8cZdzFpCg3i/Uk9sivfOEIznfkY5rS/qjF9Yv9UgqZ9obK\nwa2E2xOtEwavtFg4CuMwSxMVyOrBokCEumSZxeUuoqKzepmzZy3KPO8qgPsI\n8SeRDZT+GgrM9Qzr7XmlwrOKQhC/Cz+TWABwd2mhnT/oHMFfwAwGa1izkmDB\njE+dZgiLxbaMu9F4la5L6Jio/pbsrxntPjyAbrHvGOKMI+jfOIdRMIfK/LUt\ne5jyC49bqKU9zjfehWrySTqxYW8UGvwGZGs2TbsXXVYI+4tg07tvaIPvxqQm\nDzOyRM9CpXEiJOLc9Yrgf2mdDk+x03m2l11sFmUdnjzn6YMXljanYdxZdzP0\nzpFGw1zKpktSoQGGkzMjCCfxsFfl+sEYi6EHgxotzXuZx4lCXCUFa+29PWnz\nS+vx\r\n=y7DY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICzMu7EIYEW2lZOUONoMjzgpxDnEz9wbappVEYw42GTGAiEAgGUpwnAYYQ7zcs1WhBPLHUusIRGZ0UQo+SXozeixxIA="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190720_1563606398523_0.06078009789343364"},"_hasShrinkwrap":false},"0.14.0-nightly.20190721":{"name":"brs","version":"0.14.0-nightly.20190721","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190721","dist":{"shasum":"e5ea7df1d26514482febf1b082ffed0acf54536b","integrity":"sha512-S8QHEnujnEgcaZafLfgjOUUzd3ztlB9jnu/sUqkoQcopKUMqxU7ZKYAT1EqT4gaQ2I0EXoAG3zH3hNaEJZmOUA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190721.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNA8FCRA9TVsSAnZWagAADGQQAKF7vqTVag8z9KVOYlkk\nWFB4G1fK/vZwC2oD89NJIi5wOJmpL4tHfPfN/9l7XnKxoQdjYAtgumAFtZ0i\nOATo+7bbu5GUstpavYAcYBU6wwgD21Cepxuw3+kGHlyhLMJ9okZXO+NqPUvv\nm0PoOYOH3m9PNWLn/CbvKqrbw4cIa3tyKUMqKwNOOyFY3oZ5R+wJ1RR9CjWJ\ncZrvTZKIZBtZxZrKSp37OZT+YRLN8tPKZrL2n/h8zE7s+Jo0qKFUSt8JHkE9\nrqamHgPnZwjaeYdGN2PWSCqjXCJRLX6sdvkGJhRxaJphZf9sZ6LcSttAY5lk\nxPthj8UqeX7hss4wrzKrc4zdZXDy4kvGjrcd/rszQySK6wFrd4TPm8gbCSEE\n7vJePuawvriCkhI9GzF16wAaLJ2yrtArh9/xN4uvWnpk/1rirH1aQO/gVZfu\n/jJ2w5TIG0/6ACX27dNxWyjuXam5IbuH4ZGobRn2VBkNzy/KEOBNTC8hfreN\ncA576iL2TPc2pQGTH5uir04p52z23jviHtPeGyg0MbRm55oLlm266SPjoQKK\nbg9eeAlSwyy+hm8pdkFcBGuErm48o7Mh4ibYPOoFklyKWc+RtQpNFRKTR76n\nlOL0mBY1KFwIkJzQd/Iz2zddC325YF29ujH50K5cPe4GaRApXImsc3FlzIL2\n/gJe\r\n=+Twu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHOuCLQgvmHeCe26UL5lYr88O8Vvrt+cQ6nUxkSDNXn0AiBNP8uutyN4dbj3Etx9Rm0E2Foiorts/TX4//1akZUEUA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190721_1563692804097_0.023200626458769635"},"_hasShrinkwrap":false},"0.14.0-nightly.20190723":{"name":"brs","version":"0.14.0-nightly.20190723","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190723","dist":{"shasum":"ac2360bc1d778706cbf7cf1257c9b9fa1c8a12ab","integrity":"sha512-uq8yJcsOIOKmNR6UhAYrH+kcDlOuI4rnNddkL4RH0dnB3LEAAK0kLuI18w06Tdl6n/SEN1eyi2mYerRboq8V5w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190723.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNrIDCRA9TVsSAnZWagAAaTYP/ii80ed+UyVSiIsQDoCD\nEBZEsZ9Q0j5qu40Wr2xBQmmzvBJNYQDgqJyQZbOtANLeOxtrBxl7OBEUPfSG\nDZKPE1U64yixTBmea6aijwMzg0IhJ3zc3qC3gby0+Pjei5iT5+6iLvSLLvjT\nO6MsN1jxRCTCFq55ypQKc76+xEjGKf82SYuGaVqzeBhviC0Vw/dlg5qBb4wE\nC2GPzquOZ3DZVnbm9t5fbaZYYjsJbqefyoml/Lugsv9AZVy+rvGIimW9Q+by\n21EIKZ3fF/J/PJRSVkbPvFW/uoiyU/DQtzlzznPw5qoQOjugE1yFfAQvmP2w\nk5fe3a1llYY5j+M9OF1knOFE1nf9KnfIIr1yszvrPQnSJkgqZe3ekxcvKo2g\n39At81hjdopR+zdg9MEgQXqXRuWzdDqt8y+j86CSCzRV5mtlw0IWH43XllR9\nPRd2fdJBFF3Q+/kEASewINGArPxHIQAkUDKhn5N8LKBNUyDhAwLq0IsHY23N\n7ukI9lZv9h99O6HYKD7Ypf6KM1c1mTciKSUeFs/dgjducnHPZLDZ8mWRPezX\nI+AZ9epJWNUENqHDxOghkHZcma/5A2J5jFeJK3O80tiviivEddOhLTxAX+WQ\nr5+QN4Vn1ynD2B4ccLQan6i+ve0vWuIjiOcR9MWOfoQSxw6k9cI0DXluvzhV\nHNK6\r\n=oK1l\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyQCQ4KeYFZXnVD1ghAbXjIdSPHuzmR9ErDfYWmu/zVgIhAO26+2LfjEBtpFSrm6L4n4Ps4Q65ZyBsVVKHuGaYacWb"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190723_1563865602353_0.7105343752198152"},"_hasShrinkwrap":false},"0.14.0-nightly.20190725":{"name":"brs","version":"0.14.0-nightly.20190725","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190725","dist":{"shasum":"e78a61170a9021ccfcdaf36772d9ab1bd2b67796","integrity":"sha512-W9+MuWKq6qpFwFxemv9U4TZlhLvbHxhneA9gllbCKKCOqMn+0yD7Gk2YfEkfWsEpR2YqEOUBFcW0B0ZHwhmZ4A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190725.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOVUTCRA9TVsSAnZWagAAqOcQAI2l0fR/Jke+a5As3Jj4\nGp4C1J9X/BgD98PsGK0JXsfLCttrOluajoboid0CScKNm6AEpenHXDQKddwR\nKj24Ujt+QCw9dBVfPKD+Sel8F27kTpjF3qlvexhT3GvJAEMNQr0hxtzyv59g\nFKn42mQxoNkdMBnHmrjF30YNLRhQ4HpH3aGd84wKp1hATmvmf3qTcFYKNMoL\nHw+9hW5/1+h0itO581TIdWA9WWHW617TOLpjhqJx5irXbjbLtY+fIH2lN7JF\noCs/Hm/oMX3JhD5BmLka9CcGLTisFkYvahBPgQbKoq6Qlij4xwPv0nfnMtsT\nCdNnH43C71SLPCOo1c6HRjRF5cmAPDBMby3uY+VC/G92tQhcrS+4g1xqrLMw\nCVRSrbaJioCVNitC36pLngXmb2VsaqWJZ1jizPL6fBwzkTETFSYyj9/rrefb\ndusPboe2AuVuoS30a7YxiTdTGBONmKdpBsAY446JYdWEWUmTlaxjdchNDf74\nA8tkC2omuauitMMaPMZKx2Y3GX9bjOEee1PDgGH5ru+YFF0W0kOOBlL0Qgih\nKsFpX49tbM1qsoeyoxqSVT7y7Eyohk6/57zu7Ynv1kP1j8mLY8KbAKKX0mBY\nVzLSPsfgKogkwPRO6KhFz4+lrevs9dlvV0oT7lcaDAi9fLKD4PtiaxL50bk8\n6lh/\r\n=Vdgz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCaewlvfpI1rfB1c7negzP9XoKh9oZGxRrhow98WMxVxAIhAOBag96Z04WuGGfX2TroVeW86FjO2R16iWTChMsCYHtM"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190725_1564038418976_0.9195026739019447"},"_hasShrinkwrap":false},"0.14.0-nightly.20190726":{"name":"brs","version":"0.14.0-nightly.20190726","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190726","dist":{"shasum":"c8298963b91356a81a05051529abd636c628bb44","integrity":"sha512-MFlEBZmYDk7r25hW+BHJY+Loagmzp57UKQI5W5NKRcecs7f2Eo2m21GH3Whaa4Cv7/3KJBiduuo2WeGbyRi31A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190726.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOqaMCRA9TVsSAnZWagAA6gsP/iVIoSYW5Df1W/zczGpd\nuGEYNaaAwLMT/xmLkQ2+pabknNP1O015D97i2FMc8ALaCfOPHxRPYNFdZaxg\n58IFf9iwwZJI68A5xWgS6HE0JqiRuyNzlIIXlosr4wLBLPvMpTUMUlfUoYBv\nBKV45cSkcuG4yr6YjA+DlpcuKdhgIVACiY/4v7tGx5Z0M0M9ScZO67zzjZ0O\nvZVocNx0SdMEtqDoD/xTG04eyuNteAaLtQdV3tw1DkNrLl2b+jFstBeInmnA\n+coIhp+TWl60COGgXyH0KnKOpbTYnStIKhTUCv6HyvAmPZgS/qgWFmCskW77\nTzgXHPBmp8VU4LGvIc6PgasI3hYh3cVmOhHk5X72PrVHOFzeqFOHjvi4TkN6\nY8Pn/lE7n5Zx0oJcWhpuEuCDTZW4cuzsS9Pdb9hU8jSJmlXKckeS395rSFl/\nyDB/5LZkuivodgZ+vZIQWU2p7u9/JAmdy1b9og2XlMPtn/uDNleA9mWrxXlS\nNxn0Q+uazZsRm1S8jml7xn4YpEZdq/lXzqliNfPN+nZPrZW/U8wjRfBQZ+tr\ndsAvf+n9tiZq0tSOc/VrN/r2cIlhHxq6ui6icPz+P4JB6j8ZJujQlJBOz2Iy\ndx8drXy2V1+JekcCJoipN1gtN0LgmDYEqxgceouUDu+OWlDUomIcR1EjrOxl\nefG2\r\n=xFF3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIS5TAdkToI6XNpFDNEapMC18JIKlvaBXDiCrQuZ1dPgIgRiLhEfj2ocDThQQGyNYHlVmLfxDl+p7JPcDTZWFC+sc="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190726_1564124811628_0.43709350139235137"},"_hasShrinkwrap":false},"0.14.0-nightly.20190727":{"name":"brs","version":"0.14.0-nightly.20190727","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190727","dist":{"shasum":"a39314dd3bed44a396ba5b72c323dfd0d57db1dc","integrity":"sha512-bhv9bJ356RmOPFSB0pRqbqNz4+lHYYWhXRsbRRD8gho8vxkXcnTH16s4df3hH6AVjzi4QmR8jKMy/OpLqndY9Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190727.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdO/hUCRA9TVsSAnZWagAAAaoQAJlIx3wFsGJG+4dBKMQZ\nTdLCQvnPfPNu7AZ8Sm0hIFQwrzFR0YnbUbRodk1pIhIlAHm8cP/AmJuECC5p\nDQhCa9r9kEnJOznubE9xiqL4Bg49bV6Wg4lqYLC5L9Pq5+3tm4CIir6rHwNp\nHsk4HgogrzM1DXrXSUd4ob8EARbrGhAurx4VNDNn22e2Kcz1ZGfQB5aIFEf3\nIvZV4UByRJo/ZsQ2JuKOKRLteSIz/9HSfbQJPu//iErant2FbscFdWFy/INs\nKiEJnNvy48GaHtZtC4ow0sVJU7oa9YfnW9uEzn2o9mfGSYsxG2e59fc4EufJ\nOJLoBZzZgx4Uj+5UaL2m2Qb90iv3djUm34LmNMADKdymBa3SgbV6eirywLEq\nFGwExCrDXDxiKjmSegHYrTnyrUtiaPe1YNed7UDXdBKFbX3j+NrQRn1xskSQ\nqXVgoqKJqhMWkDAuiwTPbMn0OeduN8MQ+m4JJ773KiULMRG3ZOhTNWoyQyR6\nr/7M4PR2DT9GuOJcVY0clG6Y1htRP+/xJ5Ja65cT/xKflSIZdfycAGSX0X42\nC+JUxrtk8Z+RfE1TSRY/xONEblWlVvh+yVoGubYzYJ+bshCGwVm9Tke+C3XA\nx+eGiDCSJxLaUW+76RvRmZiysukQaS8J3HlMaK0jX5b3tWkl2Sc0mbHInXHA\n2ODq\r\n=YVY8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCURkEYQzb6/tXoVxcsoMvVFu+tpHnc7nfAU5/vHfXOLgIgdsrWF5eBSPiubC6Na+2F6xqPDvjX3OOsNFI7f+PZGp8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190727_1564211282909_0.9131559177093129"},"_hasShrinkwrap":false},"0.14.0-nightly.20190729":{"name":"brs","version":"0.14.0-nightly.20190729","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190729","dist":{"shasum":"c687bc0feb71f8195958f0b1b3fd01afc553289a","integrity":"sha512-AtedPGlcSxUNY/ESjW83DyJA3gyaziFn7mpidiTPSZ7Zwir2hBZqfz6G97QBZPwkCwf3a1pNhpYDlsUpoUDFxw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190729.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPpspCRA9TVsSAnZWagAAl9oQAIJm8TRNjda5BDPDid3f\nelzXmFvqcYQC8murzvFMxZMkQwDUTRbmKdPYxkeuQtZcZ6xWH7H0aOhuFwLv\nWk0Nx0WIweMdOUkOZzPBgQm4zIL/9PPD9HyuUvUGsRoI/S8L/9T68aLSUHnf\nlbK6fg1pRMEMELRgHl1ZxGUDzJSJws9gR/6q6ZW1CIDCtPwnA19wjvhoQ13e\ndjNAYrXVqtvz3o/0cxwHDabJBqLWIPGoivIaZdW6Y9zWr7QBgaR9zHqBM3KB\nBnFMo6IMBrZNkDfNkRNeYp65HCVFJqZbDb/fXXcP7ZNFYgs81BJc/ym46KoA\nEWV20pz3kRMsaz4LW1oq5cfmF+8hidS4RX1AhWpoZg71l9S4B3L/2FO8Hj19\nsJmmPiV/Oj4GyyNNFqFENn5zFZsQ+y8i281ihHVy3Fz67fN6XWOTsJWeww1t\nUsSZO3SW8UHjdmcBjjYIx78gmz+raw5TvMKYIr8efH/9+9u/P8ktdsLlDkFH\nzE7VM3ndihtnwOyuFOMSAZ6mtmuebp+m6eWnFZQFd3trC5aYwfEg4puo0/mt\nENe7R9wOUk2ph0X5rHB3C+fFi134qNjF84MD+rV5III4g1BAlRXLES7iUOqs\nrNmons33oAQTUTrvO9OZyq5N5o2IJcU+4PNz6+EDBkNmCXPcZDKUdH5fIqQG\nHNXC\r\n=9Gwj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBakCB/2vrjDPOqnWIv7TkyGVd0Bb4if8Xg0km0X5LzWAiBEE2mLdeSBZJ9Us5y7JZjYDTcK4nlYbFpB9ECmKTgnUA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190729_1564384040535_0.41915462921303526"},"_hasShrinkwrap":false},"0.14.0-nightly.20190730":{"name":"brs","version":"0.14.0-nightly.20190730","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190730","dist":{"shasum":"c552b2b24db881ee947fd608a0c8d14c4742cbe6","integrity":"sha512-vJR1WCNqUC2p2ZuukXQGk1ySL/8Pjq9rDlbmMIBQOvFJmHVN1D2muyfiAh0e8C17isDrO2aT8z/k0HzTC0plEw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190730.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdP+zBCRA9TVsSAnZWagAAlGoP/RmjiwCKmraCJAjHOv64\n0dwr2t5hXl5Jo42+eSYs82CV+5xj1uiX4XTBjiK0U00KpMMbTez721A23tN2\nr7BbWwKq2bDi4IEn88VfAUAtHwl+BQ9GhegZP7iiJhw0NxnoKtMkZetHNvCj\n+/bhsHraok5skYXR1jwEhYu5CRW3lrdAOoRDIQp9GGGv06MqWUquVmh52IIN\n7DOzh4sKgoWNqfocyDcEv0aY2HLTGd+CISxgZZYJgXyElQSl2HNH0KYXIf9b\nhHcMosL0QEo0mXAb+M5du7g2yfr8QBtxPdvAbqcwuDD9s1XcMEb210msF1y6\nduYVY6aypS4SX8ioXvrSh7YG1TQz1LmOOL1WE5AzI+M9SCnF4+6zqTxgPwJ8\nO/rOS40XPNKcG3SwngoJPhcE8lar3Cye8JBEYPJ7C/ujjnFTnAyJvIOwyGzA\nyGw5OPrtILVAVM4ju+sAR+DrO0gdwLhb2E/YX6+VNRibngPXAf7rZpjpfb7D\nFiTn8Ov+1+NiYPW2QKgIz53vXirIWwT3RhiAdy4eo2oxiBWey+zMAZNAOgDv\nwgI9LciNozQ3vd0v46AsJ0Rqrdyaf6v+enHYn4ToML5dnLKMuGebWRLe2E33\nxMH78kuEdRXb60+tkJYjGcLpvdjNXnJd0pvIUmONLVGiCDtXZ7gXJCFe/0zm\nFHJy\r\n=6Yow\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDnAKA503581UbLeE16NVJOMPP35thoTd4mwhjsvMjPgAIhAK7KHpDz6rOtbv46jYlbLedGLBFwu9SORWB4pKVlw6vF"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190730_1564470464428_0.08562145125759058"},"_hasShrinkwrap":false},"0.14.0-nightly.20190731":{"name":"brs","version":"0.14.0-nightly.20190731","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190731","dist":{"shasum":"88d1e57e02170a4f04dc5030ef42f8c458e5a4e1","integrity":"sha512-Yua+MB03QFYyNuU56PjSU6p1Mn9vFDIRJIgvymOL23DOtKHFXO7VWIIrgGcdoIfCFfvLEkanOHWPcSM0Nxm7yw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190731.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQT4XCRA9TVsSAnZWagAABIYP/jjjDxw9VjKZ5d+lxSJt\n8leFNDvkk+4YtjFduxYRJrm04O2BNISFZPCDxfLBBtpDAmLvi9YbgXdzUTRq\nwv/6UTzum/VYAqqLjvPjeJmjJcvM5AwhP/gSLaFTikhOkc35qlajr/g6tKD5\nGtroKd4skEbqSgSNsfdgZdlGXoeKRxMZK6mlofpWYHx9ebCwGZVv3v+s47L0\nNxUSjSn4v5Br45zuUnh5/2itcrrf06uJRenmuQGm+quO2OYFuvwvnai6ngnf\nJhwm40PyMTe/Gj1LNWHcS+rRUild0yPVstrWoffLS6FCHE8rYN0n8QbTV4Tj\nhXW8E+1xr9T1APUptpL2oh9NI+lR7BjCZ0vPJXLBbF1iesEMEb+fnBUzSJZB\nEiBCD+/xo8876H3czUyCcMl0yrtSJBu/gu8Z6ldVyf2XUxAOMz8Ktfa88p3y\n3F73q0Y8EjwV6UcAOh0GswsphU0cS7+++/0uYYBzeH7uA5Fwa41nULU2wvNQ\nvep46mfSqRsI4PoNmusPwItxd7YmoQh7cZV8jCRUIgKCzhDSwCb4W0aydEhM\nVPZACUo+QnxtW3+48BM6bhkbct06VxU8l1H8Oq1Fttgsg+8FWXwZN9aciIRO\nTk7KhY9MncM3vRvu/bfLtH7duRL4I1lQon44QnQG67q+rgGmUDw2Q3PrjS+N\nSZD6\r\n=xDD5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDq/rl7tVrcZJ9gHjpzKunTXsOTBe2n0U0DhnkVhg2eeAIgHrMS8SHU9gCSAwaHdZXOy92/homkSKwcjC52yhMWo2Q="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190731_1564556822443_0.5875779011865734"},"_hasShrinkwrap":false},"0.14.0-nightly.20190801":{"name":"brs","version":"0.14.0-nightly.20190801","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190801","dist":{"shasum":"373652cb6ce663b09d332c2723a813004e4d2d37","integrity":"sha512-J7ABnMbTutO60W/V02Vo1LL2pZZZeFpwRxY1cIhhrPL5gHWcQUuBp6qySSr6Nu0DM0cckt6sB5e/49xcXozuEQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190801.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQo+FCRA9TVsSAnZWagAAU9cP/0wl4z6p+hERooeyEwzX\nfY20ilropTAWfq7ubjVObZS/LYnLKIH1Ijslba8+N7xZJraJcUXsf+K3K0Bw\nTy+q2B0Ns0FzfVsrHgXJrmo2pmH+E3VMhkr5qbtbsa43P7CaBldRyNfLfu7I\n9keotpHABF7CDENxHh1cqCQxrtu9t84dk4hoSAZ2LCUp+Tlb3ED5uraJYJX8\nes9OmZ+1eJdHPuG2hpw/N/JTjaijh5ccIivDFsLh6IlqPB3NrCCc+SnvM4bt\n1Vhe8+1NKNgo5mojvkSgvr3RutuEUaLZssBhHl210uuVBjVIdti17eE74v5Y\nCfPrJK/23WtPPRNVjtoGvbT7H1Rx7PehnkR1hbfTosuBlFHwvJ0Bxxk/Io3v\nGmQzMtXlcmcGOTXIz/X/0cWywHnYg9+wSMzbYCQgLOYzNLwb79Efcqo19mVK\nXj2qcC5jb6KOPGrIcxV7N4SByT76/nryumhLaOXMGQXnuFbAcBfgsVrHNpVV\nPGRdl4cojbjVMRK0ubGG9712yVQf0WnG54GP/RfmQMl0GsAxHtK2dt1oWf4d\nVjj8IBdPbyHKYNTaK2cu8JRJ9Jk9K/VZIJm9ZCyGg2xzMVhFfSNKt8KipqTT\nKbhvNGiLM2QPZMb9nqWA1xZ5AcHRj/F/vgJX3uCp7el0wr5ZvPJ3u6IbrVO0\nb2Ay\r\n=84z4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICcy4OFJAekuiAzYpUmTBPRbmnvjNRfQBk08fH//qhX5AiAiCcnJszClO4VYCI6TYZEmzXqe9i99nppEeYJ6ikwSgg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190801_1564643202391_0.012026329273697733"},"_hasShrinkwrap":false},"0.14.0-nightly.20190802":{"name":"brs","version":"0.14.0-nightly.20190802","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190802","dist":{"shasum":"42b292cee1e99297b1e7cbeae3b59de7318ea548","integrity":"sha512-2SRR60vxoOsCtxvmC37ELqr9+v80MGYoJ54/KA0bkEblotyQIQWYoYS2Om7MB1c4uC0cO2+rVwH7j1KEoVTOAA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190802.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQ+D7CRA9TVsSAnZWagAAVjwP/08SI+W32ot+19TpiU6t\n7NWho7LTpTiIYpAZPvmXkq+Ddnbr8Ou9aXtlmHy0XbX95uHg6goI4Bc0eul2\nlM0cotTxwYkNovO1npooCOQl37E7fwk4vOBq6kB6bkUuMvFbUq+9NqaOmLks\n3lxzsJ/9OxZgwMuVgwfd0xa/Zwu8aJdVcpEWu80tf/69GYVy0IMl4gSOzGPh\nYvhmtZ0W+mf8PWtakRPwDGaviIDThAVREg3gsrifu9jpBtCnxVS2uvzqnelF\nQ1GN5lkncU6mW88KuftKY1OqQ+uIXEZ6dsXx/sAQz3uxPr6MInYhH5x7h+56\n+RcYDHGEKvCXQnbwHD1SyZomrZuD1AY5HbCUq72V4gXdJoX7yfTr0+wE15uj\nZjtDeX/iBHDExRTeESo1kLIYDL2xgwG3JN4ENAaefhpN4ux2UKUkIe2qyHGa\na5rjbQGTF1sABjL7MMvgdB5GrbTTALeD3DmARmuQ149lKfX29DpFeZmsScSM\n3bNvY+1SwuMK97k2XJev3ZkwL5xBtJwx6vWoukXsf/dHzsjaUlDDn3J2Nop/\nil4/e80lR/sTtm2vDOpNnN8OEfy9Jx3D7TJigmAcOIVnE3H11lpYYLzELrDE\nabxlgDsvlfDOGPcxnwyta9kUaHaCi0kVXwELnRmJsED5SQ4UBwdM3JS4c6yH\nGVnG\r\n=6Crt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID4hWiS8jBpjrA+zrrkFN8IVnsyze6YPDI3cqSXDRoXVAiEAkSKeZzUa8NS0dpBVN6SpXwMJM8xv19Rx0q8wewRpJ54="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190802_1564729594704_0.9298733292397034"},"_hasShrinkwrap":false},"0.14.0-nightly.20190803":{"name":"brs","version":"0.14.0-nightly.20190803","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190803","dist":{"shasum":"83223f7b87c7fbd68c5ec551c3dbab5be62f05e0","integrity":"sha512-kDrChKrwMojPBL8+cbyNWBqkhjflFdv1azgKB9E3/aucfxmUZLDszhOiAFQBjwCOjTmOQIeiR4a2qWmBS1VMrw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190803.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRTL+CRA9TVsSAnZWagAAvIEP/j8OQ2aCvj2B+wc48bfa\n04WldcMeYvkrfPYmbay3HxXGWdXnWT3VswNyI18KAd5jBMBbK1LMNZfoEN9A\nodTMNLNmCGmdQGT1akNtTY0u4ekI02WgKw2/B/aRPtce6yBaYGqKRUfs/Iu4\nVrSkrVWPVl2JRjZDreRVNXPTjsK9nLlTonjC1wKs7H3/r4zdTBjtF+DlNibx\nu0U3xkWyN4F2mGV76X/V9DATJ4huJd1cKLKC+bny3xPQW5VPJXcSvy3H0aAZ\nNrw9UWZB85oc+4F9c6Xca9t5H9l8a5caWjgICVEMsUh5dTrOUtFlwYsuOgvK\naE33lOwQkt5yDZ78+gjkSjxYBbIjqDcRkINZUS9iNN+To1uvJaVUFlh6Btd/\nTCSn1huWBlJP/gm+mz+KWcGP+e7jxcK/wS/2OgO7K+Bmi+s0yL0H2IC8lJE5\nEgtN47MznhoO55ltSgU78+0vzVZsM55kP/OXhkbPQTi78R7Jfd+WhH54+aYV\n9wum/KXLVwZ+V2Obt6eCk2bZGyEKWeovB7nIHlA0fvdeaj3JqDvCKBJ6HoT6\nUuYRBetNZnmHrdSVxs4zCHBeHlIzEWuA4WsabXzGGi31HPHzyTU2ApLTXf9v\nVAO11b/e7tzSapkE5pYfLh8HpmmB91eN7jNVETB5cREO6DMXX+FGF0/OJ3Ln\nH0cl\r\n=+Dig\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9+MuAYwxSI1juDgZFZM5s2w/Aenmr6Km0w1KrI7dgFgIhAMdKsEddPFRdQOlUOeDWQBcdibJEylxQOMbjYP7OGQ6G"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190803_1564816125673_0.8246803929375588"},"_hasShrinkwrap":false},"0.14.0-nightly.20190804":{"name":"brs","version":"0.14.0-nightly.20190804","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190804","dist":{"shasum":"cd344b4b9dc8910360e5e4538cbd8c2cb724065b","integrity":"sha512-OTh9zOYaTAQuRuKSONMSH6unpPlSOWfUK69qWBlcRzcmgLXBV4y15Pd+X3Dm5nOY/9HtYjGvGKmBvE/ZbaBb7A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190804.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRoQ+CRA9TVsSAnZWagAA6iIQAKAHUYNeTzL+oJv4Cvbr\nphFxMFS8uk7PrY53X7skbGM8yRxWpXgTcxFmr82Bo/DrcI/fBCRD53AHd3Td\n1yHzsTEete2440qYo8aaARgEl2695YKdeHutv1PVw90Yhd2Ac+IfqUotECho\njhfIOqgG2mJ+0VbpMXS2Ai6cI0uW9D5VE+Cmi+SLWj5um6A81iI+5j4NmETY\nkPkPWh+/XaVHiVWl9c2O54Fn7N9XwfrurgY7hf4beFjW8bxRvINmVw4/OqHl\nwgg0Mo9YU76wIISQ41401hvuC2JVOeSd+ydlT9aXUOFsFvOU7P56ChdLVcFn\nmfjXrHEiWSTVH58UO4p4tr9Ld2ieV7IMlh0Lo7lzBRxHP5e95+VeQq2DeEQo\nRn3VwfTcmUJRz32HpfFrbJLJsapqR9i/WL7L6B162db2oRRSSiAwut32qPNg\nz7hH9vp4ymVbDIfmotYjZt0H9CXE6ps8ZnXoALZmHEzBd62/3faQfm7CrRI+\n/5TWn3hPzptcWc9Wtj3BhjK2qhePpUX20Iy4JTvBNWyoRjp4jEecUxJunMTy\n+dDdzrP+4qjcDdEwcb7idymx6wlvAVirNt8d6JLC/X4t7nUYXON4nqC0vFBM\nxrPYiwAU4bBLv1tz+0o7bVJ1P6euH6TEwgGsMHfIQNnitKNR6vXb/zwn3E+M\nhKqG\r\n=wVAo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGxM0a3BHT8ILC+qKIRu5l/I1KCdQZqtN8c0+EVN4lz+AiATn7+fUydNeToLgPYa8w5h72zY0fnCOLg9tmVPfAD6Cg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190804_1564902461378_0.050484205104159185"},"_hasShrinkwrap":false},"0.14.0-nightly.20190805":{"name":"brs","version":"0.14.0-nightly.20190805","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190805","dist":{"shasum":"71953b37bd67c12b190d3fedd7d43214956d8a3a","integrity":"sha512-UoS2UbF8qPWMg2xkFO7OBZoX6KanW1hgbhGKoBUZQGRIUd2UiHWKwFjFzjBI06nWJ6rqgiLq+ZjO7xjjvSb3Tw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190805.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdR9XXCRA9TVsSAnZWagAAdTYP/RTk7IiLKHaIGYXKdCAQ\nVroBH8PvSly51gbG5Q7MHOhFaTQuX8ZU00HyX5CupopS16OhXYKirm9OIFQe\nF2N+8QQQI1tKJymN3afQbSNGRzPYcf38AhtkmNQq7xA/4tedsb2jJxy7jL3J\nFqILOtMC0r0iIZNb00SQuA2nVKiOgqG41C6s8oO3Zws7QOHzRB/HjS7RL3ma\nsSh5SRI0c1Fv9INyEqvKE4Qnl9lMwZp7hGld8A7CGzTz9K4F94jNQd+m/PgT\nQKommvKYkGIEM9doxOoV1SYA6k6nQEvZBcz3zuMByEbx50v17f9vOA52AnzZ\nk5IQTaBSUUUmaLa4vb3dDWHqVWYf16vDL0bjWH9v+tIzS2rmkc64ELAdD/IL\nYD/PdVtgIaFP1EEaGlQMyKteayN33+hm/N7FTF10lWR7b4jHgjdiFjhrYcCJ\nsy/LFYqfJrtCpxYQ5gRe0AHpl7g9KWFr4oENGKwcGg53BC05GVOGLtffGw9k\nb5VWdPYwNed+qySUBQ6xu6jCwF81PhTRkFPHgVBKU4Y2h5yYr0KSIPZkre/D\nDGGH69n74FyyQt1dxO1pQn5LUR4eFcHxiA94PT/cTsCWX82PFCeIu4RKBfLa\n2Jr/V2p7pPTfd3wccjmkm/zf+j9Jw/GzsQo3XPqYO0RGS1aMnJaHzYN30UpP\nPn74\r\n=tQQa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKo/qiYUGnfJqqR0rwwDTjL9D6XevQqJr9Rur9ow30qAIgLF8U7NsURyBKK+W7HSWfj/7MShv6fhw9Jq/0zLA8jk4="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190805_1564988886983_0.5832947814886844"},"_hasShrinkwrap":false},"0.14.0-nightly.20190807":{"name":"brs","version":"0.14.0-nightly.20190807","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190807","dist":{"shasum":"ec9f5b4a7e1e51aecd6944b81cb464905b223ef9","integrity":"sha512-p6YT/DadIq+hX1FgoiSQQ3tamDNJWlpaXI/pkAHVzRgHS45io9Klt41Y9jXszqf1tkEiRxPIhCC5GqxVzIVuTQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190807.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSnh+CRA9TVsSAnZWagAAkU8P/1IKP3V8QfYY/O24z1qJ\n3XYYHIV5x+h6YgTIQWIiiSq7BHmw87/4EsTIbBPcdHpWye2XQNBAIO2NFERz\n3dtob4sVi/Hd8SQreBjWPY7Cd1S8xEc4JkNooHlYcYHXxw3ervZogf7reZK8\nd7hrQHzTz0cbfRs1flVjb3p8Rv58IONlkt1DYFFGFQVTCnPuDjkrMmz2tY6Y\nb/zp+YYVZ85rKyHSyjRej8t3JM8JlTffPgQhEKFK0RRx2ahWzaeCAjn1OqSh\nO67tp+Pav4LwOROxNQYDQA6RymWGDLUgrOtNTdZs3vODS+MmYMZ36S0FbhU2\nDFHdcnjeePxfYXPpLey79tUXwK6E9f3W9AkFcWxGOYOIsnUU5OqJihAIMyPX\n4K0971iwNs4IzdPArLq4R/lY2dQ7tUcRspmQd18sLx5Lc85LKdgiYzScncE3\nmQ9wL7yzElASOsYRoBGnsmdsJMlSTZ3qJPa44NcTUkyrDuW/3xXdYJUE6HrF\nwVFqce3GWplF7n2rAUQlRxmJbxLVrFpzB/E962cXrP0zThPHtCxhS1WsTWUT\nj/AizoPR/BXKxmgIAgJHsgcsm1Nee6Xg+J5nLoJ7HBFLfuPLBZzyAVNnm0bh\npranAk7uYceNBTbVot/iENmgs5NqI2hKBaw2xxXiuy0dGdvbBDRAQVvLVhP1\nuRi+\r\n=ipZA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5hd4dXbRaUqb9FWlsRW6CQYBn1AMW5HMLchRRdEhI5AIhAPE/foMyfMvNsrQz595pfgULn7jTqihdjNsnWeP5yKop"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190807_1565161597820_0.2781746317201874"},"_hasShrinkwrap":false},"0.14.0-nightly.20190808":{"name":"brs","version":"0.14.0-nightly.20190808","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190808","dist":{"shasum":"fe14c5ebc6e2952bdc1629ec8a8c6e7969d271db","integrity":"sha512-r8BhgTd1J01b0DogEQKykOAk8cMCjbonPzv9TqKcU/n4cxFqBWHH29XD8AMh2HK8mHb+hq2OnqFyQbm8uvymeg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190808.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdS8oDCRA9TVsSAnZWagAAVFYP/0DGHY5oueQZ1Y0MpSjQ\nI0r58fcxiGsE00p0qL+OKeW+XMqaLcNsiNuSTuNIX3+O277q7n05nlIVbD91\ne08n8ARhlCt5L+pP69O/KUqHDz9YztZ/vCY/+MYwnAy0Orq+cIHlJlhcIQem\n0M8/DncFwgyNMidVSrV0r9pnWOifj8whgBJQXN0ipyhHNdg2W1wO+ComilB8\nmqafsbr8PPtRS7jetyrQkdedT/O52zy7ADVsABIPO59goKew+cnXbFSrrlht\njxW61rXPNw7S9gGjovMT6/n37tcA5pvEIvWi51YzzVnlTefDVfh5zTp7/j+P\nQPmoQFrOPf9u2PPMI6PD8pB+xdndg/EBAWqUNbUEwrCITYMV47z2kg5EVzoC\njLcLmkzLzc3BQmjK24OeFH1O2qpGqbHkDGETyL3qzDZD0QIO31k35Q3QyILg\ndbBfuD3KS9TeH12N7jPivCWUqoVs9YEz7LH2/NUjyP5biBsoeA9iGmDzv5gA\n7FeYAfeAXcs40L0Qbv026+ZMtiCL1M0NWgyzFcZRNa+dtwzejDKb0xgdm9Wa\nAnwJ62wgsGscODyvaoU8s8lNkcOUhcEJaIlAqtLo81+VyFK1m9UN7Ym3mA9n\n3T8+eFxfXlpk9mw+Zpl+bAvg/R8uVgya9n0C9rrT/0G4jVMYZw1+b+nKiIrT\nTQcC\r\n=Q2GE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID9kmflySX99aGyJTxvwo3Y/tk7ZQTWVoMKcGbMbTt0nAiEAomopolmQC9BpnJIANBJoHMVfrfvUAkerDX8pYvUj2eU="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190808_1565248002479_0.3932372562606705"},"_hasShrinkwrap":false},"0.14.0-nightly.20190809":{"name":"brs","version":"0.14.0-nightly.20190809","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190809","dist":{"shasum":"00ec27157246e82864f68e0f6738cf76d9002f62","integrity":"sha512-I/hsbrnrzB52L+Yjg6S5LTCjrkh9V8VowwJWMJ3gk5ajNQ1EEEI4wO1/qI50iGmtyRjVO5h9gfd5vUEAZjQjRQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190809.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdTRuUCRA9TVsSAnZWagAAS5EQAKAMSJM9wsFLLtA7NQfh\n42Xfe9ZjhTCsRoH+HYFAmvo/LCKS3hCofTSoRSTEh+kCzjtBrTgr2AWcVK4k\nJav8ypNHJhJd4GZgUkrFrNuMijpQV702F2t3u+dortBuwyvMQOETGE500PnY\nUnsab+fXGFFPRsIbW8U7aDdRcKh+QBnF8mTQabOCcSUJnmxRpNMRynll404W\nif15RvjgrUyBQJ8y41ZHtJhYYl+7qWBwmqw0a6V4g+osws+L4Y4g8JtVMthq\nHippA70d+gFp3mQPeAA0ZhK6qV6yTDI+Eak+MWL6WVPOTi+xJEwLKQK+KuZl\n8aBonrlvZyX0gMfmmhMr5hbzuxKWP/9MMTgxtHmumKkJPn1bAwxQg5TVEBpF\nUuKiILACpPHx+Qdh4sthC/YX3PU1QlLl/czcWVG6Q/bTc2lA/L+6vqnmbx/i\nhWc0LvxxRcqGrGjeJE03ZnSE61vh3uVdImCZeHnFv5zOnZdqhRf34HIDUqeh\nZ8pM3tPHuoB6XhUjJEtFTW02JvW8VNmCqP28D4MzXSLAUBdYtRWqZw221Dan\njYYmSqLEdrdh328MKfYXrZ6z8K1Fvhnsd99TCgg4GwYx1vNYEAcyHrro3ooW\n3WhZQVvF8ahUodBBihLrqE4aSiBCETFlH4l3R6p8OM8X7sZVTrr4KTklnMt3\n0UCg\r\n=/XJ9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwcvLib8+nTqLkKzuKwpDBhyBZAj7XPrI2xXA7fBCJ6gIhANr3lB0vbqr/+7jDaXu5sH73AUWcheGN+x+uzja72knl"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190809_1565334420355_0.42379819068217484"},"_hasShrinkwrap":false},"0.14.0-nightly.20190810":{"name":"brs","version":"0.14.0-nightly.20190810","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190810","dist":{"shasum":"901a06245758801075b1eecea28c97ec3b4fbb0b","integrity":"sha512-8LTx+u5e0+1UgBkG+KjBdck+pRO32lvEdv3WCPNua5eaCX485ovpnIpNLh5mNu3d9wdluz38HTBQyDH6LyaPTg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190810.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdTm1MCRA9TVsSAnZWagAAIMgP/AwUDeq3LkRrqQnxMtTk\nJRarTfW/JWWgS0ya9xYKp+nU4vLNQ0vjveEFNVv5lJvYahwHQ9z9MO1CtGxC\nnaLYPNO8aGHwSkoql6aILsdESmY7AcXC5oZafusOb5DjfMpXnbRvcbmk8Riv\n5Nrg2+W7UNqdGU/EBYjTam6nRWQaWpyaPTTgQZYkKaLhqaAFn61yYVOrtq9q\nS2JMfPn6bLI/zuLd9T1bfbGBe8LwoHiPMJYgbEr+epl+v7ifLwC4dRw92fW1\n4PfRsQJuAzbqTMUjOitUDpOHRZo5xrLoDKRnrTLYPCK1Ld7+NHnlkKTIDKWV\nvmRlE4NrukZQmUt0uC4veyUArNYi0q8S5t3PHvIDu8U6KCDoARZyYw/73z3F\nBG9+kuALW4be6JrllvqX5/9a0Bc7irgIte0KjYBgeTPAK1EwCDwJPgPyi43N\nPqbF0U2di4VUAAbNoEUEJ1xOiLJjFJ7l8PdvUqBVSGy/McTEF53YCVVQ/+uz\nkxh69JfcUeqOY3uB28yP4A6LJAQPRUIzLQrjgbpJJTeVq8Uvn4PUuALsvlyY\nT8/JoHeOi2Cxxkuv7C4LHeitMfVaLjZXcZi+2txx03w8ZFzn/eS9jJn89hsT\njgmpzWeV5CTd+E29noCSL8keT/maTvRmtDdMPorZ6AblRKPccGczwofwZAnt\nkAsI\r\n=50tZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH7wtdOxaavt2k7pNzjq0MJBZwH/2xeT3T15vISPAwsQAiBAZwSCCYQJi7vNbbGNISzTru8IOdkRmHRWTX/xV/5ifg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190810_1565420875900_0.6565931784190893"},"_hasShrinkwrap":false},"0.14.0-nightly.20190811":{"name":"brs","version":"0.14.0-nightly.20190811","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190811","dist":{"shasum":"1c818beaf75a1df47d01557439349de72241e0b2","integrity":"sha512-1kU4SUTr/kMgH2M1WEGBnclj8NsvNizvK2iui8WHEXvG90UWZHV5osJfQw8O47k3BzoaD5RQ7Z1jhuwSwy//3g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190811.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdT76KCRA9TVsSAnZWagAAPysP/Ajg2txNpCjKdRKZvegx\nW3yfhEGAKTntW+ZyXQhFz/N8pAGXuxA/Zqc+zVJAuej0WaULMLrTgSSAJKbu\ng2I1QadPKtQN3/vXdDXTNM29TcxSd50y2dqt0im0UmcNIUbQFM1eIuQD6CTx\nQLa6Hm9GFfaihtOtJ4BFRJtqr/e6kJnMIZ9XqzZr8cNqlUbpCFZU6NaKaQ9P\nUyJgctzojUP0yLvPo2qD837iD3YtBSXWZpnjsLdxAEFcg2QYpg7VEdyopoS/\nSoUacECuXUGYNTJ1vMDysSLnMBkFtjEeNlC71W46FWuZfTRmf5vO82jrf55h\nLuKEj9MfBAbDEYjwuQgjI1RGsq7zVQ6ZqyFp4+FDvVCcfxFy44XDH9kIb3jr\nCxh1Tgxn4rQsK/drV5lIFMLIx+DS5gZoFI3oahxM5DA2HXBCskviejdbn1D+\nXWlyBHoaGAixcu5PdQXeIyjSkjjDHyelv7ECFTW1Xsl8BcySYEOgwaUdw7pm\nyBQm52sYDtM7HTO9GsLZqVDMgdbcC9I40+cDwjzOSVqFbnvkEW5UP/rgM1Lc\nhMyO2iqLwcTW4PwVpgxdQRi0o6feQYu6Zl1XiLM11dn6e7bDBl32dC9Yzy2h\nq7Yh0KvUbGoB710kL/DOcmhDbEEAPO+7IjmEpH3ZG9N5RH61WiSVs959s0A1\nVn4P\r\n=csGf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEK61i+KbZLY+GdaPYMes88WCKeUXHKHFPtZwOu0G21LAiBjS2bhLmNoRNu/oBfPJGbJCDQugvnYllGJPh9IDpEdqQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190811_1565507209896_0.50997174367306"},"_hasShrinkwrap":false},"0.14.0-nightly.20190812":{"name":"brs","version":"0.14.0-nightly.20190812","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190812","dist":{"shasum":"964948ea6655c11230be210b5d3a6d89a7b91902","integrity":"sha512-ddmNiKLIv6A3aBeDPUhjOlzUodZf+F9WhT0lPHA30KUZu9QW9KxndWfBznwZDFXFcs3WnU2cAhDsMiArH9lhCg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190812.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdURCWCRA9TVsSAnZWagAAgB4P/0cbrHWlOrCkiUyMzTsh\n+Emv9YHhYCH08lmIkYac6txroVPK08FRty2OPB6ZBrMhbbuQN8e3WWONrmDb\nEDeWWI/Jf1VvbjiKKIfVq72715P+hbK8kyWYImQsPe4UJ1RSJNhzeJL5xm1l\n34We4rVU3U4Qj0p1G58ZhgoM39uJf0uwoHUQD2NnW+uPRJUDbE2al6zSMyZC\nWp/3H59RUtDSbNN5MPzTh6UuArmpy/Ixf0hhWMNwduCwtwaaPr01HmvBUeWu\nmXQNZaC0VF40l8u/1h22B5lTRkjpzm/khU9Xi6Vmmjmx1/T+pUGXhYoSc1x1\nr0wOewLX1gi+AXvVbjd4co8emkBCiOSGsVbh9MkwBSobG9IM11NpuzRlyGe5\ns4TsNcgEerG3iYweptE/IalbMKl6STGU4SfKsdnB/DHkwgMNgysBS5FNkLwz\nIEi0Du2SN2GkWYKMWkoMDTWGF4qWiCoF2nPe4eow1UxbhVmLpUu+dOgI4egD\noj/5M+U+vnOnpwEOQFQWWdwCnsrdd8pK+01LaVR4YrgBy9JSibKpVGhEB5DB\niIqcAtVUQSCURoxrxU2bzs5no9+z+tIzFgO/h9JN8gcEWL72TgxzM7RsEPM0\nhPEpyeJc//uXqcVAc8hTQO5mpvK4iWo23PZx7WCnAMsBa/NdxisEGrep6H+f\nKOCu\r\n=v2Ru\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEDwTIm/EIrukmnNyAzv1b9EmEguQOJpgTbMtXqJJTeDAiB+d9yuCLhSR9wLg62h0qaEz2mHArN29edqY9VT1VBEnQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190812_1565593749268_0.1225319000434908"},"_hasShrinkwrap":false},"0.14.0-nightly.20190813":{"name":"brs","version":"0.14.0-nightly.20190813","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190813","dist":{"shasum":"033dc829047b6da3d88b5684647dfd72edbf533b","integrity":"sha512-ImgBurKUYT+g5D5/B16QG00UulgpRXhy+dag1VRMt5v6ZTjHcp0VU53nRLsGpYRmAOQKlKRgbRs0k3VLMb49KQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190813.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdUmHCCRA9TVsSAnZWagAA5wIP/RV16V1CR8RozrInBbSg\nS4CIPWMBcxt+KGtaT2ZNYdnPTtwQPw3OBLZwACwwetKUjjVDWei8tSP4eSXh\nBZf/I9Kbe3bsS2Gm5gGsj8nEcvCSMb3DgG+5+ErD6JHAZa0FLnAIHUtHuRro\nxXPT4AeVNMuBgEGYftjg7mnbbI2pa/RdDsrtRRGRzd+YaFLnENadf7jSpgSr\ncuhPlEyVKLrhApvW1nMya3NOxzWI41E2RZtVmiWO+Br24skDn1fdvJw9qk6Z\n5Pb7a3S5S3zpo+weq0q2OxBuiu1agO57L3gW4iKSsulo6lhxtyctraK6b6Nd\n4JXIWZyWjlUFj/KjrsnZhj0cu5lhIpWei2MCUMO8BA2O1IdMJRg/UnS/SChq\n5e8LJX+mcJqV02iYqBgml9P/W5TQS+sBOXxJv5FOwE29OYjfTNrbaq4eeHES\ndDylnS43a7mwoCtrgamSYbVdGHGoUKsYjOoGfA5FGntayC7YHp1hm0bTMYHR\nTgTp3vRis2g2q1UXiwkY8yvuxIpwRU87OYOzFkB7vLV30iJuMRzN9/2q6+Pf\nSrD7G5dpGCaKhwOigT94jHvT6DsafB5fefIDiRKueubbJ8h6eXd66lRrCHhy\n18M1ZfWZfM2KZf2LMYZkDKpqfV97t4YsknaHUpCvJtpbr+cVUnLIRQQo6t4I\nzJqD\r\n=CUuE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDjdYUkCDCDhmKKYyJW9otEylS5S+1/DJktgw8wY7vaDAiBUJ1MwXxoDTbYO4nwbFUWBknYr4tPj2yeX+5Vmibtnow=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190813_1565680065673_0.9203658985295351"},"_hasShrinkwrap":false},"0.14.0-nightly.20190814":{"name":"brs","version":"0.14.0-nightly.20190814","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190814","dist":{"shasum":"9a22b2cf5a0b22ef4e8b259445cfa199b111cfa3","integrity":"sha512-Y+1gBiB3nEyQy3z4U1j4hptO4QnnVRDvA/Dr7SiArY590pYrjFxpYvqx9bUbx6A6xh0zH/huJj+gAX4YST8iIw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190814.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdU7L1CRA9TVsSAnZWagAAo0UP/iOiGVPfbgQavki1hlel\nkuNN8nQYdhZH0Pq+Wa5b4YISyP3Zw00IC5FYIegU8wFmOmpOJ8OYQeVhfH4k\n8MbwgBcMTFCHc++QWtC7UHAAsB6x9lxr8Me3FvQzdLNz3FaUHCQqqDJ7nCDJ\nW4XH5y1XK+DS6WTx89TbrhPjXL33rX5euwPtzxw/p5IithzUhCb4Lrt49mvz\nvMIjzVJakLduEC49bY7anubk6zqA/Hx/tnNICHIP2jud3rA9NIJXo/7shL/l\ndRTY0ux1UK/1a+bLNWhSPstbe6xlZHiQwnVsLeNN9sLlhmSxXfsN6Ng9gtwX\nR/OJ2MEvEjS5NqFNLHhShhkQssEAtMEyZ0OyfDhWoyqrDYYzHRuFfMMwLpnX\novgcLpzrqKGO3ANT7BHQXFBFCByHg/zH+aDyB7k+NSheOELcOUCHzZmfDecn\nDR8pmHD/WwQyu+EuHDd7dllidqz+AEMmt4kI6PuL6qMCb7Y36GjHOgNTgyc8\ntG4HpWTnGAVplk8qmGJ28zyMuxbR2azGHlgdx41GxM2dvsH67NKT5eMliKV1\nZ/6S627XtLZRLcYJVdrUh/4s/M7gbu4CvyNvQsY/Pi6d+crdvXjpGeDlb53g\nDzlXYmw3MedupgbFt/NtNP91+qWNelyZ2oRws4AKau4Wgu2dB88NtZYXznSg\nEcY9\r\n=BAYW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA7KeYdcYwEToNJTk67EGOY3zvN93Vgt7NEOrHdw4JgnAiEA2f7aid+UXbmRjI1YGQWl3lDU+QIuhawQjRE5XX6/9Yc="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190814_1565766388311_0.28984686935747894"},"_hasShrinkwrap":false},"0.14.0-nightly.20190815":{"name":"brs","version":"0.14.0-nightly.20190815","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190815","dist":{"shasum":"102731876f552c79ee581bfaaa2b4830ee3474f5","integrity":"sha512-a+lny0lj4HIjBzL9xAjyXOvyqZdrCLpeIxvw20r0IqcqeTL2Ln298PDoVy2dWJNq+cpHmT5zluWq8b9bp1lYwg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190815.tgz","fileCount":124,"unpackedSize":795939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVQSKCRA9TVsSAnZWagAAOKEP/R/uhn0TL4oqE/r8xloY\nf/+QaCOYF5M8UBd3njF85n/MWPwK/91rJ1AK7xD0/BJ0TpxOZ3kljebSd/IV\nIQ08LHkb2uYqNFca8NoeKQx4ljCispTTL0Lo4pzupMFlKBxlI6/orHYdyOkq\nsowvIC6jIE4YmX0X6eSWsodlhgkfsQ8g79HSJf+4JKabUHKXzM8/y6J77cXd\nMevhKPrsJxiH71EfcArQQEvpI+GNGo55PXua3E2f76OICtD54GD5CpNhFrcx\nZBoxAJSWpDB8putOZgxjZOu+bRHfxb6sCkfCp/HEPPIumTf+Oyc8GdNM0QLa\nPFjfAvYRYQQ2mI5yDw8ihIYQN+WpAZNbm62TT7GnuP/AwXP9vedQzwuDDRxv\nx6L0XfklWh0dCs4rfw+u5upc3MZy66HVQy6CEYnEAa8HfEEdW+u9SQ+ekl5Q\nmDqIVFkObfZmuVoGKlqUrsgKJMKc//f4mk7gSBykANifVgv0ycPh2mZgThlW\nfcH5k4dN/uWeE0zA8zv4Dfx6IUl+4IZy+vi2gL37e/xlfwC3iGV2mNsfwQtn\nE2tjCch4zByiuAr3RG6ZtusR1Grs7+solo3nGMmeQ4xZ2HkiG34x3IXbpgbG\nwf49+vhz3jOfTK74Ba+vJMMa6S3z+A4YXfp0W9yYZNv4cBJKOCoMEw+Y3UGi\nBTFS\r\n=KNZL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDddagrwn4eEzNpEEPeNyaaq2IIRFimg35iniuwp5lKLwIhAII9THVdoMPxYgL8HH5zGOjZfqf5pkkG35V4KWSTcmBt"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190815_1565852809491_0.7668986962014019"},"_hasShrinkwrap":false},"0.14.0-nightly.20190816":{"name":"brs","version":"0.14.0-nightly.20190816","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190816","dist":{"shasum":"2048c32f02c47ccfc2bb664cfd692e31b0c872bd","integrity":"sha512-VARVqbNWYJ/FoIYTKrHSlM6RaQAFEO3qSdclK39sbp7crK+HywiZD4AtMsoKUDReGoRE9LgBr6sk2CfZI/BqPA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190816.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVlYUCRA9TVsSAnZWagAAmHwP/3RemZgYZBLmVQPK2Yo/\nH3BJaMWT5p2H0Wplx6jzvWZB/mMQy+yHKWjMkjjQVp3RCkF+WUvAkcvlswQn\naL96j3iO+yh/fNxgdr2k9eIKQdy+mI14FbhHK450TJ3zBEI0UkJ7I+3pXxp+\nl7Y6WVijA0Cr2LnIUYFZOG6fbx01tjfvnmypyHzKNfkD33qvagQ5B+GOwiXX\nZD7G6lTFMJIiWcNS7OswuGI2/0z/s3zfxVlj8lDhFwmiaB2u1d5M3Ka1efxk\nuiCX5ugG0N4ZvymMIHUNpNVAQXeMoAgTiasCRg2FOcOzPNyFc0M+b0niH3vI\nbxeH9ucXDVL5LpboS95T5QMmbw7y3bQWUBnCx2vQn89oaUlXrwJm5yN6dkch\nIGcxXt36rwrbhQsPVgGdN6uLBMS8Ys83F5jyI4hBlegveTne4V3YdsKYp2DO\nfcmjloMbVF/CcBrJelsqkVf52vNnvrELHpO5+G9DRRWMKzSg9pyQY+b05rvb\nOmSIGIYhVXbCGld39D0jg4pPB9N9MMgakMI8gEYo2OBFhFa0iEq0Y1f6QwMo\necF0yKUZDnuEOq1hFS/IFZPmgfXDVDjklPLHz3Q/e+OVAn1Pt13bRUZ7xUf2\nQ07JykYZ1+hlSUy7EE9tozaqnDBOQS1u3LsxbZgLuyYsyNkejRSRj//KAJZv\njwA0\r\n=Wo/v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD05b8gsPXftlPAug0glI7MviglXAFNxZDF8pTSd4RrTAIhAOiXzIdox80X/NeSOgKJEUOPdWWwwoKgNjYT2oRMsFm1"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190816_1565939219840_0.007070128597495673"},"_hasShrinkwrap":false},"0.14.0-nightly.20190817":{"name":"brs","version":"0.14.0-nightly.20190817","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190817","dist":{"shasum":"1b78b504f7363a026db1b9fa490d9ebde66cdabc","integrity":"sha512-A43R8CoKvc6UXKhdc36QJmHNn46KOrgbjKV14xjpsgfbSVjPdOPZjYB9ZUAMGZZ26pE5+wVhPSW2bRdg5z6jkA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190817.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdV6f/CRA9TVsSAnZWagAAc0wP/28Odle/AG9gj5QjuR2R\niin1CAf2i5r9LNTEUjBCKRXHeevLuv53UROdzF8auqFNZ6U2/AVq6ogD4yHC\nyRzscMNeWdrGgUhSXgiH7nv4OeLyukJaq9m0he4qfAQutS0zdZ8rG9twQZA7\nDsvxVDcf/xKVN493IXMAvn6tpKIOELDxNOTcPYrGpalqQv48yr5Rm3eIWfn7\n84Scgguk85W+8jBTkCaPirdw4D+uLj8pLBhSUwwLHVKwckH/dVozZ+w/KN+I\n8f5nzsntUgdNx77PiikzpWKYdgDTUDf7IKQtDSi4waRpkz6x9BOGd8mP665E\njI0doKnokZrH1nwYfONFscbFkgw0U9iUGjG84QpbRWku7Q3PUxFbx74vUccx\n/4p/yXBJlCfrA3UwWTIkxbcuQzEreu91kFwKv5DwVKYw6Qo5K/NAaGuD/7Qk\naCBSUgP4lKpcPlhT1sR2arFSmaY7yPK0NfYAenbFZxG27hxGrHOl+USVdY0F\nfxHvF9ylgRCjOCTD6Qql5ZJWVDQ9aGdrLHvHTYrxH7MSAyKxK05qhZgJOBu6\n+HaIzGTAJbxamNAJlhE6k9y5J9AV/tqx9EI2ux+3cIf2r4N52ctmG0YsVWLA\nrFeXQJk+8SYp2pjM+I541e2rNlK2vNgpfq2DtU+8q44LhQmPz/8EbZ3fAwmp\njWI+\r\n=xthw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgqX116+paTE0/NKy+KFHvABCUsdP9lD/KXLswvr0qPgIgEIqmwzdQ+O/4gyL3lvtyVg/zvJdJBenHOHQyqMg40RA="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190817_1566025726282_0.5417555536251886"},"_hasShrinkwrap":false},"0.14.0-nightly.20190818":{"name":"brs","version":"0.14.0-nightly.20190818","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190818","dist":{"shasum":"0604c13d07eab25b9a9d8e8624fed1259b4a2d1e","integrity":"sha512-1j2XGaF2t+2ZTOUpZhUvJgTMPgwM1OtgveDvYtHJLPs9CWL5IWiWhEFTjg3gDsnegr9S69BYRqK6PZM2YE9iGA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190818.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdWPleCRA9TVsSAnZWagAAtHYP/3xy4RZfOwbxMORjQKWu\niDdoCykqdKCrvSReNfcsVEdcKGK2q6IvkAWApU0ZTxLI59o5vYiAKLkFHiAw\nlWkHRCji2u/CkwG5d+GieNrvVnmfeuOkGEju1c2Pz2ZhGNNbAPG7IQZ2Tr+M\nvRNburyiMt2KkkUUfj2SNINqXhqe395YPhdarRAXfaQsVxuUEckv4FW+kpm7\nfvksh6/rrhd93VKTh6Lj17ADc8BIMpPRkIaJiaVu+5V6k6P7AaFi+NS8m3iN\nVEGQB+AOggAhEAybb5QirtkpeGvYaWBcNbkZAspScobsp3YrTDXMmkzHs1s/\nrTX5WUBCUueZX07rZ3Ltxtlr7C9CsKin2keAaHUtJPBGfa9bTkWQHIHRx7iU\nSit71Jhnv2mS0CGZH+RQMEWaZMISL6Ucizw+gY77gqwRVa2qUJQnoJuWAXPO\nCeAsddSnjKbgJ29HQyI0T7PVjrQFYC9QbdHNbxBK0ySU3sDAL4YzEWtWFECU\n9esRksprqk+qz3eB+aIU5unFmAwFZXKA4YZVHH53OIcXJEEN8NMofsV/bxKT\n3UtmpLyvoCkKx1LKJQu4x3c5z1ldQAIfdZ23GQ0eYQjRsnRrqGo0ynrM9vka\nrNF4Ol0GttJ2dZ1zMfuJEy+sKaX5ciETWmQpyxcrYj//mIcz924UO0lIQBU2\nVYa3\r\n=rrW+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICZJ/H2xzXXchuwYmRg/i5ogpKG1KKXsIWcBD2swOUZmAiEAuFd3bfWN8oCji/MkbeHzfxSKyldxnnM5JnqWEE5iT6U="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190818_1566112093745_0.4221305166309959"},"_hasShrinkwrap":false},"0.14.0-nightly.20190819":{"name":"brs","version":"0.14.0-nightly.20190819","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190819","dist":{"shasum":"21b1591361d5a451dda69e90bdee3f5c710db0dd","integrity":"sha512-EwIZ8NGYymoxDiYvKO2XsXtz2NZJwgJuFM5VADzVf4cjx8MpvUMD4Hi17fmhdxinvvvkh9Vk0VKZc9av9a6VKw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190819.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdWkp6CRA9TVsSAnZWagAAc3IP/i580lu2Y+An7kQ5BvFN\nSqPC72n5vHrxmW/675s5I1oA/E/mqgKcrlkz9FMZ2BonA8j+vINSSQImH6t9\n1L1f2s0kytAUOBunldGB0M/Rph0As8boNXnzQqFwcXF+f0NuPCsWBg9qv/9P\nDxFyNNZIw9pIu8+hVQ9EODUUE2XXDqBI7LBGDUHJf9RAfD2R+Rv2SWgiPvxz\nsLTtG/VW1e8X9EPkBxbZKIHWwNBr+WmDLPw9WSOjLMU/5cJbpGnIxWTgbXHs\nKDqLYaefUlusO4zJlq7boEY04QsCeeeMXx32qw7V2NuI8SZpXzrgz9nB0Ozy\nlWG1+j24cfm/0i8zk+C1qpLY4G2w0uIHS+jcyNaDXIZiUvJDfj450GVBbt8T\nKLmNGzttN/YTpd9b3mGM1WZ4AeUOYlYPmNHS1ST0ryXWwXKf4caeYgUQeL9Q\n1hR8t74ie2Xy1XvXjfsLrnQRq+pvyhJH5GXDmDacB5w8GdlBH0zQTgA0SkUb\noGi+dkteEwpHDpeOW5R4MMYX4sYFeQYQIhT8jVyPvi4gDgHcRc6DDKDMR5Zs\nyTmSQuzJzpbFEl0FVTxVjBsUxbw4q6FEHfQV6WVQKfx+gk6peW/5KVEIY816\nmfR2FvSkj7DphL10KBp9wo32Zwd/tizhNXMcwtVdPCZTo+Lxqf6WWXgdw9xf\nL8Be\r\n=L8op\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID0NaMEx+sCNUU5CvTOhKjRoQJhL2CZSa5kzuC1BUQnQAiEApH4a9cA5/Mnnzsc0HD2nK1bF3AShXx6ZfXfPDpdCzI8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190819_1566198393803_0.6871689077112302"},"_hasShrinkwrap":false},"0.14.0-nightly.20190820":{"name":"brs","version":"0.14.0-nightly.20190820","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190820","dist":{"shasum":"4bafe6498049d98a256751d4fde4d640c7c24ac0","integrity":"sha512-YzHdjTkKzaNCgG5DJWXmQUyJ3S6pOiFfrzkUO6n+sgFXoxUtIHqWOE5m1ySd18fwigU2a6Y5f1BdXB1QWM8yaA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190820.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdW5wACRA9TVsSAnZWagAAfC4P/3qYo1O1HKzJfI2WWfI7\nRcLpED/pDA+i8iuCYQ+X125qQ2gXOX5DirYklFxoOqO+IoU/PZ7hKj3K/3F1\nFwITyR0NXBCr2Q34N4iM85vvdQ0hJjf0DMHz7ctLYTuG98KbhOtEoKjKSP4G\nCtPgpaFCStB+UiMJ9T8gkVEOUp/C1WGMTE6WByVCcG/qTpwVQYd3AXp0b14z\nn7ipgm2cbGYNVnFSG9CKu0fH7R/s1gpw+m4DdCUpSiqQU7qfcVTbknFz2EA/\nGDgxdtfuh740H1gY05KxKQrhmWv0kk+qJGwBrppamQrsjrYABmTn7t6GuZVX\nNZTfIcBTl33XhjzKooxrP4eK7nxGqCbOcqeuJIsYGE1YRbb9vxQE7WCblpmS\nqQ+axlJOUlzvecI3F+4IVV9vxZ0lmcK389HF2Hjxtul6zY/U2qM9OoBbulYo\naamdNw2n+5gzUHAUEKWwzr/vQ2ldFYkhaKHFh754AuqbCjnomY8zV6Me5nll\nsx604B765+bBsxzUse96/oe44aeiGlFEF7iwWRD7JmgZJ+6vL6lGfiGB5uRI\nYHIlD7alKvLjkyhRwAeLyUvYZGQouMaqhkIrOtdxM7nLgloiz9rHTLVrpMDI\nGt/oRIua+yEs8rsyw0m1yFgNshMUXIzLYa6l7NwVedjAonh3XFvq0mlL+2ND\n1BGb\r\n=rXnp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA09MKzCzwZDOWBq071XBJQDQSx5hGcmQbULfoyNazTOAiEApDTsw9Typ/sncRjNBevb28+3DpsB/HLOUreWXmwTvxg="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190820_1566284800058_0.555409372243385"},"_hasShrinkwrap":false},"0.14.0-nightly.20190821":{"name":"brs","version":"0.14.0-nightly.20190821","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190821","dist":{"shasum":"a5d6befa95a6cb616af0bff3b50fc6e4f25c6540","integrity":"sha512-FTrdhDgahsdh4bnr6adIOFd6ZX55agE9Fk1OJS4WGwW00j8faKtbbjb1x0SKf9wHDWjZD/MYvdmtZMRo7fmJ6Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190821.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXO1/CRA9TVsSAnZWagAAKEMP/2QC6gh6/mrmLUGWXkc1\nKh4FexYxgMXNtkJUZUFtRDh9N3h+JvUYXWy/5X+N7H0oTJ5gd9r8q1Rkzs4i\nl3nH8tv1Pq5Gssbe5kEe4DgrbEFV03mtYY135ZZ7+VY5+krL8FB1rFxhvGGC\nHvzFe/i4lMlm1KoAvv7ZT+DLNPH9z7oLt9Zstnpqzpe21ut01kN3fEj58oUm\nCyEkWynmggbdjrpA743OCeCuItt6/0+QBu8R90QFEVCEp7KJ7lHp8NIaB9Wh\nHuGZgZGXieZKP64xrQnGNNJDHacLo3KHS6qFd620zWGS3wnA6VX/yYTTwkW5\nEOG5z0YKc0crt0ObB9YtcXc9zLIJD4NHQxqBuv22PGDl3d74dBnmaM1MCQiI\nvrQOukBYxdp4JFnF+9DovtPmjnEMRxvonrQ+Kns41+xU1YRyJOVCAwwW4xH9\nNWk/J3X1zYMFYL2J2w93gSh8SQK94ykeoaL3SxU/WUHgyWkN/3IMmk6KpRFX\nnRD49ed6gsrIAIR3h9q2kPLWmsT7gK80/aq0P8ZyXHDwdKeIk/eKTg5Mc63m\nCgQ1mU7u8E1xpIs+xJr5XqMWAbIXA5r+/i7K7zkAJq8me9bkHkdu9zUQ7Nyk\nGwC1xboSJszaCTr5hX5YDVCPLw9A335zGE07EumuctvlQTx2bMYV9HWIOwkM\nCFpc\r\n=8wWd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEWxBrQAAu52cdu0+TZfyNwpBR7E15yD87RWCqtihdUQAiBUeFohaG6Co7nPeE/Y3m/AH1DVrCadZ0COkxqFCPOOIg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190821_1566371198946_0.7225656715723501"},"_hasShrinkwrap":false},"0.14.0-nightly.20190822":{"name":"brs","version":"0.14.0-nightly.20190822","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190822","dist":{"shasum":"7c9e79fb0506de39a574e3c0acbb30634ce49df4","integrity":"sha512-/dA2FuoCroL8YQkmpG23uAHrRSjsxGg5Og/gycLoY30dNQrqeZdx5XB2demqXxr9M82atPq80K9wACIMLworGw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190822.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXj70CRA9TVsSAnZWagAAqOwP/1WKb04ajcTeGBEkjJyF\nGDqzgp9hh8N57TyUnhhyPbp1e7i7hnN5P9Z8+rRe8+7jYwFpprLFXgnn/57W\noY6Fzmcy1TzOvHC7SFrCdPW60qDXbWpv1aqwwfpHoPCbauwMTVBo8S8FUMuY\nadTshZL4faOx2tyRrrx+LpLsxUYNsTiC5kaAqkJaMyzV2Dw4G3M5nDmBHx6V\nwQsOp65CU2y+Shzlt/p/d8VJcAVTMIGwx7FJGmPBJ+t+XODllhovbyuwcg1F\nCAj7quuJOrLX5Kl2J5FhJr4JaCQajqHgfcnVey1YVyllqekD/ezLaKs2a3R6\nPM0rX1Z5lPZXLcr1ubNDWmNSdHh7xKq06LfYRCUJ7lTXY+SEIJA/31XoCEPW\nCWJDKNH6ZltQgzHvUqAWl6H3WkoTnTKp/DmD37wM8qlmSPIuqn9tJclyK3ws\n3XXLFEWmnsgYzXE3ozImi0VmwPsYsFYPVE6azrr4HvMYerK+ce8RSkfv5Gq/\nwWyZN3IfOn0RY4MsdEexSPbxE7sR62G/k6YsD/4U1S+txKvVYUGsEwuq9h21\nwFmauDCOaRRu2ohPu3k9maVoVPU7O6RFTfIbHkANygtSz3I6VwKOm07LtJBK\nCFTJCKlVYNGgzZxru6HiA/gMYp1SpVBEHCQHMt6fOcywANEIaKNOk6YDXRn8\no5GM\r\n=eFO7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAnZSztd2GCx0pPj+s2hOQBrHHjKBseG8VKdXQEQnPnUAiEAkIJ66kXqk4peTJUo/k0T/pELfILDvZDjasCi9v7kYRo="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190822_1566457588251_0.11115496729279273"},"_hasShrinkwrap":false},"0.14.0-nightly.20190823":{"name":"brs","version":"0.14.0-nightly.20190823","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190823","dist":{"shasum":"4533dd9a672ae10209fd8d1aad1168b902c174f6","integrity":"sha512-goo5ZVkkTs+UkoVf8cGkGF1EMAd9wB+y2jmwE/Mk4dHshNgEB2//lcRIQFkkB0cA5RYRlY8CkBUT2ErXgzPd6A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190823.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdX5CeCRA9TVsSAnZWagAAMO0P/izDGzbvSRWiTziXPe9F\nOCM94gktPAy2+BuLaJDY9ZpfElw1C3sMUiVyGLg7wsDoLDN1iq+RZ6I5dazN\nSg0etbQITUBcQ3Ab3hL8DgLPg8o36ql05Co1w2p9MVromSGQes3zdtW99uf4\nCjWLPPMmHsq+ml8iIn7vau97WvjqJ8R1yQrxp7oEopoS6br0gwemlebls5F5\nDQFHRLVG/q842N5lmXVGvBwBYMJsWmb0+www4tW5E6EHomqApHjNwUuQssUX\nd858dEnFUIm9NP0lQLCi7XhSJIxqN496Jm3OQQwPDaMz1np6PenduEg268HS\n7Ate4qYukb9mmvgB6bDtWTSYGXL4tmwonjd6JiU2EUnWlT0h9NtstOkrRt7h\nSvtOVrp20yVgRJrWAiHyfw1G0gb9HijWDGNTe9/UwhG+UNEl56WGJ2XhNWpq\n3TyQdAvpCKXTmiXWAxTTv630G57d5cikHfug1Eh1sImqUyVBQYeCzF0yE4lS\nFXFxtwuh4iyDvSnKJXPgu3ZzT66VnlZhxTCmVrMGE/NunbEddmARpvcXWYVp\nNz28n5LOleqPNsr28bGpbBHoS8uvCFP1jmFxwHWMubtnraof90fezv/USNAo\nhGkFJl0QNibhm1egHyQrQkXNCz3VzVKkQmZrz7PXn4aiC7VCgAOya9XvyCMZ\n0n1F\r\n=AELz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4bwyHtGcLiuzoXvOEiB/73ffbRxytPZL9TlOevPIGNgIhAO86DeQ3XofR9Vg6Ihr+L6ix7TXhQkdSm8mUTtPO/5VN"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190823_1566544029358_0.7246014789692485"},"_hasShrinkwrap":false},"0.14.0-nightly.20190824":{"name":"brs","version":"0.14.0-nightly.20190824","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190824","dist":{"shasum":"19dcc4abe4bd58e1b5269355d45096d6423a0a81","integrity":"sha512-c+mhuqUA2lBBoQVwPuWtwnnEhetIXQi/ybYwevMIqyRScEM5+W0xPlZ+K3hyj1ySXjLzGzEWDGy4zQM/rua2aw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190824.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYOHtCRA9TVsSAnZWagAAD1YP/1YGFng0VB6/EV/IpNZc\n0LHEQlHDBGwTkn4HDyNgeJFUuTTsAozUk7TWSf95iFJN5BaPjlm207a+jo/w\nvCQbK7OOkiSf0T0zhIcGZAN6tHA36Dfwy1OOPZGKsts5Tgs3AQLpHVbkqR77\nox1lW/tJDemVNuHtLybBur+96M9Qap5gVVLT6dW/i1ISKtAtgkm7LL19mrPC\nJ8bXoUdD3jjMaglbRmmG8tv0wPehIYr+sAIXJ6uT6PX7Rkw22EfQsqfy60k+\nHqzX+EUqjbpVZRl33lFQ6++3mcsfskZEAqx60Q9iaQ4W7NMWn6X5gIeN5Icb\n1FMhCyUBFhssyEv6tw6uyIgB0JOcO45nQh9ZnaJIclsuZD598ptGVBOyUUN2\nh1XO5zWsEkfeeOA5Fl+OurpZdn3g9U9V041kAbSwUV1WxIjXmm5bFWBhqkkd\nqHNnyC5O8OSUGd5at8i5ZqxJODNF7xJL5um+wgEyhSVtt84jzHe1FIQCYvPx\nPu5huqsR5wrlYHLxP1OK+V0U4kdfkate8KTi/HPHmYTGIotZfmIi9x6T0geI\np9nhX2QnV/qvy8csRy6KxOiYR3bfK7IlMiJW2aCb4DTPOavPe3WjnR7fS001\n1gy3g8uZl11iqYuxiuR8BGmekw9CmLdMHSKX/1nvn0OyEqRm9F3pxcXu111V\nlv9d\r\n=NJo/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+tM3xfN0NHn2fZ6zNd4ITvSyBwc+WyX/Rc9/PFII5oAIhAKMSriT8ab3x9jPrtXnbm12lHcxsGumSQEM9r89iwcB2"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190824_1566630380535_0.2566580798498235"},"_hasShrinkwrap":false},"0.14.0-nightly.20190825":{"name":"brs","version":"0.14.0-nightly.20190825","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190825","dist":{"shasum":"ab980702f6a0e1e68b91c5c69a6eba6699239a21","integrity":"sha512-LJ9srQeUruulsffRay6NDv+lF7B/Ldk40IZDaRk6DHl2mos4tA0PXufpTuVyDxzTAI8o8a4AxuCxg5WV7nTPnA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190825.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYjOoCRA9TVsSAnZWagAAB8MP/AibYemQq8I0hzsixS++\nPSqhXX1bkxBwrhEsoAodVxDujmpnuOmd3J05PWic7jWV5czEkgcNA+nQ47Qa\nbsfc1D/GNw/CvUXXKcbRQgCpIJCecWSF1mawuIVo5/ssg51WFYyR9Jwo7DiX\npPREHogqxHFQ5Paq7rwDZPKjSG62EXrkaSv0NTiHkYR7YNssODsIZjbxrSVq\nywQnzaRk9THNo691Sbqwk2jME1WxA4xtk/M0jUWmxjOmx2vv3u4wTj3yPnrI\nJAIbh+TC6Hlvz5F1JnrVgy8Beryn9dEbWxHBHfqFOvUMReuVarKsf9aBVs+G\n6jezVlaCYzHDunZ6V3feuMuuhcazJ86ImRqrHiWG7PxmBP9sHaNwwOnDVKSZ\nQOL6QS2AMe+HPdP+X4uuB6XQJAGpJ/e/CwHWa1boi/ErY937aQT5BBR4EVRb\nQRfoqvnkwrTmVwQ/Xa8+ybkdlPM6tsLt1tdk/qXPiKsqtcBKji6dkrT1IwW4\nWobGVEhrZVP1QBSzo81Q7ljgtboT/AJGfeL10uQ0q+c5CYy5WaAw8UO9ev1R\nh6gDkCAoyPRaajiey+7TEYmsaQSbmpAkc5TcLFoR+AOgzwtQliMfaqHP8A4k\nsAwxSYgg7S1xj4qh49wFLgckv8tYN/RjoQHQFDowMCYysWNTIlO+PfAy8P+2\n22dr\r\n=ofRP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHI71euTaCf7UPNM6NvrPGqSqL3nC0+c/CW9xOYaFn6iAiAMS8jBm7DU133fCVurtdzVP5Qub+vXk4uq1793aEmZQg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190825_1566716839465_0.13699097695244955"},"_hasShrinkwrap":false},"0.14.0-nightly.20190826":{"name":"brs","version":"0.14.0-nightly.20190826","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190826","dist":{"shasum":"e68b9803abcac71a8499eb3527344fbc178e5831","integrity":"sha512-++AA0Kxhrn/LgU8e/EcetduErqycZAf2WGBo9bA3tx4yJAtSq1OdCHfq/cCEpjjrkLeGE+Na0+9D/aY8ZCu+Gg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190826.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdY4UJCRA9TVsSAnZWagAAOn8QAKCg7TptAnr3L/0rCIzm\nS93+8zOKpiypyMx2gjJNoqA7NXnWgkPV/EyQMikGqokUTXS1pZAlFYELFiT0\n3CEljbLwWqWACGVbHy4aZgXXJglrOk9gXpUBJM/wMu63yC2LlsGuKXpVSx/p\n+l2MeQAmYdECHTDISlYslX2hoX9CCZIiSCTicn5wsKM1sC29I3ZGI9/6Z7vH\nNS6kZO14O/IO70IJtWmOIGa375Dcx+EkTeRUNOpMzcv7EhbgqR6QbSAWyHnI\nrv3IWj2CO6Q49JrtFAwTyvHzE+Tr7PrOCkPrtdkYZZD6gMvI15d2390AZJ+F\nQj1N25VvaLC4QxWwvkai6eUYk6kk5+STGQmcMfd0sUE3YU4DjKsgGdy9A0Sg\nIAAXSQfSEgH/1O4ru/0hGWoMDENstAE9La5EoRBH7r2x0NVIInSp34hu+ICa\nDmKadDnrUPYllKF4rcYXG855ZdV0QShBUyOtGGH7Vk8rm1l/0T8FTO5/iM9w\n55HzcGcLev/Kg8qCa+knBbu9zmiMUZEVgnkLZNt0quiP67uDeyf+stysWwiu\nQ9myXF3yJMxCspo+GNtbb9a0uJeWyCmPea1A+ggfjc3sl4y1NnASedFTCai6\nW9od8DWb9bfcQ5PAaDoSv2V/dFeWeln2h21JJf5TqGZZq9EHOPTuqAhTSHPF\nxEVf\r\n=GGci\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwsuUHs7jWJCZ6cBxLmjRkdGTCfS7DaAVLss9zjkjOMAIgeDoc3l9oP756uzRsZI3UfqufnT2MCw72rbjYtKC/60o="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190826_1566803208443_0.9738027672567164"},"_hasShrinkwrap":false},"0.14.0-nightly.20190827":{"name":"brs","version":"0.14.0-nightly.20190827","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190827","dist":{"shasum":"59907231494245ee5971ebb8eb328d9f5fed2ccf","integrity":"sha512-pnT1ERowPp8l8/mmDaOJRo83Dx94yWIgx7CqTL60xiLdYV5k0hpe0x/R8Q8otNUkv62oeWEBl8L5wPKO5IfKuw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190827.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZNajCRA9TVsSAnZWagAAy4YP/1GENEYOl6hbgakwogb8\nbZ//8XeG98DiF1DCS63qvzVlflxDK3LX0jSUu+AHIpxuOCK41crEuGuEdXZg\nUfDaXK56vCPh0fSA44nrgldY9lq2M6ScsVTdKvu7ZgoxvIhTNP9YCbCo8K8a\nu8EmCc3nFZfPWAAly5b/is8zJH3cQfZm/yGjcTHtNIAC2BYWkQUKLj9vkOsp\nfUJPPExagT7OCtEzzZ8aQ2BtfjoF0k/L+6ZRSPeY8uUq8wDUA2i9J1kjdNgd\nLmFKRLjej4rHMfmEETNriO8Xbg0KTtD00e+CZtOBN2uLy5jW3d9YK8T5+j79\nFjBbnfljVuZsxg6enOrEabKMRob5kbjrtZOARonoGGAras+wh9nQehdgf5Kw\nNZsjRoNtQhLLgU0/JbVWvU29ZW2QpkwkUBgRRZqlbWzeVzaSbBYKlUSiEktY\n+tE8eWAAVJBfThbTWxZA0UNHAtbAiT3hlFHpdDParITDYKW1lTFncn8fTBtX\nTerVbqtZpj1vn+mG2Y5nwguzGd+yuGCyIuN6xeScmFrK89SfIVfVDC4wQsU3\naGEY7hGKGTl2pVwFbk8ZPWxeMDAiq5h8Em4KT92VL2792iAZLhaIVb0FN00D\niwBwmX+BFUgWusXkYcB5T5I/GaF8yPtBLos1nqdXA7fz1jqHWZGXy9mvHRR+\nxm32\r\n=bEi9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID3RCUxBjBv2RJc+/3b0mHjUL4NcbHwNsqqG8/o4IMvpAiAP0bHDFv+v2zJu/8RJlxfIN4Iobp1rqnaJopUI9nR4qQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190827_1566889634499_0.02246396067378842"},"_hasShrinkwrap":false},"0.14.0-nightly.20190828":{"name":"brs","version":"0.14.0-nightly.20190828","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190828","dist":{"shasum":"657a9825b81c3d6b9bd68a55b432566d2b567c70","integrity":"sha512-DLiuo6f61u6cAfu1jiYFIbRDE2MW/mF0cW1kESJj/+dRrioITufvjby+iM8uA3a24Fpt5gk18hlnYbqy2xFKOA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190828.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZigfCRA9TVsSAnZWagAANWEP/RjDkqDjY9c7lqjriQMq\nV/AfO4EFhf4vPmF4bPZ6vxUo06B/ipgpTTmVkrk+Xr5x3+4eo9Y+LEAgYWnn\nSLQMN9iSFnwlkvt7/qir8GooD25n6uouQXhWAWxfmuhz9rGDiL1rhB2zraDK\nKDG2HUI592FvI0R27BKsbGYg3bXGgyctWTvs/kpQ1eqzQ2d+eYPHT8UKPEaV\nLK+9pa8wySIhiyXXF5NU9TYckARXcJcJS2ocJDtlOtp5MVZIDw58IOQ6YFLr\nXww4OFllv2EPgBavSIL8p+5TKcZK+RtMj9XYwBuEnRVZswCaJEDKCSKnj416\npDVgGh1egnAPUh1t1/fDmB+GFIqJAH/tSvBFo/8IQsKQoSgcSGZKrnujn8wC\n9J7oSpUavnUBFFRubHkgcky4XdVnDcv+CWOBiE8mwhjsSKFbtokrcmKEkQT6\nYHdGE/UN6sCNNiy0pjOms8aXpavS9P7uxW9a02AcRFSc2QCDyPRmQ85yhZgU\nPMHuMhF9FNlVt6Wi1+hTib5cvgVRhKbxzO7UIO/rc6xGOvynLHSk19BK96xP\nwCPHXoQMzjq/RplgAGoPtxB8adHjnL8Eye5If/PjCl/VGO85oNFDLlIB5bvM\no95bqnhMHrVyQ9S0tpqHWSwvd8U3tfd6lwYoNOBxhp9j/ORsM+2cpccXNbrj\nj0U7\r\n=Z3Iz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9r81qggAbxntrHDxnLSou/KUl3VbkLXuiGwvrYnRaIAIhAOWMJOL6SMUcaThvS6JB6XafqOMdeaE6JQDRSSmLtyi8"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190828_1566976031057_0.18089579610681517"},"_hasShrinkwrap":false},"0.14.0-nightly.20190829":{"name":"brs","version":"0.14.0-nightly.20190829","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190829","dist":{"shasum":"617b093f0b85be170cda4be2256a4aad71163145","integrity":"sha512-L45DPUoxmjxsQeM7PxMFTG8gwEjJO36ly7VZAKHI4k5qCYCO9qgQgh1hgOrMOqzONH8Q+LvTx17SNxS7VGkTtQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190829.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZ3lzCRA9TVsSAnZWagAAZlwP/jkNBSbzMldRs2vidDCi\n0h6TaMVfliWxHH0sHJwqq3Zw47f9pd2Hkb6DgeGiXIqMwgBF7kenOnA0ujKx\n4/BEczxh5o4DzqlFHGof2ik+srSHqw3LGcFUBNzoP+onvkgXNsYB41dR2zZq\nQ4VDpddqvoRnIJ1QpZhkQhwKIOZQUX6VE8/O6/dmnOg6e6KGCg0SABSbXjdq\nFd4CX2VVLMisSlaoZUoBEdaulSrZh8HzMsvfbVgLV7WXvWILUsuHHKEQ5qEo\nkuPD5UuPSE8bqM8KgO9PGO1/+JKngQHFgFcojEaf5e5ic8gIR2QHf2M8q1HD\nNdmkATt0V87hGpw1VjVR6oc8FbB9/She0IS5WGBu2UGIRxs3hIYGc+kPO1We\nALTvcYUK/HSwfAYqdH2U8Fgr4Gf0C6uWO3vVNBhXLxVhvwCgDmO6CGAOYnao\nDiiqoI9/pdT9yM8h4cB5J/BswcJLCk8/t1lxWYjXY88ZNk4ce9lCFJkncroA\nWYs2vCufAgR4xZZtWjBLzu9HNGvdaEPxK6wQGVLUrQcJJbPLpHiKCLisQR0R\nB1L028fYbq1ye5axEa0z9Ffl0+brsGBM2bJZEnQrIvb7q+2mEN2BS5M80X8+\npSoKlC4YirjzrPMOVY19UPnC7L3f1tEyde+xcR5UXgwgkpKTNQVy80IghUyb\nNzP6\r\n=/Hnm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDs5KGEZ79oKg4eCPUTNRo0wSKdHIU5D0Av1QOWiD+uwAiEAoMi46Z1/qqeu1le/V8l2AaINCcnhnY6OI7/m1wlnDio="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190829_1567062386627_0.08799650539806891"},"_hasShrinkwrap":false},"0.14.0-nightly.20190830":{"name":"brs","version":"0.14.0-nightly.20190830","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190830","dist":{"shasum":"aad452d0c0383b6365967f33e545daeff3e3db6f","integrity":"sha512-y2/KdVTNLXU38HJ84GEbVJsC99Q+5ism0LeTvj2h6gSaDcPOwuchJWI+iRJC3ReEUR4HiGOMDHQF+y1UBr5TjQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190830.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaMsQCRA9TVsSAnZWagAASg8QAJcynfRRgrs+e44acNu7\nbxjnyICwbwEmvtff8pQfE7GrguFSOHVQrSCU2oD1uZGryYU6x+9Brl1CkD/Q\nAPnA/24/5SXtBOXIdoQUjSaunbI76z+CYOGMM/v8Otz1cnc6shlo1uS9TCcv\nYYu5x0xCNbpVfE3LabYhgIi82yMx4PjgkMPyTf8BDQYLS0ZCOhXtdBQuAPFD\ngz0DFYmr7wwWAZD03QwjNHpyP0raJ+Zdg1JHaabjDr5hNg1Vqd//1Ep3oC4Y\n6uvuwopYBfxRSq2gY2kjD7cRcCAeXbWQjTv1ObOy9hSvsNNJJ4d0DOg6j8xy\naWN03EwFkE/aEoCojkK/tBL396OgQpOmngQlTM7gnhxrlb9dlOgrmLXUG1Ji\nb1fORISW5g+KR+pTsA2uexQhDvo5GMQoEmPujDiUPtdu4R6gszxF2WNUttke\nc+7JDsm1yVv5/wcTVH6KH09zINeXcskCwqJQT0/EG/fDZDpc+Uc0KvZ8Tccc\nO7UzUnnWhwznVxZRqGHrrFzl80EacjYO2ua/xrKcKhRfAiYrp7GYQ0Adbk4L\nzNhkLIVdGiE2FwrHeRTkzSFns8c2C/20JWW+pA951QVskNmuYDmBEZmFXsaV\nh92+03jnBR/4hipqKWTQfpImRYTFFwmRtp45PX/ScAVi0qbUhj0sLemN1kVu\nzjIf\r\n=h/pR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCeWgOVV+S6VYaXk+DxAcS6FD5DIf7Hkvtvg/rCcM9ijgIgcfCb8/2DnSYUYlDZEmfXnLAIdgcERrAXG14n0o+pVKc="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190830_1567148816154_0.8483656746456971"},"_hasShrinkwrap":false},"0.14.0-nightly.20190831":{"name":"brs","version":"0.14.0-nightly.20190831","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190831","dist":{"shasum":"47e6c1e88a600a46d1dc63f8865307da214ef645","integrity":"sha512-UjYfec4U3UlAjUkvhLDpPKdqm7UZ0OU3QQ2z3UK0/10p7afsrXPq4J2/+XWOcdF67FiERrS2FaXEaPeb/QyWnA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190831.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdahxzCRA9TVsSAnZWagAAOF0QAIw+6nuVYaeNiEqZk8O/\npEYRIzNqk44lS2ZcZ4oa/EymScHCiYoiNdbjoJIvBhRqGR7pxamxb7c/FEn6\nJCgoGIB46QrV5lQnMEIafYDEfumngGYnuEcbqbkolsu28ep/dR549NEHDXb0\nW0S55TVo06vvlpERO0twzAJ3rWDVYFpqeG/BfG01+u2EhRpaPgS8jTHKAG7v\nQNKxOr6mYnn1l1HAI0tJhJ4fxd2UX1ENqiDMKVdrXWejq3HANm3XMCCJ+NWl\nroMIEIK35/rEO1cL8Jvbjnui30uUzRc5ZBLztgHreRUL0GG8ISWXpd3VhoMd\nq67Kdubj+WzSlCXWx5l8zLG64ck+qU/NUfa4xKBFJdbQOQn2zcYHL89jsdMF\nMIzvGm/RXv99Wna3rPaXwNXgozdtnB0NOsZ0mZ7QhvQuxuaEX2DR+YhnqJse\n2vhNTxcF5fAMsw3jMaeU6tMG4y0IJJ7yJDb7x0t1aBdCvKw3v6Fknhjp5J0/\nU8LARJ6ozPuN21rg6CJEoMKjF4InGa+edNAcn0/L8qyZM4DCOsZ2RKwidVqY\nVdMDn+dFc0cOQ+ao2q7+0l+pbVa2VHLi+U1VspTNvE9FNSES0wGoPpENXGWi\n9IthaoLaE0j1eVVRZI9eFKEiseJjaNKuspbssv4VmaQDz9I8qNfgtSnMMBdr\nmKn2\r\n=w6C0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICRiagk55xEPuiG4Hv/Amv052UsY/HxjIiFZ1yuMVJJJAiAydd8ziG9QYQiweZOsAXf/WgRJGqS0yY/ZjhQtqP3xKg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190831_1567235186549_0.4840800070166069"},"_hasShrinkwrap":false},"0.14.0-nightly.20190901":{"name":"brs","version":"0.14.0-nightly.20190901","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190901","dist":{"shasum":"e83e54bf8733cc9d39b38a861168fd0869493d2f","integrity":"sha512-H4/BHo0yeYjSfdw1UOcqyVccRjlBQi48eAP6Dy3teQBAGXJoCrultcEDuJ95Fk6Km8FnRgQBCpg3rCZQYpZGwQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190901.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJda24DCRA9TVsSAnZWagAA1REP/3na5OHqY7ZkG3hwCwKX\nTM4lnV2L2bcaGJ/bZV5+ayff9aWYCW3bkQYHMWMhFQZx9XvK59UzokTA4Z4I\nfiSOlGkHNhXmaXfbTpgRf5ezsoCYSmqPIMhp0tF3EkckoaqL3PumIlXQGCSO\n+iEtTrCsQ0bcRKYhWG8OBPujgZ2fAbe81+PN5gylljZxSPPisW7puNxRft0v\nQnJyUabvw5DENna70yPBKNrq8NePFypgzq4K5kLN6GoPfXswZ4Txj6s9N7VU\n1qtozaXZXx32tW+cZPXuVpuwIEguGP0pm64dG2orkguSgcOkcoSm8zNRSqT3\ngPTVYXhFnR/VFHMml84TYIr6pu825ozSP/NH1wbqU39BlJvncuVKZXu3zmxF\nHxU78YjUx2GXo3DFH5MtbTrKYBSI+aJMhCoRV9qVfvF5s1rK1SqujHL4HWpM\ncx5q8ZJ/CUks1qpAcOxLasLCGmpwcrxOFCpVQYi0deC9P9Yzr7kwXuoQuA7C\ndHtTXxhPFpmV0UzLVWuP3Ec2L8XaJ7ZjsyMRbz5Gnxg6po6HtYs/Lh3Q5pWG\nTfpeq7S4fwRLeriLJ/O1wWe4hIgsP7I8pStyWQfqcuoPv371bxL5OGaTOE8B\nfdDHOgyaPuqpGwxHwFvU0akOMCqPIBSgFcP7qFu4IiNT/by9LpBylA335wtg\no+59\r\n=Q8jf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGlweIqts9ifhbAF3UJI2/tO15g4CBOA15FknPyNMjhzAiAjQS3KjTztdk4GC4zYzhzfjgNduUsbBt/CmgirD88CgA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190901_1567321602812_0.8056171784186765"},"_hasShrinkwrap":false},"0.14.0-nightly.20190902":{"name":"brs","version":"0.14.0-nightly.20190902","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190902","dist":{"shasum":"008cdec8dbe0c30039715e48bbf8dca83cf2585d","integrity":"sha512-ZX+O9S2f7f5xyc7NoY2nfnSfKACotvmpDEzutUSA+B11JktcwMwItgBA7sCJDnuwSNvK3Xoc3toftRiVkvGh/Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190902.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbL+DCRA9TVsSAnZWagAApj0QAIaqXRx22rXtLLlFmOJT\nl7fnTdRoblsgPCfJc87NtIk911DvSQv5vBdVcy8asdfld9bJTfor2s221L6C\nq2XbeJe6H0GPDbsyJEYQHXbjBvs7T32sGtOpkyL5XpkDvQbzSskAQEE24CBW\nSqu1OE5t24vwFmwdJgyy4oXgTFJ2T1SDJw/4W8viCspCXYh1mJz/Z+g+G8VN\ns/uTxch/eumbKQNqwCVoDrL3FmWoXrVYIUqZb/2+TD9m1G1c6smHq70eGyn0\naSPNviuGtTxAQizcjrbRzwp8fAJ+JKJgVBwddUsUfZAQcsrc1c9kquZW+P3Q\nJ7l/Lj1cwVtJbZ96BO8N5eGFqb4gQQpRUbVb2W8B76++WND9IxkTeWX3k9bu\n1NNJ9Elz5uzsNO5miwJ7WG0nL8TFwKUZwVnJ9/2LsRLaGS/hXbiSsPUrGkvo\n/PHf12fCUQ1P2tvWL8C2PTQbHbnEF0DRQnRBCuRpfV6oGNxzok3RHcwQQ2+U\nhguj0ZyBIsp9zXUA/4CjhKtAeBXtsQb7qtjaptf1Ir8/ZICv6wQGahqZj+iA\nwNhhZsj1g9bezBX11NXrYDTo5Y8ZU+CEt5NzTKGNB6AZM7CekUayemi7803y\noXQF82vMyNjp3M/gjJN7isLRbNcHaxTthS0yyVLzVTnoEYpKuJ4Zqh+KoGYU\nvbga\r\n=E5nx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwbA948ibBVrRB/0QQJbR3bhZAuwBj7PyfKo9T9SIymgIgctVcq45hPZKP8QVyIq4TEt/DjF7jyOYTQao6uO+aOQw="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190902_1567408002603_0.9372546368458601"},"_hasShrinkwrap":false},"0.14.0-nightly.20190903":{"name":"brs","version":"0.14.0-nightly.20190903","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190903","dist":{"shasum":"fc5798b6f27aa875060b30dfc28b6c0ed1adea34","integrity":"sha512-CAPo8V3Yhg6h97Vow57EMhEtP23eShQN9TZeR9/9Hvy54Kk2T4FMkojSt1z5nbIWpTR1TdG3ib6fEQohpyMdiQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190903.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbhEzCRA9TVsSAnZWagAA3dEP/AszIh1tS2GWdLXVV3vy\naWdgVmeI7Fo1mGDOLLNGEoNoLcI3dvJqKIOhDWxfVn9KPuVts97HH88IMltT\nDe8XOu1yIcDWsrN5A3ul/w8bDeBIAqMbVNMyih1/piSosqfAyynTJf328EJ8\nzQnyNYslUwsL5ZhznPEz8K54lWPrIcoV2q+GAX18fEYlTmNm9Ldqu0VxDD6Y\nsUYeUpVXFG1B/EpFZSMVBljhUqJTzuSTXH0u/bD//Y/DlSVAcCAqz6XafC+F\nvML3sSClvUB9UGz2DVGDjpaf9pDR7V5X9fPNPIMAKgiBRQCi7HRGKS973sud\nyQq6IO4Km4TbhaKVBjb4uN74OTTivTngmAx/xPbMW8eALOHqWaqHULR5IYn5\nf4dE2Fn6viRm5MeWKCSlyr9WrG+uweZf8oaCl5WzJCN04tNRNF6wiJBdoCsg\nCeYAPOhpGllPdmmObt7bp06O6SF0t1YDSNQFzIqE/OzC14WMOS/DsvOa2hir\nBC17DEZl49CKO1tOfqrDkqIBZO/0XVtTTKVIEsbso+CITLt3J6LfhbOEdNxu\nGa/SbASuCV6JmvYAl3HQ1JYNfSX7sBT4Bs4aK/tbkGXvck71kIog0AAlagoS\nApcfhUpvqiDxVOXGwGyQnOBw0E2R7KvvIe3u4G6Db0o1pF5fP4JXon/qCSZb\nT1r+\r\n=wfJH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAmiNBV4eD8VbgsdREiaSk0r9zGRUJp0VyKmZ47970P6AiEA4VfZMyNEooBPB3U1p1eclxxmQfTe0madL4RLy2R+9uI="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190903_1567494450482_0.6897795020980091"},"_hasShrinkwrap":false},"0.14.0-nightly.20190904":{"name":"brs","version":"0.14.0-nightly.20190904","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190904","dist":{"shasum":"f0d14bf694d17ca26176b95143623358af37cb8d","integrity":"sha512-R7qYnNYWPxgJT+GLJ7LrX3LE7xEtRx3z0Htn6q9hOFeNj2Kr2CRvihBlMOnW17S7WWFNV3djxhyKak4Jn9UuHg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190904.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdb2KoCRA9TVsSAnZWagAAyoUQAIx2ZNEruxQRZewPaNnv\nhUy4A69E1jzeWiM6imNE3YXHO6Iv8j1bVMcCfGbB7SZDYpppbSG/K8Mfupn+\n2jjAo0IxBKReTjV+AyTwhcQHqM/f0Z/yV5vmpY9SgRFwEPTx68gJod+KbfZI\nGd/SfsIAUY/J6fyg3CjWKGUMWqNzM1Kip9CaMmWKA7NcPmItOQp14OuceKeL\nAwFiQetuNTvglzbhyMduOkTip8zr6oUGDOsSl0k2EbzD0cIia/sg3gGZka3r\notWSaXf9n1fqfQSXg4CuDJo78GA1SeUHKSbfVuP8ih4moKQGKp8TLInkHkiA\n1An6eiXTtr9E+ja0DoMgz80h4Qb3iFKT+s7f8lgM2nbHdhutXeEa10wyqMo2\n019kJZ4CKFKapSX9PQo3RG2udiX8Ngbi68FpjKFai3M/dtQaOkyn2ukuAuji\n+cgg0hS9JeIdpz4t9Z4HvLBy1QTYvA48BtqxhLx7L4CKM5XmFH63a8J2neWe\nu+itNkNOudJjrQGfTDTWtYFZkNZmqZpOK8rEFWDXpGOqA+uF++mUtGKI7xlB\nGlnt+dlSnTpsF8oYQ2xRrXDIszselNBX+R1vXdynvm7dSmQXkE87xmsqACfc\nSdNAGu6LBTKDvB7bTy7d9MUEvCrDbg+9WJfCGmVUyxbDufbcZ2aYX7ENfQw0\no5rO\r\n=QYgK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCciUt/xp1A2tM0kU7QVMFH1kpHFDbO7Ku0UpMqF+ZzhwIhAKk//B8yWY0uqC+SIjH69tQ61J0hCuXJL46v9AcJW5NM"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190904_1567580839771_0.11555130099174171"},"_hasShrinkwrap":false},"0.14.0-nightly.20190905":{"name":"brs","version":"0.14.0-nightly.20190905","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190905","dist":{"shasum":"348c1093f9ca45e237e979b9f9ce929cacf2999f","integrity":"sha512-Z3w+SRjVKtbw4pGZOvg0yA30RacBUyCPBub2wJsfWh7lBUYIceyx3bKAo/DgJwEq3RYhu6SxnLqSc2JJY/N5OA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190905.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcLQCCRA9TVsSAnZWagAA1ksQAIKdfU6NOElq4czUBHyY\n277m+wrNERwTiGYo8/mIQWTIDhTeK0oti1DbpbAIeMiWMOq0E5bnrOPSyYDD\n0kxqJ29qN3U26Jv52hEuVU2QTmtAfGM4OofJPbYAhbXs8zZmrU8TeTtqc2/X\nwj7diKqHPX7fcsuhEI9tk3nOqZPpGdgqvVDFf1Uprao7sUtUGNKPRYBW+Wpk\nJA2IdjlvAzz7vjc5yR9h6q0NnacZbKvZZroP/TBzkkj03S+PdtC5/wpxM8Su\n4u1xVbVSBxxbnm8WAYBBmNGrTceR07baIg5/jVueE0gwAljLlspr0sjRafDv\naW/MyIDHXd7DfqDOovda7XhQPQPTVfUNNnHAJWE02eCXCE7nwE88xfRAry4j\nYBvBMDdGrvqvJwVXDUEDxhg4A1ROv/UIk3Wy/ESVCj4NzATrNHTUgqIqL3qk\nAAB4u/JcjjZMloy2QAPD18Jlg6hhs5rg3PBHPTwMk3L2nB/Cpet8qrWvwwfh\nGSyUHNujZZ3q8mgFZzAt9hoQ+ZDoZw355oZPSfMruTvV5lcFrQQuBxnsPEGz\nD1jbTwCS+aakKcjsGNSc2FCTAyP+pjIGWNxDDl7qgOt7gqzArOtkz6L8Xl2K\nKEn3eo0hKUrK7Q2Xyl/RuBao3e7jh1OjFPpgkcooTWqB7JjJIn202eq9wSif\n+SWn\r\n=7MBL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsFpLZ002n+3lpy+J9yppw8XDXr1kWPWeK1vRZejki6wIhAMY3tpr6cZt61mhS+HjfR/++PAYmEjBpwcs9akE1/Xky"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190905_1567667201756_0.7114745216041993"},"_hasShrinkwrap":false},"0.14.0-nightly.20190906":{"name":"brs","version":"0.14.0-nightly.20190906","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190906","dist":{"shasum":"54e8699ead5073cad05dc897e3b9abc5da255f86","integrity":"sha512-Kjbgtptkk7mH3ftjE4aS5UzU/Cs92BpLPKRD5bw8PJlbDSPyQORJ5O+CLAQtUZ6dVSK8TwFdx5s57x7NI6CHsg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190906.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcgVxCRA9TVsSAnZWagAAytUP+gKagVEKLScSMK2r1ESL\n4pkynPLLGZeqDJgBbOHG3j0YZc8i8iYdFtLuGybtRn4CyPRhoNaaboKC1zxO\nf9N4ZcI7ITWLC5dxoKPOW27YtjlrmszPHG8pNZ9hWRG8bPmfhwF3ZmDymC1m\nArWOQaoSIZdVQHXJCVdKoT2HLDbfuMp0Bfega0rdRuZ7bkQYhjAMHXop+qot\nbH4qDBm3Y3ADq2cUSokvwqObu2k+kNwaqB6elckW+GXwAFBe2F8H/sUWqCT0\n6CxdAydIoFgfNE42eHWS6sZ4QodJlHqO2jVwTpLm5uiolbYHU/QRGvFEou2g\n67Z4WzgN/jaNfldPchGhDnHz0oHgWIaJ9VUWKKRXrEFJmDSxK01vGF8n45LD\nWXl2LXL5Z5F8z/PRm0ekKjfR9zLQGDQTW3Wr4TxVQfrlSrEo5g6cT1RDGrqv\n45bgT9N1IBkm/AZNupYOYBlWD2RX+MCt/iWGDqC88lJTwnfNPp1NjNCQcVS6\nHylPIBvEIEKThrxp5dqrqSVPO7ZspegFmLOpEl11iqpScxVAfPtkY0UmLyXl\n9sK5QkDsnw7csMGzK6C6yDlFej+B1KFTpY4/XKpMNadXQzHJQVr8anLFlpsG\n8zl8hJRL4DL8q345vOcJ+cRHBbqaPVhlTgUrX8psbvvkll/TR+qF5VY5FB+5\nWsYB\r\n=6b1o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+NN9mEd3o3+DgdWa0yjqkCa6k41nFe/Xgm5kfcSI8LwIgFXEBSNbbSs7CEuSfyZclSqlHNLNQqdam3dIgPpgUORs="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190906_1567753585104_0.9277695407424786"},"_hasShrinkwrap":false},"0.14.0-nightly.20190907":{"name":"brs","version":"0.14.0-nightly.20190907","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190907","dist":{"shasum":"0c705b1fc794e3e67f9806776d9befd6bdddefd8","integrity":"sha512-rJSOqMKxOc6l0uyUtvFWwBkgF8dGVQaTLD4tdcnBQ6KU7vuCmVih8IR9xLcjI+EXd3eND3gggpBI3K8VC9y4Yg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190907.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdc1cBCRA9TVsSAnZWagAA9S4P/352CW+t94c7/CZgqEpB\nsk9OZ3TyfitOcJO1WA6kHFF6Bln79yG67nQrtH7Ek8oiqBYC8mChOu/1K6En\nQQGdu1D5owHFByUcaK+jLM73KYHXedyIRT56KN3YTp51WOcfHfyvLz53+QKi\nthXTgRqgb9hIcMBTS1ab66rk6Beo8EEBGDesE3Qe4zTbyAnc5pfoKn0YoWew\nq+UNxqwA4YW1qs6CvTgG3U69CSLUupRz0jXnE+B/sL2gnEHEnl4mKx9Y/eZw\nINeWHZ6P/QYTO1qGcd1qgRldvfrt9//phlJsXixcRPzlcvapAsWzpteEk2fV\neQveHRBuHipeRXfZROh9jDwWRbw+1c8PuvIu+UryJ8oU615Vav3N3iGUj9/v\n8Bt7kFo62zF1XBUCMN7VNO+36UgycciJg6QjS4MUnhg9vMpTdWARP0fPS9tY\ncmIp5M0/WkeqDdahu0uqmrZqkCNudA7s8pzVaW4Ux8FGcWwjvOpVbXSfv/ux\nRQezkU+m8JS5nZEYqEbuDUVG8UL6zqqHcPtdOdN1Z2Wmwlq8rwLRyL31GWoE\nSbID3Tgd2jpHI8tripSXO170TmHYxiuQ8FR919H8lzfEhY0+kySAXDzlFPJg\nlDvtp+frJHGKtT2mkQJ97aU0B4xxh53H6OtOFpuQQPyVzMriwkUn/iGG16KX\n/ScX\r\n=LBYY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcNs774D5/grtgMlpuxWEQrYXAwTOX7a/c2C0+IdCU6AIgDmEZrJsv0Z36SrUWJryqe3Mo/FQZvsyu8YeYUFblaFU="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190907_1567840000642_0.6638940231374264"},"_hasShrinkwrap":false},"0.14.0-nightly.20190908":{"name":"brs","version":"0.14.0-nightly.20190908","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190908","dist":{"shasum":"d78de3484c25356fef5cb564b6cd910137688f4f","integrity":"sha512-tTwNulxSwWJK6pS0Yq+em12Gn+JH4hL9wGk05JLBqa1qK1eDEIr0HdwDnluBj9KBjQ3pikvoig6SK0RXcBNCig==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190908.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddKiECRA9TVsSAnZWagAAMW8P/AgSVYHIzDvM1mDj3TGW\nwVe3BYEgl27moQsk0q84kJ18r8ylXf9XEnRB1Cmz+fRAYN1rL8bSWp18Q3R+\n7uUWFR9Ha8o0WPBX/71jgCCCl8cWKkrfFJHZLlCOtmiMLtb0otKIsQMy8QAz\nbjhIhf9NavUNX8XXfUO0a+mW+96Mz95YQ/xL29cybKsVr67Gn7o0NQeNLlSN\n5kiRMUF2zEyVK3v3XBmD9pR9n2/g8cf554c2bWvSqUtOQj7/9AYUUd01qf/7\nFcdwB7YoDG222QMLPrH3lSoeTa3b/5aG5RrECHlOAVZRcbF3kjp0dUoQDUZD\n+SSrkXM8CQYW5J6BTh2+om5QXkr50CHlNzvc8EQWX0mEtlDp+u+MGaYBKKDE\nWql2yMFwL67EQSOLB4r+lf3q+2SWa7Xm930cxGAUlfrwGZP5wFOXDlxwtE5Z\nrs6pYToZqDUPwuEwxBZsNTGUDzbTIzVM8hFyOIl074aOFqIasUWxsUNqfPPo\n1fWAZOy3akxQmKXjhmhemMwmsFLETsCLfaiItsCKebxayevvRtom5ibrwRwD\n6aBTHWtdsciNILqcrjGCszVGuaZRvpYwtDTNQ7ybpFnkIB+3SuPZ+a2ldcHv\nVU2hLBckVcIdZtPjYnP6K+P1VHW9k2lp/tDDlF+X9fPxTn9/kVZOnoldlwMZ\neHNJ\r\n=5j7Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTBptx9VWISdp5/01HF6Y1KxVzGb288JlJwNOqEREu4QIhAL93lmQLxSAIQ7cFkpIw5OXXmisUdgZgvSBSoJIjtuVh"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190908_1567926403854_0.8398462569945297"},"_hasShrinkwrap":false},"0.14.0-nightly.20190910":{"name":"brs","version":"0.14.0-nightly.20190910","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190910","dist":{"shasum":"bd74a4d40524aa6da0152e32b767eb7ce212889b","integrity":"sha512-DsbUwKu5PUD0/Js7vu+MCuc9B3J7VhjfnO6NHUzNTUdpg4djte8aKa46IP9x9obsQzWjo2X7Nj/VNSVTQHR2RQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190910.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdd0uOCRA9TVsSAnZWagAAzPgP/06NcBhotDAzfKS2mLJe\nLK7RHF1ZdDvQu4L5PoZD/dF76H4pltj6D1gSM1HzQlfWr+fHqPhsFRFyEO0l\nrE5Nb/k2gFWxfCB05IYlHooOD34f8X86yZL9dIYbssuL/GudRSvYu3tu5RcE\nRpGP0nqPYQHpgea2hAPlwpv0UU9ZX3xRVNTjRP8cCpQCU4Z+BEjhUuMg4Lv0\nCddAYKOYdVyk75Y5Ts1WqwouDh0EGZLz1dkcbxvP0AvVoRSN6f0uY2wBCW/c\nhlRkvQqoQ77cJtKwItJ76Un6Of8XFnp+ReT/nXzxWLtENeN+iNTI8zKUIH64\nxubUlJt1FsQC5k6nMRrmU8gCh0CwQkPiknXMajGNehpEqEVRyfD/5tHin3r4\nXRD/saiiaBuQ2rKkR629zH9YNE2Xh4wO8LosjdT+gfPA2++o4JnZfk1yZeEU\nGWReGOD4uaqCIBJm+3/JAlFQo57WYrjPQw/wlnUGXFJbeo1OuW13W92F2Rm+\nVmSQV46RsfTAWPU2Ye01BUhFOibv/naiQ8Q1HPG+uCwGK8ip2P6+/QomthnC\nCADpAGIAgv/9fnZImNxPw0qADRKN1ebvdPElgOq2nqyPni6sDb0KJ1ZAbKL6\nhUBqsctkLP3G+H3nq1oPNTxmNKnFdzuuStGs/s05O3dx2oBWrpb/UUOjfqpq\nc1yg\r\n=los4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDH8iuAztZ5HuwGHrRdt6ITMT+xe1hHo8U/xUVnQJpguwIhAPxE9lfL+DQgSzDPdqYa9gIA7tbT4GDdwpW7yw2/M+B9"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190910_1568099213201_0.916658684394503"},"_hasShrinkwrap":false},"0.14.0-nightly.20190911":{"name":"brs","version":"0.14.0-nightly.20190911","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190911","dist":{"shasum":"ac30d3eea357be8aca880edac20cacbfd34b64ea","integrity":"sha512-JAoZ2MNXEeqR7JufE2Wu+CnrcPHcsrRdR9nEe5zwGOFnd724du8FXBeeGjc61f+hcwh3jY+HYM+OBL+6SDeQjg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190911.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeJz2CRA9TVsSAnZWagAAc7oP/2vpiD3qsXw5T90jvRnQ\nbJITkPA3rl16k2GhWCUXogIOvpf/9MfORiQc8j1r2UZIjcIqX/1fbpbAUmdC\nJG62+R8iKLHRQpEAbmVd96nQCQIoQ+ETlO9Di9zEyc5NMyCHsMtLx2OkHWon\nXao08JOmEYDKpXRucxGd/7DuFTBJpf+dcNwxk9523pfzOh1iFkkXiL6wehsb\nvfc3uBkxZueGYl/36ANgIlKAuD5izR4losG+6duTdv7EsXCfdC/b54385g4Q\nWJIXIolV6PIDgZN4796Ayu6W4SJ8XF2bo60iDuLfTSjkFedLNRS6GRrrwQze\ncBMGPhYFOCyIDCutngM9M6Db5cyj2IHcrSlihi5RBMivnW1vZgCAEJWVlfF2\nPkA+FCqTglN+ciEvdwdO2/Gd0k4e1D5q4+sMfDo/et1IY4TYcTxblSMwnvQI\nx47V1JtGCNwWuxj9zoDFDTRy9SUbVv3sqhZyefOr8VhOz3C7kAReD8+hi77B\nvjUpiQrgOBe1ONgsKfH5/5Mv1C4kMxC9y9BlneNPYy/gRXQeQfIuIRZC8EPg\n3xSk4YivrRjgnoR8PONrWYWw0kunWTch90DeMS1jyobeJ5y82dPE4VejDkeB\n7mlvbWVeWDChECItx2NgDy+7YywEpM/ioCsfVj0WrRRZGM2c2+thYRa/Qngk\nKVSt\r\n=Xk/a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdd8NxevKtrtEGvhsmGQzrJTayJ+L+BAYTNAcyPwig2QIhAJcGXsB0m60qBbjkj0uuICplZ7V61GyE9RgQjGBXPiKv"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190911_1568185589512_0.6059547338231446"},"_hasShrinkwrap":false},"0.14.0-nightly.20190912":{"name":"brs","version":"0.14.0-nightly.20190912","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190912","dist":{"shasum":"805757d01d3ca3f342f56ea6b9b5ef0e6df8e958","integrity":"sha512-reiwulcKrXqFiBtpsI5siOP2aFdLb3s4ezX59N8IljeIUaqLakfzUKscmnWPQxsL9AzUjKpWcreb0ZFRDbfqQw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190912.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdee53CRA9TVsSAnZWagAAF+4P/iG+6AloZVdbG8uT7Sbn\nQU+Hh8wc37AfDzvfKvhtrU1DfVxExbFAMuRwL/ydqqY5Ap6INfW1igyvKnL5\nPAO2XRAesRFYywelb4RvIwvZdirjkiXj36K7Sq4+5UyM+Zu14rcFsCsE/vsl\n5WeJbpEWWaiMRRVMPPJOBxESBhOZEDAy4NBsusXSRo/TvuxmBcrd+aFiIvHe\nT2GpFZ+RVApWSE8lCUkl1eRk6PQZoO/mjmrkzQCia1OfwL1cnym2Ca3MNBzO\ntWcXLjIqQtNrrP9CUnSWyzURpQnPUuN7BEyuaTBwUe2ImJrNVnFdJZaTgkz2\nEHvNp2OukqXKU+7q0xp6BgdyF07Gq/4mM7/m1HbnvVRp0Cga2cKmW3mzVQxK\n2flkm6Dpa5/oUafziv2hFgd9gvRRJ5Ry3hcnXpZ2EHU9qYncz2cbcO9r7INs\nQlxbPE++F54J/y2xcpE3XqIUNqcc4GvPHmqEdT9XDQWEgQMPgtfdDQptQYA1\nyGSt6anno+RcPe/s540mLr1BxuvSJYWZ6FK71zDHJz5VkMh8Df5VdnyJCnhF\numDSBy8s8G4WRtZW82MsyZLoeHrGTG54hdh8DtGT/xbQOC6jtPlhUMByXSBn\nFfNmCG43Juww/GlK+3tLSZkTji58hwCGHeniZ5QzuubqEjKfnBAcjy4hwDxf\nGoHi\r\n=OVzw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJ+ApqkzMF9hLGeaaIBHgXl8c1DUkioAyWwej1BDD50wIhAJFAUp/MH1K0zSKoi0o4WcldIjeYOCnIal083XY5b6iB"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190912_1568271991203_0.806570266947189"},"_hasShrinkwrap":false},"0.14.0-nightly.20190913":{"name":"brs","version":"0.14.0-nightly.20190913","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190913","dist":{"shasum":"660c06e4260c64a332159061d8ad81b4d8d566e6","integrity":"sha512-WETQKdNpl1Rxr9LbhLFRgwNGSXJol2s1GLDDMhPvWhNWxQ/+5u0rWQskDdA7fcHtQrXpvZuedJNuxgfxHWkVew==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190913.tgz","fileCount":124,"unpackedSize":795971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJde0ADCRA9TVsSAnZWagAA39MP/2bm5KgFxacgOblsDOdK\nbXn+Dg7/WvIxcO6XuhZ/Ev+iXUSigIgqAVesW/O3MFON/4vF/uPtvWNz6HFv\n9e/caXb4A8LXGGEEhfAZTmlDJp7KPMYWn5iTlYWtLEWweOauw/bjDRoQkAkx\nmWB/1udYu4ee7as+JsD3FnMcX4WKLfFLERZ0M3h76Y4Het+y3ZP/1LEO3sG2\nvyEzPVIRa07nVhEBk0LW+pRxgm2a97OX0xLV6LgW945OfOqREvOVTxB4VTtb\nNONECq0KhK+9ZDNYAcH0OljzTGoUQW9yu4XosHEcpug7crmnUE/Qr1KV/OU0\nvqbLfK36x8dcGf1zwUy0TLSX9F2JCgzAcsefdXSh8EAZvNkMp4KeBfBXf5sd\n+qI+kCV0gDmQ3YdXLtKnXVuFyiP3Q5/RMDZH2yV6L3ICS7XzDiVnkZG0RJFo\nvenwWDM9pOT9JYAOqOLlOUoogt86PqRw32zxuy73hN2NN/MKuUxGwE/1tgyZ\nzCf1n//t5FfcOLp83iM0OzwKWe5YjYCdE9dv6Do0giqyKyzc6erGBAyCEUee\nrBEYeyeRUa49HQdGpcIM0yiccA638gTLaFwyzkSBGxvGn03Zypg5O+3fp5pT\nj/v8iMeQ1S0NTIZLkRwv4n4UbA8Vjlz0TFpt2mJq06r4FDDyFC3kaAc25y3w\nt6MG\r\n=jww4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFNu51RNOAEk9zPJmOoFHjs7hgMTuT+5Vkq5p/UMtqUdAiEAi4hoshMKb4KPzMQbc8uw9u1D5pgn56wyMKRkFlYKZcU="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190913_1568358402519_0.9957733959423263"},"_hasShrinkwrap":false},"0.14.0-nightly.20190914":{"name":"brs","version":"0.14.0-nightly.20190914","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190914","dist":{"shasum":"7812aac1ab2640451cf29c88c7c04b8615d740ec","integrity":"sha512-xGitOjxfN82aquTKwqrPyB0LCOJoDvXi+SpNfKw5t/gNS7KlR02ZSaXGM4MHEZVnwRLxkCmBfudWsEWBRj0NOA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190914.tgz","fileCount":126,"unpackedSize":842756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfJQGCRA9TVsSAnZWagAAHF0P/Rz9j9Bz9/qnZqC3O1MZ\nftXr5Ds7OByKYlXbsXghhfe9rraw8QFfPFJEHdGfTeG2r10jWYRBmahwyoGY\n1i3ukJR9eizzLAWkmPBlTv2er2BozfN9gdL3nCbLGiDhuJnvG8mDTutodzbs\nFpHqkev58wkRkbg+bmb4bWPS/0WyIc7WOLtn0Jvr1XZH7GslE5Gd+n8mZ1CK\n/AAHnHF4JiCxQCk8sK3VBXLyMzkvDcBGq3wgyK4TYzI9zwiLAQNhlHP+Knq1\nIheEEthj9yv5jeX1le4G+mIPoTg98+th/ZkxKy2l89CQuzbLGdDaLjxM2JgN\n52oLZIsBcZS1FxtEkcfJhWpjKeyfAfxLQyZGtOnSvoNPdGGOVJqTk/zJmcaY\nV9TMJ5lu67ZQXYnulieyAdoGN0NKXFQCgE9AHi9GB8xzoWEhhLhKIcfMpA0u\nsVXh8RjSJ/b7mHlDoJOF2E6vGmW8WM0w8Q0v2P6M6UR7K+Q9EbbfWWWw9zNb\nWJGel/bio93dVpIatPEmy6L8Or75Vg74cFGCbobLxBadmNSh7Ma5iFlXf5Kl\nJ80w04jv2G6MFAPpEWoZXsbBF84wcqpSUrw0VxeR9Yaln2qoSMELmZoO6PYX\nLi4EZQENGXmE2i50oCwP0ykAq+DcmwmaP87p+RXS9X+sIh98ad8Be9e9ZM4i\nUUXU\r\n=ghQv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDINR7Y8emfMC/nv1jIIlLk8Pd2e/gsL66izuV3WKr9/wIhAImIpnsmrXRFeyBLlYKqIpR+UlPP2ZxUzVYTHMRYwP3q"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190914_1568445445180_0.7306224085733315"},"_hasShrinkwrap":false},"0.14.0-nightly.20190915":{"name":"brs","version":"0.14.0-nightly.20190915","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190915","dist":{"shasum":"24239053ccd994080782503b578b2a6844e56c7b","integrity":"sha512-LRxZllaZ8sRpWWGCGr9lmzsBqV2kd/1M/EIRkLjSwh7GXo9Sw29MCP79EN7d6Az7ZcYfd1wFvu5OdF9/ysqmmg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190915.tgz","fileCount":126,"unpackedSize":842756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfeUyCRA9TVsSAnZWagAA1S0P/0QnmP05Ubn5FjKgUaeb\naGJlo73zktMRrxem6sUUt6Tuwf6vTxhpe7JELqH2s9TON+GaJwi7DIU3RQw7\n55VWDMFvnPALm10E61yupcK0EKkgxz3hqd+yDOjG5hiAYysedNuMwaMClb/k\noELANWDcIXKcQLlIW7E/RaNkWhWmk0n8Ke3iJUghPrnrGPSasg9I684nIwSL\nYY7sbZkGcjD4b0snAjSMPIjDqulZDcGCaeEi3YOpAvvmNPgjR7RYAiyfG5ST\nfXc5+8LNfRs3Uw/NpNZYx4adlFKYj0WFZAKr9K18rsYV6cyi5/58BTfNR1yG\nuZk+cIitjlmS2h7ORs9ywy3C09VvnRPejGAvdR55dOBj7p6KkiPuU2cyyhAW\nC8hoCFOX/iZhlb2FMEGalCZsFdpKgfPl6gC5RV+Ov2+TjrPb9Wt7ZQg/f7f/\n7faQFvhd62SuzacdIlb+RUhOoffxq12yk9oWhw0YTzE/SUVBU2ccMPCXV4LU\nrnA+mY7CGc86KPh6zRInMCh5oKFuvqx/3IH0B4XCRPChn5yh+qUCcqrkGSHc\nbDi0VXLhBSRNUlUMSazkbIz+wYlD+mfPbLVpxbbwDpKLQu9uDRYfmNN6+pzt\n1UoG8ssxSVLDDHHPM+Vs1OdpV6Urs1NPkxYZELopKo8A8TdFjuwg83uqCIud\nO8Wa\r\n=gwNn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE3Q0GIhH59fWS8IbLx94B1nzbBii9xkiqeKob9Pq3luAiBmdpBbRvBDQbsAxDWjAvkJFCITy3zyXrVSMBvrt8fGjA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190915_1568531761201_0.6369951206784388"},"_hasShrinkwrap":false},"0.14.0-nightly.20190917":{"name":"brs","version":"0.14.0-nightly.20190917","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190917","dist":{"shasum":"d0cc723af9e76fab299e846b75d31008ac624797","integrity":"sha512-pFJHXSojVs17iCuJERoGy6eJK8Eqk6CTguw2DXbLbLXXRcpBSCDMD1vOy9EzYq8o2ia3cyhXYY6SQ4AWRXzbnA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190917.tgz","fileCount":126,"unpackedSize":844911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgIgrCRA9TVsSAnZWagAA/oEP/Rdw8Yqn3102gWBHFH5+\n36tEm7/BsDNOegjPzBmvaADpFKlsucrTe/M8CC8H6TaY0c2tlvawBL+AdktK\nUiQJzXCSXcNxlQKSgLdf4nu9iK726w5J7t3r6OEMf9qli1Gu19+kKZo53mXy\ne5qthlCDKFkVX4ugkKyhRLOYwqJ2+PxV4DUJ1K45x4Iesyp2FqF/ISqd5xsy\nq8ugEfP6tulzm27n0cj4p1BSn0K1K2lhiUGr+28xPfgPNO4UourwVLTzYVTS\ndhdNMmbhPiXtMMPvotKWT0mkBCiyui1yByiiahl2JHEjm049B2Ybgoj3UBFE\nyCmVWdQ/i9RyxWGNXuTobh4xrkaJ0A+BWukbHn2Jw3Ea6ww8uxzVlly+lMIw\nxv9vv5np5w/LfgwLv5gTcmBBUNwCWf+ZSpxQJ8Ei+Nult6PqfeehEVaYETnN\nFQNi0k+qPWAlrgr9Olybl9AgPCz7okEzGIl1q2CVhQHqlK5bXaECqbWdyUu8\n7F2F4wz5Jl5tFPRVw0i7B+zRNxAm6oM0Wg5gwhJOeswo+zlcdSid4mVoMqmu\nOIf/YFbaV337RTrKCyab+GtG1xPZJobPNHSynkeMfqJFfBwgqtiTnQx63uCG\n2uZvresa0nBTsi4QI6goHuuPgkVYxcpsMv6lTmQ4oJwfFxP0O8bEI2Td66So\nnhHI\r\n=llv3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTXRxc8IkYpyI5RdJrcAYBjOgHLwng1WpIyoIc777ZKAIgOAQ1xRwvgfROM7lC5DWCNhDLkVnOnCjQm2isyi9EhZg="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190917_1568704554246_0.4757612799398505"},"_hasShrinkwrap":false},"0.14.0-nightly.20190918":{"name":"brs","version":"0.14.0-nightly.20190918","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190918","dist":{"shasum":"c03fa1789f3ef8ceabf13ce1edaa090e615a4fa7","integrity":"sha512-JjA03kedziWq4HNRof3uM7Yoc6K9mWEBD+yRcPMdR6pedgOJ6m434whRklxg0JzsQY53LqsVWuvkUnkcaxqddQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190918.tgz","fileCount":126,"unpackedSize":844911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgdmfCRA9TVsSAnZWagAAIu0P/27dAh4N57S54c7rr88D\nA18sthYMa8HPFRsvQy31MqhemzfjJfic1nVEWOWwg6VFaoWkQsuIIa8TVA70\nDPWr789O8MX0T1F54RPe4f8mt3ecQ9MeyJYk37T/ywMr46XPNoYrpLDJfVeL\n+IRowOU7blzj3upj1k+2yZOGIIxHlVZHpNFGmcyk2qlRk37W4FZhEk1dURxZ\ntBLQbX5DeONftqI9gUyiu/yA3WnGETktV4pDZyrzZG+ZwJABY90B8nMo8ebO\nqItjyqJzPPgMe3T4c430PCvSbGrqj1dV/3mYOydDvpf7w3Pr8bfiJ786upWE\nOFhhVC3S7EPfjm4zQwIBe+3j9rshn7AFXbEy4xAnaSXz+yaAvMQ2MERuyy7B\n1IA+QhgM/r/+M2bmVHL5sMswCwMUHBDM316HjiJ0xX6BmOyYtQ4nuKZCp2jY\nG+WIvaEIs+5yp9SiXyiwrm0qhn7pc+5t8Ph86PK4fXYgllwTMtHKUT1vbDDW\nByqMM4zLGRgdUXb+3Be42gQQHjsnGK1D3bxo2oulOa8GeJCWyvu0Hd65k82H\njESJorKUot/uBCsbIxketOSDig7z95tCbFtV8JugRvOeTLQlEah6k8hvrICL\nhx6Kd+X91HcGCsX/T3f2HZ2Ox+f94CeXMZjLGr5oujZaV7sV0gtMtHct5hfP\n/FZF\r\n=YwJQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLvRGv4jnBcoQ4igFKK0ytJX3qu9zIXlC/CFMg3PXkjQIgDJFcgCVdEcPfDCnoIisuK6SDdsjXygukkdIv3gn2UWc="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190918_1568790943156_0.04204779878434595"},"_hasShrinkwrap":false},"0.14.0-nightly.20190919":{"name":"brs","version":"0.14.0-nightly.20190919","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190919","dist":{"shasum":"273252ae7429148b82dacbf216d05c2560be4def","integrity":"sha512-1nmPFdA8aV/EgHH/0Cs0+uRDwrto2AaFonmeaH3bMW+j5ZiufkUME25wvMT4Ax4tfyzm34f8B1Ih9VQPXy6/4w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190919.tgz","fileCount":126,"unpackedSize":844911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgys3CRA9TVsSAnZWagAA2HYQAJ2pAOYyTF0Az99oRKOn\nmZSwRpVdBO8v/N9OOSEjU4PtM3Em4Jw66pZTdmYWWy60d78UL3503Qvp6lm0\n88zn1LHtRE3VYNCPx/kAP7ZZiWjYJNRN91mbnusUharfabzZtx5gf3rf+9Sq\nikvGLcj9bPAdmWUGvpOccVmpEqRvuFAVUDBg/BuiHpIsvMZFBbZHHi5B/RGz\nUw8oSDpjTEzNPz5Xn43U2y5wfOfHh03jVdQUKjsNH8r8k8NnaKBphsw2BhpI\ndnWZEc/ZvZyWo9m6RHeR+ASl+vpFW302efeqOQhujP/gQBjqFyPUNAQnqP8Q\nYkLXWpUfST+fMWaOWe1VFPMNQN1kQBGWGc9KnIDHmHCKaoYMGESS3jZ0Yn22\n0VfF+d4JzOpHb8Anx4PxGI9+Z2zSMlf8ikXX17ljLkA+kg4Dm3F3B9cdaO8l\njgAuKJnymyeryBwDx4+epyX1SQDdI6L/4XhJlDo64yHvq1UM7KVW2948cmSB\nGx8lLOySFK7jCPlXlNgGByzZx5Z2KWRr2b11Fx2F3FmHlep5h4SqjsdXx7ul\nv6YYdqLvYAJvBNLVtx09C4pe7ABjnXJONT8+lGiSDc+mcxl8138G2HKIKPkp\nbVq5Rc5UhPRjpX6wZswyK/L8RtCdXvvxnzMl1AsmuIzHxUgstKr2z/3LuFWp\ni40z\r\n=MtrZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDEN0RVrjCDqHiejDzVnocZQNgp+zwPrE3EM7fxioeC5AIhANRdfKz5I1sVqNqhLomXY8LQAAFqkNfhOnW4v4tT9ovF"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190919_1568877366570_0.8149889517436306"},"_hasShrinkwrap":false},"0.14.0-nightly.20190920":{"name":"brs","version":"0.14.0-nightly.20190920","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190920","dist":{"shasum":"919334bdbae66b05c2957b6cc7b1ea0b3a39ff49","integrity":"sha512-7yYMA9DLxwY4KA0Odvngc115wIGQYgj/d/D6UQMoNCB0v9cfI40r7lMHv+Se3pgoZDSNV4/l/hcX0WIp5QRrjQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190920.tgz","fileCount":126,"unpackedSize":844911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdhHyiCRA9TVsSAnZWagAAJigP/RVbpQ5+NNH3u9vA3V54\nTN5L33FmH5gdbFhFNADAAPqgrdbBSs5xQivJyEbRoGjdWb+B1ok3BeNek7+U\nW02l62MhgnHTbfXwnQqBxg+pZf9nQ8XVb1Tj8o+pyHaMSGZTJ47CnyIelKrf\n4jcTANza/q0T3DUynI3AgpX+sm89sjrpRqKrxNvuS7dsgONjZsgH0mJXqhBP\noqNjunRlwXNmIG1b+qL/jFkw7mrdvZnm7vOGnkzKUFI0eZDRJm1/1BaSyURK\np6Gf/XUqa1PWJELpjGHDFMk+c5je+yDSgSG7LG30rJ1nsCg1IQ8ABIMtos1k\nJZlchpNe1yo7fKYtquPW+F31aFtjGwESGu8TdvC3vKEbakQZqkS5AsiSAdlJ\ncpfHN4MhEq/eS+0X207RS014Lq3CjT3MCknRirtIfHTRkAzCTE49dKLXCVpG\n5EzyWSzk6gSP092+sJc+08qGsriVjJI4nCjcAzd+cpz0xeMJQXR8Ur0SaJkt\nEkit+H4xYvIccUQFmu/Xm2buIPBfMX4Ynz+PZDYCeFoe7h9hTDykb7UZ3I2A\nDhNu/4YDiBtinlZR79R32dFvW+0yv4ZdzLhrOcMb+gOjUxx+Vy1GDoisLSN7\nYMgfjoNUgB8pqBDyvESNkrO89KcwnfQOD3G1kCQ5VZHHtmCeMe892tuV3b9p\nvc9P\r\n=qZim\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQup/nAe1o/6f1DjCSd2EQs8I9gi7n5hhL4jndOG73VwIgHMIQeCPIij//GmTqVOOkKnqj0AaYBaYGGCzlVJPJKGQ="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190920_1568963745636_0.03652439613005809"},"_hasShrinkwrap":false},"0.14.0-nightly.20190921":{"name":"brs","version":"0.14.0-nightly.20190921","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190921","dist":{"shasum":"4dd2ba8ae9b3d3458133b6ea8a74ed628714828c","integrity":"sha512-lWrG9wY7KyFRqOPgumGzzBTLdMRyiitEz9sBTxDsX5nfDg6i8eBKsBLJwWPbyJjuINOe/U2Zf2aum2BzaGrtnw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190921.tgz","fileCount":126,"unpackedSize":844925,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdhc4wCRA9TVsSAnZWagAA8lYP/1eLclvnS8HfealNZS03\n5EuAVvdduRNIx8szaU0mTSQ8S3syHAFKXlx/NZ58Un5h5l8PVgn0hbTMc23W\n+IZaiK6w7+1vfxHyePjQCHxxFVEQj5luHPhNyMlNsp+WaaCwGiAqXgR95qQs\n8uqMjmo9c+Y7F46CSzKsmW8enKTo1gX0pWnSRcEzOK681U2b9VQupKo9teUZ\nsJYFdV+KQUHpzh/fOaB2Dlm222+EVvDYK/uc1LFEKKsS+eiuLT+lBVV0KKvc\nEQCBaMmjiGiZfmBSSKp05TY8UwkEwema/79uCHWFSSBXFk3UlG+kPkx3s50U\nmSS763DsNTQlgk90V7IIgd0YvMf1VhNN5QhaZ6WKef0CZJ4QYryzR7ngvQPM\nWnsXRlnsUOC6661QX9+ID54/XE9p3NgJS2weP4mm6ThJBYzqUTxnteOYZ0am\nV2F7maAAngW3gRMOl8H4vUZOyx9K/W+dyRgkR60tamS5sxDXjtosLijPu/t3\nXT8/87lUfNPRbkWi7chGNWr4fr7094S3JnNUKHn4QI1K9Z63xZ+hgenStRFF\nuYiFpHfMDF9u30ddOI40m2ulZU4e55Q06ekXJA13+P1fSpK/BIgAWKlqS+Mr\nUV02tI+OxflaVaAH6KbY21Ome+TU4ZAU7FCfwIpNaby3gnCRAkBXBScrk1+u\nhVAk\r\n=heDQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqr2a0Uxpqzb0lp12C2K5AU5vkDlA9bh+s6i/EqFlbFAIgUSbLBpyCpxIkiDou6dKdndek+RNGvdkYnS6h+uiMXiU="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190921_1569050159283_0.9075002788008513"},"_hasShrinkwrap":false},"0.14.0-nightly.20190922":{"name":"brs","version":"0.14.0-nightly.20190922","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190922","dist":{"shasum":"7b1ae6d668b18dfdb55272150a19a4ca65570818","integrity":"sha512-FS9YKHQKpqu8x4rU2LNJAikdIpZYdoJJOO72+g2V1kImVFTS6c7jgxWSmp13ghA5d3hrT70nlZKbHffOzhTR+Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190922.tgz","fileCount":126,"unpackedSize":844925,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdhx+JCRA9TVsSAnZWagAAEq0P/2gepOdUTy9pUWZdrcqC\naMayr+4ye7GaO7YieRfFlKyYDruo47XUbgibNnkQkeUEFqfjSULZiGeos+Iu\ndPGPGU81tS284Sr0tLmZAjPMsikThAny1Hvyv/hXsD7WEHzdBGBVEWuieR5w\nyKbXAdFsKbQ9nfDpr/SjzLzg8yvIPcFT/zsDFOZBmaSfRWmFaUFQEinWPyOj\nk68yzV4fLp7ct34eO3SKOZ3++oX9aCLxODjrjCiM0cIGz6CUnp3GriiunUcU\n5w9+fvQkn8Pluu1M3cTmNL2KVCBl8hnb1V6PpJaezLSHZBsf7hT0vnldwGhM\njtsYSp9jVgYkRmzDTwBr1NERgplkGk0lgZ3WOUAXReiqIlCaaxPbbULn1mxS\nxANZcK68fnNSX7k3cB25qo6YJAp87YInJh4v9n5pnEUEUKHps6FtI9atj1Hr\nBEQQ1crVtUDwfQ+NK1b32gd/Mh8FaCXs5UoqZFzZay703dtqwjD8T9Js/b5/\npZhTOPKAftESEyw/29E2z5OLhjx7ro98Wc457+n/HUkL80e92QAYllwu2SGI\nmaPzp664YM6ZQqqiwcHiHbXsWpTc/9CM8p5OhU/F7lWbYNOkOxPPml7XNjUX\n+wgPSvD4pwi3H5kC68wK3MQ/5GPnZBxlsMNLyj7YhnfvwpEfZcvxgWhLwfVV\ndm6N\r\n=tNWA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0l20w6Ya/48rDbuCezuboRtD0L0NHVL7tF2jDS1XXvgIgWu0eNEoMDeDpPnbxUikLuL5SjkwizyXxFgZlQSLLvK8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190922_1569136520731_0.2531452309388913"},"_hasShrinkwrap":false},"0.14.0-nightly.20190923":{"name":"brs","version":"0.14.0-nightly.20190923","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190923","dist":{"shasum":"89edc8f689d9ba3a72988d914a7707ee9b8ac524","integrity":"sha512-6nk8BedntnX1sQEJ3MAkJi8CQ1RJ1lOJzyg7Orrq0SvtPIbFSHK/IAq5zscTCo56+yP6Z8N/0Z7AoZgqnnX/Cg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190923.tgz","fileCount":126,"unpackedSize":844925,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdiHEuCRA9TVsSAnZWagAAaysP/0CDeU5DGAvSN94BunJ8\n2IOjpUpoOMpZZOFib46JzVVM4aVlXerLlfJmabnDmv6NpIf1PWS7+d2Az/aB\nf6X/7LogLduuoq0Gn31XH7ib1AfcNEmM862xFcab8DNK6tsszSNC4ZzpLaN+\nk30N/B3hv5lRpW3Yn8lYrH0TLDHoIy1hEfhGLJimDkfSbs6H7w1QJQ38L78h\nFsgAQd8jAJhZXAj1IAt7Nr3MSSQuipdC21KZD4B7nii1fPhuoWxCM7oGb8Y3\nkXy2tkLyIhOL9kjeY5p2M57mN4qbPQ5fBqpyJDJqTigj5HH70XGiy544lieJ\nHk55NhXhiNQd6UQVLb6ZT8GENChvgFt+3r0GN1t1Zh2RwZ+Nn/wWRzRLCQRg\nQTXeJJdcCMDGua6JwgT3tCoeg6R94KPHZPienA6PAoYdo7R5swx7c9ZclVjx\n0y6+OWJCdjgfTAUBRuAA3nK/PlB6Qw0QZOYxKA5a2t6mTVMM6bVRrHGwWV47\nGkhSoXx0AuYcQggNW9yFaTgFrjlhmwAgsfBXh4fLqO7mlh/8RtkxluaDd/ao\nf89EthpuMCKD1Uv2r1yKUbqokOVjuKBx0U3WB0Se+tpWemples3nYwDJrIWO\n275THK2ZhEWOpRrAsWYExI7yr8RzidMVSuohVaOU/kXShGunY1zmvJp5juhZ\nJyOf\r\n=saKn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHk/kT0h0jo0/HHrA0yKYQdSmbDMPemuHh9TuiAflsryAiBBdOYKwhqU9wfCcUMJgNHBKyWtYZryrFDr9VM7neUeSQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190923_1569222958134_0.3172904899981339"},"_hasShrinkwrap":false},"0.14.0-nightly.20190924":{"name":"brs","version":"0.14.0-nightly.20190924","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190924","dist":{"shasum":"59187c809e6fdf03f4a88e5eeed23c10fb612665","integrity":"sha512-Gdbcn4uPqLURDRaApbHJwrMtqvoan0pOGmNihJz0V6sBTU9s35tz3COUfpA1HF51Vv6xTpBCrnYjg2ybDuAlmA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190924.tgz","fileCount":126,"unpackedSize":845539,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdicKjCRA9TVsSAnZWagAAyWwP/2nI235Oz43LCytMNbD4\nbl8ZQCS917fIM6Hw196+IAwE6E0tu+ieTmlBLasFrdPBSqiqHbHOlQsPqGkj\nHvPNNMo2RKpIp9BVX7mCk2fZNutKi283TioLfJBQTcDFq0+ijo6A4G626/MD\nNiEEIMN4FXG63fKJA54ga8UG7wv0Ae+ZBEqhRINJO1M7xDakUZxwFR6ACepi\nSlx1B74WOkFdwXWrCTxuNO3KWJJI883YkoiJO5k6C/kvy9xPNEM2IQvgricH\nEWWVw4pqyr+tlG9iI81tQRelAtZ17oYfm/jS/aTahgxVoSSWiDKo9Ndo0oAA\nJP0bKHoDeChexmEJVNxG2yr64X1KVnh7Ksz40BR5nxpzwwI+OEJ2lJmSWuwg\nB74lup7r4DHkbx35H2fRBxqUHBzYZymqAoFXX8ZfiJxw6kI+h4RZnJ27qHZ9\nAuOSgNP/f8XCpfSkfUiNMr2d1q4S0JLldDvclqaRozg168uDtWg1O6uuok/p\nskDkI6b92/Nj1/ozd2QnYSVoaXe07HQYcpQ0FGtB/ympaSY110AX9zSKfn8l\n7luNeqGn+10T0WFg/i+q7x0Jm8BGA++IuFR6Szvhb0/wVAKIMqiMiY/vCzM+\nfJMeNZqufzeqxgZOWj+E8UFDrAyHJR2QT9/D//Cb9Y31dlGvoEXfosURPewg\naiEx\r\n=rfsD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCvmGrvjz4A6gC8Ln+f1PUlTvqlKzKQPDHTt1cpa146lQIgJETrrIT4SgKHDYBQkJPxV6ZfxvkbV5UfkSUGMoGvJek="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190924_1569309346330_0.20574804496034793"},"_hasShrinkwrap":false},"0.14.0-nightly.20190925":{"name":"brs","version":"0.14.0-nightly.20190925","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190925","dist":{"shasum":"c6a10f5ed52aabaca81ca04eb015194f72a8de7d","integrity":"sha512-ELxgFrhFe8BkbPCHfUlvIbjIgjH8J2U4fUNt0ZILPec2+mx5hA36WfK6E4Q1VqzfdhWu41OIQlMyIIwzAAaEIA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190925.tgz","fileCount":132,"unpackedSize":896587,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdixQUCRA9TVsSAnZWagAAHkoP/3LYAwLMhX3pYOx56mWH\nAalnyDrKYHzCjKNPPmOzzxTe+cnQ5fS/189wHKLfrhs8iFm5WBB7FFljD71+\n4e79NSJuU4/0uaiPnM6kIbdJbAV6+/G9xDE7bTd2kPE8fuNiQXC3yLcOKMdk\nRyzyDS6E1iASCo+HdrTAN+b142JZkwUWk9cE/UTdU+LOKm9R1NgDQ1G8JKZ8\nTd4IjT8eRkkoxosAKJhHA1VcHDsw0ig8kWd/ipFxG7RFf8WFISG2otbClwz2\nUWKyewvd/e7XT93O9iYtT6F/aM7/s9iloLHjljJTmj65inDKM9+lA7s1riXB\n3nYAFs7KxY1n21EjrawvHD5MBG0GqhQpf3yLoo+u/+zD4CcUAEYw3Ozoqv/R\nguWA9Po88i9HAxeaedzS7yB/PHYyShDLztt+DLn/wD9Uu2j6RejFo+rcKcsg\nCFzPZRXz576L79NJRY5NxUpp5/nn2gPUHrMm0JJZt9P7c82kkW6GX3sKsf2x\nU2V5dEQNYdeqe11GGfsUe3Mu0ws6f3iwt2ElkqTw4Hs5H91+Wbd1tARYxSa7\nfPWPSadN4bJJW1MrCynPckSFMoc0ypnGL29uuWRecoa6Ox1WXXJTQDjI1GbA\nR/1vY9j1TGTXd8IrzBtnp8Bn005tBwnBY6R2XZP9wpHVSqCvtQ+HJmWorCTl\nVz3B\r\n=eyjQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCf9TriEIoLmcDy6/hDS0QceGxAbj9pzJ0YLwqo6YUWSQIgHJmqayrjEz3r2A3RgIXavqA2kQqMlkEj0hUuZCJerG4="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190925_1569395731664_0.03811511402494894"},"_hasShrinkwrap":false},"0.14.0-nightly.20190926":{"name":"brs","version":"0.14.0-nightly.20190926","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190926","dist":{"shasum":"62a7352ededaca99d458ed499ecd469d2f9cc9e3","integrity":"sha512-90p6hANS90etR5sK2yuTIsXpAsJ1hy8EGxVMo6y2rqItm4tqGGmgD5Qkc5H3nFDjvSX0Thgl0EFgCjmsyZwKxQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190926.tgz","fileCount":132,"unpackedSize":896587,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjGWoCRA9TVsSAnZWagAAh1UQAKOwGzpBpiSSzQ+SaRSQ\nKyIMSjqnPyVD5l+cYVgi7sqsEnWoDYwDYnuunj/Xkmp+/EyBv1Hpf5KU2gnf\nzsBUnPKcSgrXQUfqgNz3YHxzcsxoFmbNPqp1N1feKhf2/fA6UXYEhVJmNMeJ\nHJK13fEwumVPfvcmPLa0kz2Y8MEAkHlEQYqRL5gQZq4EtH9w4anT8v477tqC\nPDSO7xWLUslfrY4wIP7j+bzVK39/C+2ek6W95NLgtL2AFpvDH53lSluaLsvX\nSOHAQAuqfQVnBXgz3BWdA/fanSC8buHrZWM2Uem0tBcgxZZHU6egT+weBlsD\nnyH9ku2GtAh7j9mPRAt0AhvVp3gZ9axMVAUNuCNOotiSRfNbvOfozBf7GmR8\n6Fcml58sW6m3yUler1XPC+fT9cFcK7EfEX5JXMI7EIpx9h5oeWQHPM98wAP/\n0EvoNTMhy29APKN1E2aj5T8uggMSNz3BSFVXZogBkFIE4+ekV0zJSXLMvgAz\n5V61Xlro09EfHwzhvsnaQG1n67mR6ravOh75LJ7k7Rj/VYA2o4jRuSgyOyPF\nAzOm0v01iU7Xw+z6hxxqQX+d3Ty4VLpgauSxWqjGQN6S8zkEiRS8b2RnTzDB\njB7Q67hbEMJdCzqrfDvQx3QNFq7APz0oxUjgFMyRUMd6HMUWtdBcR43HY33T\ni30L\r\n=8WFK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpTrn+01heU3PmVstScBAKVVh1SiOwZtW1RdfESIPJ6wIhAJmmY4Bye6IMYvfYpIWr80dXFmZ7I+/lgsgbxt9tJyhr"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190926_1569482151748_0.4327036437868508"},"_hasShrinkwrap":false},"0.14.0-nightly.20190927":{"name":"brs","version":"0.14.0-nightly.20190927","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.14.0-nightly.20190927","dist":{"shasum":"f1b53063751ce38d0aeb1aad63e1e35762de142b","integrity":"sha512-nMT6oV4n+R5dNdwIDjInnF/ogTNCFEYVKE3uNvHllT5FusJtLLo1K/51wfguzBGY4vMFv2yg+yBjrI9a6zL2PQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.14.0-nightly.20190927.tgz","fileCount":136,"unpackedSize":906634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjbcbCRA9TVsSAnZWagAAep0QAJ10tEk8Vf98MTPVZkdt\nVqjmWY/2cbfP47uKDPQpBywLRDZwmN8s0iB3bumzLXYaEwOhuP2r/OjpIYYq\nvYCL0dF3rpJm2mtA7Y7FAbhq/AOp4Y+mE9svONNYMXoX4lRqhHzUIRNdvht7\n3OuTiKQguAXcrVdHU7HX9vuaO77jSh5xqWVCkPgDX5UUyuzv4PPCjoXLyhIl\nxDVMtOt+vXUAU+x3YjwMlH+7N9wbKiPXKdHUOo/GBE6Hhpw3uXuyYXEdWwe+\nTlq/rtq5Tn+resMliWgCo6b5D33R2prJYZ2gbx2tWUPd6Xx1wVUP4+dbHH7m\ng9FCh/LzeYnMpiG7lOCNxdq7aC1QvncAAL/Zhnue6BP21udFWhLyCXNGHwTH\n0T8xwLJly3tKdtjkqumtg1VgttBRI+qC2gMDRUHgsQ8xIms/QwEPsP6bIzge\n6vwc2QxMXHaVyRIjMtJY/dXMxwmTpmJa7iPbapTIwqKVpoFP8tgaVGn05v5R\nJDpkY9YMSbv02D1tItxPNwtkCAjykbJ/Qx+Lp9vOadla7T3GylcPZJQPZPvO\nWkX5+rSHgVgfgou7udPQ5H5ZonLMZ5mgG3tPNG+p26Wk+vzGksY3DI4WgnCx\nT7Vzef1pXSu95wvh9YviZmSeIhVqGGlRzrgDbIFFM6Cutb0TDKeWRQCcOzuv\ntr9z\r\n=7AIT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2gq6EKdB04ueGi4b42QCrZHzEXfam3wGOKkxM1tL9TgIhANJDtXMSlgrkJn4DASQqLkghLswir1MN/R38t1RzBt1b"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.14.0-nightly.20190927_1569568539005_0.6219042831553581"},"_hasShrinkwrap":false},"0.15.0":{"name":"brs","version":"0.15.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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) 2018, Sean Barag\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@0.15.0","dist":{"shasum":"b805e026754424cc23f458ccfd63ef470ecc45f9","integrity":"sha512-E61ssC8b8kEM9F5RHjf9wDMiso894UrZK+spKbxbrA2gRWHSgBJqDBgRlPasXr+KZ/Yv3ISbHbBcyDHij0jsbw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0.tgz","fileCount":136,"unpackedSize":906617,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjovjCRA9TVsSAnZWagAAWGMP/3zqgpUQcPKBp3sSPoKO\nBRg4Iplqk+/n4m9U9I8IYBynonGj7EK0sGV9Sfeht5aZap7UOpkiGpRM3x3b\ngBcygALDC2+pdU+3AOSPg7UNRXCbJqyogWa7//8G6nuvIqCog+gQetQfmgV+\nx7imrZj7HdzU81AIVaIl+ztUulcOXjdpG+nOwEwY1bXtKa5rSfEkVqc+T/7N\nYf9sWDWcW4UNhnThRG9RciEyB96as/qpEAfxFjFO8ZiWN5e7ubwEr7/F89rj\nV6U/GcZpQRNv3ibPf/RrftDDVl8McsDzrt54e66oj2qkJ0Muc1RN+tKDfg5p\nV57iGy9V7JJZjtq8xTTaWDM13eIGQlJMk5YQzWOSKTSHvzvHeXKVmIgBBk+q\nvdv6vZafkg4vZVcFEkkrdgc9x4yL0sa9zaLckcyIukfNwui1rDMfS/Pr06JY\nGEvoGoa9YRit6LMwjEFq5g3SeGw9Apc44Y/EIyv3PRvCwItphxU7zXTOVL11\naAcwCJtrJbz4ULqRvxyVadR3XhH37lq3wXu6sjh2toFglaqd2sCAT2K0kuoc\nCQ+JVtBbe040NSrDIHGu0Ze/JBZsXgrwT+qwU57VL9Xr7NHRp36uKWJ6QSfV\nnVCsq+9XPeMzHb6kNftVpHO8VSulatfaA6XOJA/eizsIlKTG/rllV81qlaHE\n0JfU\r\n=6B3L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYVGGGT0UWbYJZDSj1JxdHZ1TXDKkDpMqz59YhYi8pVgIgL0uDfd2DtBn0EvE73EWmosmYWLFUuZ3McBkLjOdFoVg="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0_1569623010954_0.2476942362353296"},"_hasShrinkwrap":false},"0.15.0-nightly.20190928":{"name":"brs","version":"0.15.0-nightly.20190928","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20190928","dist":{"shasum":"e3bd76e393b5a5dc3277e73ee8dbb1862c1a0b39","integrity":"sha512-ew4pgTea8M2A577OOdaP0NDWfja+7MOcAqhJrAGXw+h9rHjex4ZWyI8wfzDt6mig5lPA8GFHKx/dhmAKiK2aLg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20190928.tgz","fileCount":136,"unpackedSize":906634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjwiRCRA9TVsSAnZWagAAou0P/22v9GHTACnxzK3yJAc2\nEXwc1nJ/Qi0f2mbUwJhPszM+LYYTOgo/HRtN8ZSER+96Pnfh8A0qtDW1KkID\n+sdJy0K3wvqEmdIjW15YJM+6gZXIE5Mm6F0TjbL9Vp57gZLRbHRDOOF7pbIJ\nm9CJfkGRDyi81dx9fhe9Rj85dNdgO5SCEW1OCRAxUtp1EvNjf0bcX7Ol24Pb\nFq41Ro6bIM3ExMzk/4IectwESwMEFbMlIxTlhJYAmSXJD5qZOSiL/CDUi7mS\nVfkjgJD8uuAbNMnQs0nZExJ5ldCdohGEi4d1Cqt4D8mR0ST7xPrNyCYZqJuS\nfkWo3K/vrLH9HQab+4MW66A8sPUo619fAK7g8jEHk99scrS2yOZGKVoiIh5p\nf5PzimttPPajC2WnllJToxZ7iBIgzQLuTrhMTx2IieGGnqy2YojjSxK4CtOr\n7LcD1w45GuiZYqLIZD+G5Q2T2TzQsNHKuZum2jW403kK4qA531Z3YG7AU7Js\nUOwt9ZB7ZOpCZ0DSf1mzkuYnCS1BBIyyQZ4FRBFYPCTRxyDQ7r3Ls3kiOSuv\njqHA1/MxqNcKiihz65Ohgp49nzUAEVBtZ71LQuuiobHOwGW3bJ2r+ci7qQtS\nCZNINvnoirIQLqO4DDDN/2qrdYx7oNizayACwHbagknHItgs2nBRpv0rg9pV\nSuxn\r\n=vUgs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDr5BHmHjTwIE5e1Bpme0iJCaAHGmwfBvthJdmlSYPSvQIhAL5UyYaaA6iAkgM5Z0jj45gwipxfbYlQPZA5K3R2vkGp"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20190928_1569654928520_0.5255537132717978"},"_hasShrinkwrap":false},"0.15.0-nightly.20190929":{"name":"brs","version":"0.15.0-nightly.20190929","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20190929","dist":{"shasum":"bff195a1367f0f16cd135b9a5d56df9dfd9ad59e","integrity":"sha512-JVL5HzC9gyOQRCeROzVB01pIMyICXLRFFOsuN4FdZzZomyJufBJznrV81QrAqnUNmbwcI9Ke46HColS06979xA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20190929.tgz","fileCount":136,"unpackedSize":906634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkFoPCRA9TVsSAnZWagAA7HYP/A98Q3lZDphUIJjjMpAv\nI9t/jFWc7FeBMCHidmroFJJWBtSmwIaYuMUuSam8KfgqnE0g5J7tQkQPU2la\nanPBnnetXR0eyfL6pqLHxAoMersvjzbsnEBYuLIS9Bhli9EkGoN05+AUM3Ql\n9SgYtwOy50m8a++LRynZbuorYg8F0wIowXCr2dcF4MyosLmw6BoMevdrq+Xi\nAwapr2avYAChdrbsahHdJiYHJiGXjIb/mRupRrmfUK3gmCZ4VKJEhMmp76YC\nw4rEqmQI+ug80P6ENZVhTalFe9hlbmbOjS48PZ0ejQGnya8VvsEEOWhKnmDL\nU647nT22lOqWyHpAMpH3C1ets7HZ0vrbQvPCvVaTtikgJEiAUkqrKMDciBYe\n6QU7qN3wixAGH4zlQJoHuB3ovxGvcclcpPtiEBVixWMdUHL5OMNff7Nwe3CY\n025dFR9LGyHZh7Wl1xa0wcniiyILON/TNfbZHijY2Gu7y43VMYbQeVeDe44H\nJQl7uCJbME3vKd398cdB/s66tG/TcW7StpuFWNqB/n180j9cOUNUL/Pm7fm0\ny6OZbLosYplEAkkR0Vxh9HslS7fcN6vLL+ydZFQTVPbuiOkjss6pY9sGbijL\nsiO1LwTAtgaelQ2IkE2t311N6BDnUQ441y8JBAvdG7zMmV6fKo//5F+OPFzH\n8Uw2\r\n=6RTn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC271XlOoBQ0JySbOpl6QAxN9KkRYrLyTcNc0S3t0GbDwIhAKlio+ZL7izNDCXZUN7zf9Au2Jtno4r45stzwKMqSRCi"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20190929_1569741326434_0.4027536914061245"},"_hasShrinkwrap":false},"0.15.0-nightly.20190930":{"name":"brs","version":"0.15.0-nightly.20190930","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20190930","dist":{"shasum":"58091cdf4900871d7bdba0e7897f127c87be60e0","integrity":"sha512-/NGOap6f+RMAPz7E+nGD14SMYR9vIVFuaJ003dutEJ8SGGepI5q7Pi/jggni0ueiLIX8oCvHhwZ+txrH5i6t6g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20190930.tgz","fileCount":136,"unpackedSize":906634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkauRCRA9TVsSAnZWagAALKMQAJXdcPk4WqB0419fgFYU\nElLhzh3Z95nfFtzBP59G2dBic+e46qkCTt94AlSxg2D/qG17TwTxKiDbmS7A\nfz5pbSEvZksnOBSF/Aa8GMwuTgy+mqg2HtEkcWcqSDmqYQotVQF7f0ooRJus\n0bSzZazaf4F5bYge2GA6XLm+VoxCIQP1NSMCyji51YZ5MhjyrUN+vkIXuwr8\nDq8QWt5urWg0aoPnTo9ptMmRp6upyAKfOn9LN6fuAbTE6jgTO+FKh5rN00sH\nqRDwygxq0GO/yjAhogDdYI+unICt9dUUjr7/hJO/n2OVyDFm+bhy6nWQLm+Y\nDDozOXyXsKUFBlfVHrrP9kMfwd+t/w5jCT4N1v9yrUPk9mGS7LcJrKUOedkm\ncMbDxEql38dRFMKw0qnnLl53r1pksbFqAUvrWNQLjPfN1WqDbWHHTcBuX9ar\nNK7NldyYmidz1iQl4UKMKtGNV44PGsbVNJe/jz53M5Tbv3CQ0bDru6VFSoR6\n7eHB7fEXJl1+QYO37JGGQPT8ARQWIxL4TVe35p9bWZvYNF9Wl4EVZyMYycuj\nY2HiaKI0/bzK5vxo3WQKeCN9dfIxhDeMi2OwrskyD6m4WMNb/5QflKZDU2NA\nueu+dMQD3adqOOQX9qAPl8fQPN79JD8WbxwxlbF/UGuz7r98q4AqgYSx59Y5\nyDxz\r\n=fPyq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH2juAb5DIZQ49UR2qQb8OHk5gDepqe/MdRqmYkgutCSAiAFTHQo+jblQJ2NahKPcwoipZy0/NaXh9zQzUNwE32CFg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20190930_1569827728395_0.6074839301115547"},"_hasShrinkwrap":false},"0.15.0-nightly.20191001":{"name":"brs","version":"0.15.0-nightly.20191001","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191001","dist":{"shasum":"9bc6a286fdd5a25f3c388d75a9e690c6a8d91070","integrity":"sha512-FecCnHmT8vFPrapObt4EYlmFzx4sNnyuo2pLaiBVYhRwaCeoaS/2soSrhrHExdtaK3Uwi1CsOPDRIRbHG3Rdqw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191001.tgz","fileCount":136,"unpackedSize":906634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkv0iCRA9TVsSAnZWagAA7xYQAI8DykaYUTUoFEzTCzA0\ns4worSLzs8cDMjd5/GjNJ0nStxiqf+4ZDJwQnFOtr/AJTLXPr8hE/HKAJWPq\npOY8HBJJS/4a6bdMYISF4uDCE74jloYsSXixz8g+nJfmgRw/fvmWfN2GICpY\nMWaV+DR9KBNrIk/i+HElphJ0bbwuSgTXfm5oyciDjTh9LD6/Wt/sPIR4B09G\niQ2cj2xjvA/UZZ/UCxxhyrvxj2OJP4MbGk/383SfX766SSY9RaEV0Rh/n96C\nIGP6w+Z4HIiHuuyVm5jYvpi+yz75j1zksZu+5URYlHWGpO8gmMEVC6uOfPVY\n9cgemyAkQ45RrtvHfOQtny5HPq1nuVotfBvHa2ihk15o454+adEAsux7gsZG\n84HrqFPRib2PeRZwAMMOXcpztaq4WjIXq51qFv1xd9eSOEfRLzY23k1WcXDF\n/C17VdHQvwDJ7JHOYwK258+wwb8/pa65JJQ/8Y3W3+4fYRqTtTLkqwShIXBm\nlreNNd+pFwI+Mkzh4i2vxAp6XtLxKBNPuhI/IS0pA8bie342EX3x95ZEJvvr\nUFv/ap7Fu/OjaD45MrRt1EAPpVJR7Mi8EflGwTkWgqBiHeveU0Ggc+RmosC9\ndN2sqt0PaiyFJ+t6+qCAbKjqtVywkwmsUc1OhXIWEyZY2g2jJizVEWz1GPBv\nWNWV\r\n=p7kl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlBrtOa+k2xiq/wjkx1tgdyB6jn+j3hwtk6O7ZSjV5mwIgQaFxyO7/QdsynryGr1fHb2U0aqWwEMSxEQLgWBuxdPQ="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191001_1569914145414_0.3717217311923924"},"_hasShrinkwrap":false},"0.15.0-nightly.20191002":{"name":"brs","version":"0.15.0-nightly.20191002","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191002","dist":{"shasum":"59bcdcb96b419ecbd9ed6a4beaedbefa10520c67","integrity":"sha512-wasWSw5BbMN/+vhR6HBT7bfvr5gOvksTvEKKjb1JZS1VEdsWWm4dVq1/LjGYP4CyIWIp/xNla0Mm/vpTLwwHCg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191002.tgz","fileCount":136,"unpackedSize":906634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlE6fCRA9TVsSAnZWagAAVZUQAJ5OvM0vgVGn1dE00wjy\nPENtZGlwfwRS6A/5fMlZ0ArfCPoemr6PolfqMnj5cGecrKzKiH8QQP+K1RIL\nBTVi8e4HEfeC8QqjCyflBYayr67O1WV9cULfQEGJsJISC0yubq0hw6okZhOx\n1PmzeDQ4Rt+CAqtJ3kBFV65ovJfdjIMIxjmQHZFlVNPXoCwhq9rHM5Z6CNrm\nP87Uhd2FLkKHuI9Ul3qRJbcZeBXgelPO4F/NMsIrKqIVNv4PdpqJ7tP4cT3V\nrZd8b+wUB0yeYf0/3pga2KyhdXD2Edi5dPoVgp9XWzxNFALl2v64hzNkwy5S\nyeT7ERx6WlafN1AgJsTNri/XQ+woF6CiGZ3DLHsOg/ar9HH+jstYvG3Ld8ZT\nEYkTpg37pa8dY038yqY7kuCmpIP6BaKNUmTPird54tNZWimT3f9tkrcwGsqK\nO+hHs3S9Z2ms6ANmcTnyAgnRlVyrhGtY/YNTNrgn6nfu5+u7GLQvDvkvQJtr\nQWYk3zctNv2cLgLuqEMahXKElQ3IjiaEbg6SsJPJVPFFXbw9SXR/0wt37vFQ\nZ1dd5cMhHUSg0K20lx/jj3qxLdkDyx38XwRye1eGHOcQ+U2QRgUTRr/M+AAY\nRRLfR9YIe2Bh58Lrq0gIBUn9odnh6ktRZ6S8Cw+MtrwWyV1NYT3/HExJ21jv\nlzGf\r\n=SwUh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHYk3bPm4fC3TDWWYTgdv/2VoKXpoIK8oR41yK8P1Z4tAiAQoHPH0GQ62W/NpfpPBZiy3TsVqdqH+umDhjyr0b971w=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191002_1570000542715_0.39097169541323185"},"_hasShrinkwrap":false},"0.15.0-nightly.20191003":{"name":"brs","version":"0.15.0-nightly.20191003","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191003","dist":{"shasum":"5e4037b2567a03a1b2660bed03a3d164045a903a","integrity":"sha512-KwuzlTVwdso8VV0gn43p8jGv5iWyhHZOxs8pgP60XO9La+fbgTyC5fs9HhfTXc+ikCQst8Io6MkdkEiVqueUaA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191003.tgz","fileCount":136,"unpackedSize":906634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlaATCRA9TVsSAnZWagAA+18P/RZ1gTNAfsrpX0rEiaz9\nMMFWL4fTPU94LgxMCruUSeqaXWC5P/JLCVzWzeoktPVEJUg057P/chCX9WkQ\n08VNiAbAWBeyJghglM3bm8HnOaxEV8vbu2o/lERRlto315Kp0m1dGiF97cQA\noJ3kpcVVz+rDNNvTHAD5+PWdwAi7dVr23t/hJ3X5tES1AvqlOt/N6+hd2jVl\nJpm6vpXAqtEr2QRKfwXqjjY0Nio87dxWgKE/cqCy5kg2oawPXCmoRDixw96T\njtdo8WPVve4Aj2dGpaXO0Nf3PT4Era1ZDtQvmyypwrceleEAFNmFmU0yupup\ncankrFQdKq+w3UZgu27zjnvverih2Lwah/6eehvT6yi+gyvtBHDLc715avNd\ngmHszfgiXT3AlGXcKumWPBCoSBrUQQyp0Yly9oVZ9EorxHo4M9CXnaSDB4IR\nN+j7nIw2Dnu0EVlszoDKjrB74QSJYt87SEFyu8GiRVc1XkHrc4HKlIOZK6ui\n4gIOUNdugPEZSC0SW7YycJu76xPJET5rmA/WJJk6yjGuH+WQ4ZDzsYYlSbxC\nXbSPt+7AmEM/RP04YHRVpoxm3JTf1zL1uIjlPAqhNFp0VVp5lq7/IuYXo7EG\nur/alDisbdIqq8LXaC0vUtYa63OY0lWPA0RtAxq7WFp4bURo7clNnPVWDB+s\nwzth\r\n=23ND\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFruVtltvAxbdqNgeAngoEL9yXOEJnu2LxP/Wc30iwHeAiAkS8hOEae+kwFr/ItCsBoWg/97smhuYcVhH2d3wGHm6Q=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191003_1570086930863_0.14962087178994787"},"_hasShrinkwrap":false},"0.15.0-nightly.20191004":{"name":"brs","version":"0.15.0-nightly.20191004","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191004","dist":{"shasum":"8cf8266cb49a917c05a7131539e07eb782f371ae","integrity":"sha512-3YmPxeBdaky4S44Qd19PwRQGOCicXwNDqrAQH6Wt+msmcDhG/eYX0zjha0BmoFXQrWwHKvxvjh+M/S4OuS+npA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191004.tgz","fileCount":136,"unpackedSize":906634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlvGZCRA9TVsSAnZWagAA4TcP+wRb+exENfkEtsAmnMvP\nFR+7/fxVvraXLTctPLs0KHJc+r5L8GV6xV1qgEptCWOGdWOQZAUwm5zoAciD\neW0wcs9NfQlT+7+lTsxEwMUnrw8p3pfsAT6PwTwz2ePrjxlxKx/oNV5f2tiK\nAkSVV4lPJ2x0/6LLyRF8Ce40v43avxCP80q3PTMxLbiIzKfUQMR6qp3woq7o\n3K3oqGV7k4yOuWN6x7z2LsG7looIVruNi2qupOhSR/LltWdxfuwh9XLHydsy\n76NZKP/x9c7ACFgToBDAtM16h+TyQAxjf7VQCiV4axaRszwJA2Z5f5T0fQzb\nDYURo+v3GK/YECMdakX9HJMiREEaCFBCewjopXtQFH5Bl2J51kuQiaS3W334\ngPthFBv+qfhyGpQeA1WkRze3+frov/qxpn13GFBOjEYU+P7wIKwWRpUFELrI\n/icxKDXmGIr08U826N0Exgconjsm31RrDyQDY7e2DRc4b0uUQ1cqi20qGhL+\n73MuiS9yK/sZawklDARkBMBpj4UTUwbeyaNo7UPUaPTs4HHVzIn6Um6KdjAR\nQNv8ZRK1Dh6vxv7Q8MD2r/gQyxhE41RB5zuhog2ESV4IX6/wFCgRDkoi752V\nt2w5V9xj9VhmnyXNRcvG4R3nLBcaI9IGGVqwDleK0ZSeySOLAWZZsVjF4bZR\nPLL7\r\n=C2/w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCXGsT9Ovt05nJfFWgM7MpOcIeKAoFQVZ8Wdm1Ex5T6QQIgQOZVLuJT5SMg6ba/0B6wmr7bqneoDCJQhYBvRAI0Usk="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191004_1570173336796_0.5011137318607535"},"_hasShrinkwrap":false},"0.15.0-nightly.20191005":{"name":"brs","version":"0.15.0-nightly.20191005","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191005","dist":{"shasum":"fd46f65fc7495caa8c2c3d1af41232b1841fcb7d","integrity":"sha512-nxTEqjS/vmoyMivX7JNRxvG2yiPzfnSbJwEV0vPEhnLibh2B1dGCAiC9JxfK1/K7RVj1X+d2zM0ZUfTVjQBJBQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191005.tgz","fileCount":136,"unpackedSize":906634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdmEMNCRA9TVsSAnZWagAAxSYP/3dl6ToQbS0ReCJbvSXj\nqGZSlfCS+0km9KeCU4vloH3gF3UBLG9Aw12vKspbtkFYTCDkuncTLfmsO4JN\n+iNxBuPHRrl+4nXsM5Ydaj19b89ktBZLwQQMWawZRDxlY7CbZ1oMbNsqMpqQ\nl54AQwl1HNGKCEdoIfyliBcrti6TPkt5ZuPsqoKHgnl/x06MNec2w/cnGwrV\n2fBu/bULbQHtaqV+b2HHoaEDMkccDM++uiZtDbmLBZSkPw9MGU4iVMulO+uc\n71mSwVIfHZDWOlNXZxdYkxVVjlmcZbHvg9cFQBPCiY0nndR54TmApPWQXiKu\nzZMryuixO6vM0Zd0rzmy44eM6Zv5yOqTHkf18LrFxnkqYFNyKiYs1ZACNcj8\ntgzTIOI0JihhYE6KbdoaaKZLo4wcTYZXdoe98B19jU7+RfvloacF3+QUIn+P\nP0nvJ3wfIIoib0R8xHNK24o/CI6VQN7j6v1131HE2FpZ3CHFErKDE8+4kFmn\nPX10SYfhGye9NMT3pinI8Qz9z+lnQwG81mI3M/CuSd7StiJwsY7uAegmJTG2\nBmE9SYS80sb0/CpYUhQiyYVYjM8SKhpWHHc5XzPZG8FUhjjSWaXK+q6XEIir\nTegCtGEJOihvbKXOqaR4pLC9UEFrj1kk6VuGkx8aFoQf/PmZZL6xFB6CWfUB\nv/cd\r\n=epRC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID31Dj5q3OSeMH5njW1W99U7hzsbmSFsQmxGjMzFnIqiAiB9ITMEIOIeejp0kPqcw3k6zh2LNrW7zwEY/rkxIuzLPg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191005_1570259724255_0.7128748774098088"},"_hasShrinkwrap":false},"0.15.0-nightly.20191006":{"name":"brs","version":"0.15.0-nightly.20191006","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191006","dist":{"shasum":"4af72f269ea31642ebf8160c03e03dfaba0e63ac","integrity":"sha512-ChYj22Dp6Z/0GXE76c/BYxuyCBr9YzTLBabBWE7lviVojvaC51vaEU3OF4sqNP6fDZFglK6/E4Eb/di59ISXMw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191006.tgz","fileCount":136,"unpackedSize":906634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdmZSXCRA9TVsSAnZWagAAARQP/0gc+LdPzx1576+A99Wt\nEb8P38Sao7jFTRv7fgJka/BmDVgizsL5zbd4Rvxa+dNTRB7sQs6XYxvK4X1o\nZJ2gh3nghg1Hn+zZCpha5wGoKP9ZiF03Btb68Cor1zJyKN0xzOxcstHhGZ7n\nUaCANlNTWKnwMfR1GOu7crmlFq388htWrJiKLaj2Q42iyQbPICbNHk/bwajl\nq3tuCGfZsuxoio/pwNMc6TMUPNhcrJLacMo3ITa8e9Q5UEeYKduJp/0Kv6qR\noc3jI/jPjVvGCofnNddkGnszFU7dU0hJ9frA5s9yaVIGwU2BPdCYY9MY8esa\nBBuEfGy99m8iAS3AyyNNj3b7bOfWNioyiqPlxfu4GLBkn0XAmhgqcssdZn+2\nN1BksHkaDBS7AfOZmxBZ+4kLYLD14lBSUf+MX24wHLrkQoOF3XyldqGRxvSm\nLQDzhM7qbqLkn+OhXa7Ig7efQubgpz9s/G8g70Cs6jx9SUhKI8R8wvJzEQev\nGT3saChmTwzlosXTMKVCjImB6fsROv0wrXMXJGGS+j1UTB9xQeRjk2b/P0Eb\nzNdSDH892CNCOQ13Gk9oChrGkMJRikae4r2MkyKrt4iT0VfZVanc87dGKmt3\nH7j2PnghfCZX+TDiscRhFJt8eoWsckHENP4Ds1qY0lVyVFveBgG3usFXK85c\nk1xS\r\n=HYqI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB65cgjSyBVIu4Lik0nU1pRjcgHP8zosfLQHkCGFx8IPAiEAo0yY84fPsGg+CxxWHJ9r9OeXVGktbHgvxhA/uNmZiUE="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191006_1570346134299_0.2730129347545216"},"_hasShrinkwrap":false},"0.15.0-nightly.20191007":{"name":"brs","version":"0.15.0-nightly.20191007","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191007","dist":{"shasum":"f077cf569837b04315aa411e4fa207a3406ec767","integrity":"sha512-79a45Z33CEjuFBTL4ovrC+iCuWSgQlHhi2OrzZVXAlfMBTqullZEzH3WCWc8kf+TRvDsF7AouMa3wpw7chUCfg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191007.tgz","fileCount":136,"unpackedSize":906634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdmuYdCRA9TVsSAnZWagAANtAP/28eWelIC2j6ztF/xdiZ\nSEoQtaPx/ihLpSoLYfXtNNGJhhBBDkIMTRP8B4+UhaQ6kk1o/6m5Sxxx33ch\n8V2yXBjLgrtbS2wLQtHNExLYu6iVdy5JFW/w09m5yHHnU5LFmRrl4gNCcwMf\ny08AZ4dPYpmu5rjy6WEAay3dw1t3KExyR26lucu+5Ssovcsv0z86WbaHSLpG\nCN8N8dWuGHFcftsi+O2onVfyk/yccHt+xsJ7B/l7S4u6ufDQ8gUIisPIC7zm\nYE3nqFdmz2BMrRtKWHJHZooRojpAhA4Mpiy4/d0uxMQPXhbmYUh4TnEP/72q\nO22fbHeHJ+lTPnwrRW/snPZ1bmN34pc5xWJ6NL0qkUJnQkyhdo+DVLFHAQVt\nCYWIKweYVJwODgVQjWO1u1R/0gva0AgizpahmZgcXku2owITqkghnEbgYF0D\npewMT63SgDCRT/brDc4qoPEIQgziUA14y4t4uha96dBRlATJALMkRec1xuWj\neM4YLxoUd1SUzSXrCpg8mFrJfsBWQswhC6gwRUWEwGDHKgVZDZrDThDOfME2\nAwrLTx/jo3JsZF4ZYyeKHoTDNDSBA4bdYShU6v3wL/C2mIaLbg8ly2zCXR3H\nMuYCiF3gKv0BIz3Vj7Efr/ObUcMvyed2qZ/zuwg8RufvolDnJCuJiqv1M8ZK\nLDQM\r\n=xFjh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCk6uFuugo/j3AqMfX3AOI4BgJWritlx3Uk/+6AAjpimAIgFG/YLFDQ5pc0/jXJIASgSDjzE1teASFFzSDnrjm9Hjo="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191007_1570432540356_0.5071993862675963"},"_hasShrinkwrap":false},"0.15.0-nightly.20191008":{"name":"brs","version":"0.15.0-nightly.20191008","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191008","dist":{"shasum":"7f976af3051f9ca5d6a81aa097e87b19c947136c","integrity":"sha512-ZYhZzUGLl7GL128mcJrCLHB0OEkvGgi2WxrTV/WMD7qjjsgHf2ggmCMSnaHSoohlK2deOUG5z1HYv7ncgCIfjw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191008.tgz","fileCount":136,"unpackedSize":906634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnDetCRA9TVsSAnZWagAAVDEQAJdc2gMjvTcgdNeWP9qx\nr36V1KnmDK3cBa9ptgbgpxxsx6aRHp7lbs8SUyiPcD+Ic6u17tLu5oNBnEdT\niXNe2Nu5kv+Bphd5ml3B5pcj/8jzVrYvgRjVlxh1jAQCz400VWEf+iFbqOoJ\n6hLNVhV65jhBPf6YDXzl/7YlQivH3UYLTh2/1dxsJAep6ps3ANFXtvAOCPCC\nWAPTUIS1Liq7bhKyCT/3/hHnjU3DL3b94hstw4673VlfwXl7+EpzUmpxH6aD\nyz4dnl0fwRuy4KLSO1Eg9dL3MwTrvVaDwDYHtsYhQcoZVZcJXATzGRaaTKdF\n3EcOOJctd6rrp9Y86n4WoElGEAlGi2ga9VzUlqpDFkTxtFfivd7Nw0rTStmc\npeQzjaBP8UIqYmNNhG9HaisZ7zxCeZgrxG9sXllyZcwmkw6Oejopyd6N7r8Q\nVO5uAIhujXBiiIuYP6LJs4h5gIB88DR2XbjgSLcG0aL9Gp+Lgxbe8BTJJ8U8\nBf+Zjj4W2Ouvlbf7hsefWvfnfF1N/46DM58I2LDbSS1pUtMQXPLNcJJ6yJEe\nOxQ1nt4OZP37FuQJvX7+EgsTNhTjQTPDdiGJQnhJf07GUwn+AfIaBcaXFLg0\nA82tdlLirt9xg5UM4TKhfkgpRQ+K294O4DAr04DDVRtAApIkb/M+IY1X4rrP\nQ8Cr\r\n=fcBM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsF/cbM7Or3QytHjag43RLaO4GYfupBMk9GAasKjcgrAIgOLYf19LZJNsGJWE1+DfaFaIjtVDen2JboK8OjEPiN7U="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191008_1570518956397_0.05239146445874332"},"_hasShrinkwrap":false},"0.15.0-nightly.20191009":{"name":"brs","version":"0.15.0-nightly.20191009","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191009","dist":{"shasum":"1522471ca26545dffd62ba7cefbb8026a500c49a","integrity":"sha512-5AIQ+zB8LWSaiH3xDrd1Ek3DYUWuuB46MZf6CYaCkawbOh3YLrLRemU6cMJNhRztOUU9oF7Ur2dNQAv1/RV86w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191009.tgz","fileCount":136,"unpackedSize":906634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnYkuCRA9TVsSAnZWagAAGrAP/AmFdwP0faTB5fyMarx2\nosU/XHLUF/1GgkgKrTxCfzISmslubSkO84GzlY/1lXv1po+opo5DP67HKwln\ninoUowTlTcj+XIHOgo84b8lXac8nbRGcwSf7DJNCySMNV7sijZwnB0Xp0cCU\nWuTOxDRxcBeKja7exb6yrxuH8ADhDRg/MSmpsm1F3VjOAKfZDU52apfmVDez\nENYo3nIw0luyG+dV9RUeq0UKPekjgyfeELrx6aBLOLdC+B8UybX8J6AQdSOe\nZc7GqLMCWiOuK1TvXsUhQYpsUgbzaG3NJIW9D627QytLQ3PG0i7JGf2oQtzB\nTUPMgDsimKSaSEBYifwutTmqbrHSLYUso7UlTmm9EluPzN7UTsQQjP+nL8WA\nh+h+TS9xxYtzOR5YrI3NudQlvEoI+eujE7GYF09GUobJhZ++tayVWFst8rcV\n3+FSv8dKC3ArtR2rPAkOjUhz9xEDQGGA3UT9eNklsav1+34Pop19NUqJXSZu\nm1EcN3J6NZhrdJrxlhlWKQv5SizDDELpJv4lgM7bmmheNfh4W07i+5eTQ+g9\nSoKLHsi8NiBWU9AF9swc4bWfTFt5BmdqA8NNTBzHnIL+7YLXqCHCKZijBPF7\npgUiBSc3mhQGxx+SBrIn8+nPHWWHltyTBuaLl0g9DcpxJnUH6eZa+CvotbW1\n2hBV\r\n=eXR0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHgw0NoCb/QaC195JaZL26gO4zzPZZN5N5KFuzf2m+LGAiEAlgTtlwxYrsrndWokwM72H+x5AroLmGE72rrmlbTt8xA="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191009_1570605357828_0.499824250276909"},"_hasShrinkwrap":false},"0.15.0-nightly.20191011":{"name":"brs","version":"0.15.0-nightly.20191011","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191011","dist":{"shasum":"2a3b00625b137bebad09f52dfa7325381b83e36c","integrity":"sha512-OPlqSCRp6RPidITBnji46qFueMZuNESff0sENdf+sj69a8eDsN/cQBlOHdsecO0q7XdYEvtRJ+lQRidLa+Tvrg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191011.tgz","fileCount":136,"unpackedSize":906634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoCwXCRA9TVsSAnZWagAAV4MP/RX2KfpWJPOTJaKfArZf\n2JBW7cgo71aY0LLfQ+2j/L7KQ2GCllknXF/VinuHBYXO5z9px/tWbVN6OC8Z\nbS1gyShAYZeZ1ltv72yvFMFHFs4M+CkqbZQ0mk7FHS8rwbrz3Qo53t5gVaE2\nzqumlmTJWAUS1NdccoSqosDJ0pyh0d5EZuOD64jdxMwbKUtsUlEYo/vM1R9z\njS4XcdqSmT0sR2grWgu4AZ8JWOjeP4abhXcHRD3qqn+0Oe07bL6M3XjWYkLk\nfPB+CheL1irbhLesEXCVWy/bFOZ0Z0IvC6DcwNuUVmRRn8pNkQmvG8QM4WQw\n/5c3E6ZLic1s8qxXjsQJXOj6CeE4JAqkkHhsyE/g6a52N0bfUxFg2DgTqfGn\nZyFzP2TaHK59R7SxMkDVU7TMwYhthfk1Pr7b0zP3VySBjNhF+i02r7T+Uq8u\n3jxsn9OmYZVcwskNUkDEWVs51Ixf40esL6E1tU0oY5biGCNo5zkzl6YdetPW\ntnTfQRv0NJo8ULHD1L7tkp/8U9sPKmlYExt1G7/mBzguOqIqruI4vJ4Ieu/E\naKsgTsGBFlrdOb+dr1wnvdK9V6t+1RvGr6k+Z4YInkqCGAUnyGC7GoZRBaBN\ny3w2N/0MKsX5KTy+GCF0cfuF/mfxYZn6/6Z8DCIC4Q4ECTNEh99TWGBvL0eh\nQMcO\r\n=+Q3X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBoUaaw5o81y9IFU4WvJ3ns+RcekC5adqooMAs3DNzFNAiEAuyqtFeSsxihKDzdm4ljLD6zfVRiDhHad28ecUdS8+Gc="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191011_1570778134674_0.7611183280748322"},"_hasShrinkwrap":false},"0.15.0-nightly.20191012":{"name":"brs","version":"0.15.0-nightly.20191012","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191012","dist":{"shasum":"04123a5d83c4703087c74a2d5dad5bf032cc4e59","integrity":"sha512-q7TdOHDRsPaP70xU0G9qD9qxdNmT//si3OayaM7u8EN7aVr03C5VuPLJa9ACcqB4OrzD3BSzi9VeqPaWzmVb0g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191012.tgz","fileCount":136,"unpackedSize":906634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoX2lCRA9TVsSAnZWagAA0FQP/ir2vsd5LtF+xnrXtghJ\nEYl9TkLejk5zFtN3Ns+RdUxWxtTi9xxlynvxQkLZgxfZ+VXnelI2sqZBGz+p\nqZ7vVAY2npCqqeXaCAAg17n4J/yYkNaODR+C4eA+MPIJGyeD7aojkor8P03/\nnRh63TGjD1upQqkUY7+SXtB4acoYQVFgo9GKrgjuE5/KZGmbDy9o8bnCjtst\nkce3whHQaKJ8xL+ITo05Qu9A4rU69C/ekSq/EAKBniQs5zNCFxnMgqWiSMjN\nZVrECBxRkV8yId+1OTY3gMUTPo+M2+cs+yQizQpOQSpqZjpLLm238vuhKbBg\nFwJbBZ4fmtyrSaE+9Dcv1n+kREDxVa7dh+pdmUwSna/WQrf7BX88FlUFqEZW\nOVfSOmcqKHUnuR7VYUXmfiF35/UFxEPEdo3ScPKC/fwYzDhJt+zxe4RMUzg0\n90tu8/sQFee2PLJrYgM34tC1awfjTgvpEiKxJbLDGog2PjvTR/ChT5S1hMTy\n+x0h7iCcEpaSSrljmVlMzPyXvU0Aa/hxu/nDUqTmOc1xDlTCEpzV/uMybe8B\n6cjWXvqy50tDYWNlJcCC2Z1pQr5G4aKSksnMz9ibhULMYD/WsJU+0PQAzuuk\n3iU7JnDl5TWzgFBUFb4Q6lRdutTU4mHB1A6Cskz095eohNRMumg10+Ku1nbV\nJBj9\r\n=B1XA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIByXJM0FESqEv/P24r9s+Rd/HVHg2KIw6zxd4mDR2kKJAiBk5xhtL7A7Ot9RACE4xoQOoisqzaQnJf0ce/o3hNYGbg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191012_1570864549083_0.8560974281873996"},"_hasShrinkwrap":false},"0.15.0-nightly.20191013":{"name":"brs","version":"0.15.0-nightly.20191013","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191013","dist":{"shasum":"14c98f768997b0ad9f87b58890f4a599b3a8c938","integrity":"sha512-7cbheW764yjRNg/3PYFYm023MYVoAa9QUyxAg7/OPCUqICUu+GWj2BgOwUT3lZR86NEULpG2vyWFEM6x/0ui7g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191013.tgz","fileCount":136,"unpackedSize":906634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdos8SCRA9TVsSAnZWagAAif4P/2cAkxfl62onFLAo2Ld9\nsfPHqMr33AT+EQr9nI2AfZBiFzxZ62LoaQ3j3yEUm0pDLw45AZiePFVj/kmY\n3+bIj92CQRj84w044+hid+se6Pob5EKowmcvcJy0JlRjNKMpMsLiyNMAhMnA\nNF+DmopB6h5L1Nq06nIQYcBPVY4zjGf1eFalFMT0PLE2EUV9xdGkvuyyTSUz\nEQhAfumprCzm4mFzG77qOYK4KNVe1gqxwQek4La22EnvIcSHApHjP7RI3zHF\nU5U4uaEAb6wgOcLRKYwmwVMvSDD2WCaMX2cW+fC75WdP5r56QGAS+Vg3xnlr\nJ/A2id9LqkWSH8AnXblSjucoEjx563ZPsXr4l8FljWAYvQDnQG1hTgmJTJHw\nU+um1D1Tumkg2LoGWTsIk8lAbFtGb+t2A3oKDWDV+9NTdGcasNxgBzD9kvWt\nVFzf/wJaCam5u8zhtjGKvmF/IdJTfBl8v1nP2lU2mlQtkU8jfDm9CiCbaGVS\nfm4g2SOXcvNKTCqP/TLkYTJ8QhyTjiE5NxpHoA7nsch9OeBuBo6SjXYpJfwR\nS3KVm9wXnHE/VMLefGI7h7IPkyuj7y2knsn7/89lv3eV3GrVSbRUqempuvnC\notMaELJmW/6/qDuI4qSxA8E4Bn20WNf1x1zvrSuHzFgWQEVBSSHPPDK7i6HA\njMkK\r\n=6pQ6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA5A50j/mmSXiZVIInRxg20XdtxbskkjsxajQW1US1UGAiAi7l+ga4ramskarhg7u2uH9jvAu7V+CDCsrvCHgDIgNw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191013_1570950929957_0.9528187006232125"},"_hasShrinkwrap":false},"0.15.0-nightly.20191014":{"name":"brs","version":"0.15.0-nightly.20191014","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191014","dist":{"shasum":"33c9754fc84dc0f59ea7ecee5d27c386f1b0dc00","integrity":"sha512-G/r2HZDcOP18MbDLj1jsuSr6C4dneNiOJfX2XdA3sX/HJ21TLnkILdkC+Wf774O4re6q52KIA5CEkw0vXa36Og==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191014.tgz","fileCount":136,"unpackedSize":906634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpCCnCRA9TVsSAnZWagAAMosP/3Rq2G4GOdOLMpCblJpA\n5nPuUJrgfDa4ETmW9YNMXVRwuCf27QdvG6s3hTNaPz0qGOqomz6kdu7Dfxg8\nPc9f/DtoDWug4Mb4wVbSSHa6vO9asObcSAY/TIl9sD5edSB1zTstMN82PNfQ\nILbU813o72d9VMvGuXOqbdAXJjqKBKGKEDWIwfYKzGVWj7Q9JfsCWG2LiXfk\nC8u1IXnQ14900aCFjo0Yl77xMblfLh9KUu9Gq/ypAJJHE470jdtTEI2kyv/J\nJWTIuF+J5MgAE7NrgP+WH2glxeTd3gE67bX1ieT1W1/zPLdgRAqUolGhF0AO\nMSTgitSyU7lwhgvquFyb9gG/Sk/xQUdsfD+33ce7F35bxrQxL9JOs/1vUUWz\n7tXX6f2eqDtkG53m0DcQszcoBhtZn9JbxYrJWWxww1jDW1mYT/qQj4caZh72\nM7R+N4Cpy1MEkVlIoBbW0uEHkhfRYdLbFBJdT/dw6NyDUbZvFvdB6h4EpoRA\ntPjPJeBuNoxb6rDtkmx+OdmXoJ6BZJbBvFPkYpmr55kdMklkHDA8nupF6Mxh\nEUFQGwupIhX/gUy3uvbn5a5RvrXuo0jRyZC2QyIgmWxCnal7VOsDmX4VbyR5\nztOwMGFpiuRrXdTjdeGuxS/l/Ahe9BAQrRi6/uBwc+2CNlxSQzr5+IMhu02z\nmdXG\r\n=wbMu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCRaZEVgXzdtVTAVuu1ALzJtwp6hmWWLGZehtdzBSw0xQIhAKeSJ7cXLuePKTepQOr/ua3FxUfP/Odh+f6r8B5uLcc9"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191014_1571037351115_0.4195448984580312"},"_hasShrinkwrap":false},"0.15.0-nightly.20191015":{"name":"brs","version":"0.15.0-nightly.20191015","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191015","dist":{"shasum":"19a130fe9e0503583ccb8ff87c21698a0b94a36a","integrity":"sha512-K3n1SbfP1TiBqDftC7axQO+T9Ld1oddD9xgiymyIAFJCSgsdbe84JN3Uwdddr3LPSvCmLFheyR3sncG55X96Yg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191015.tgz","fileCount":144,"unpackedSize":930880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpXIhCRA9TVsSAnZWagAATUwP/jyTZ9iSbKD6W/ZOx2ZW\nLZQkKZG8q+UYSsY9C3wXv2scuJlVqHxcTxb8TQ1uKmYNn3ItDZgZAQPxKl4I\nbf9DPXqpLebiRk4buKCagg/Y16fcYjlhdY7GORGrimKV6mUHNgAPiT7L1oeU\npfDOyFR8IIU7PJ13gK2zwwdZ0Ur/LkWSwYWKMSGJzXTClmJbxHslrPVThfy8\n2tKwB81GFP9P3RBQAEhvAoulkVM7JRu2A3eVLLcJ6ztZ9aEL4Kw+FYHZBjsn\nPMe36cQ8tTjV5YysvJoOq+JWVwun2OhONMw967m05WbZwljmFXi5XwDhEPOJ\nwto6RTNO1WQqPhV0fsLBTK8Q1asrdPfoanNcs3xkeAwpNxrCrzEd4Y8t0+07\nZSG19s/sXqB+dALHdCw6ApcWLP0F979inPiEtSjPFZlzGGeviL/jxllZ3Ojo\nWUk+gKrHeStkajV/mlcFVMcFcxNQ2kcHhZtll2HKV4mEtRPEtpu+1qGwblpG\nYhqC50F0seKSZGn9T/umNX9NyADwv01ElAsME8e4IKNG5VMxeeNFBeOiU4Ji\nA6N34SHmrhziHOPTW3Jo95WjIAF74MqAZn6QuhnZSKkENATHAh6HLwIDojqJ\nlZLHoTox/DX3xqExhi9HMd2zmrwYEVH2E9vtizJbPYTuLLcKc9vfh5mrr6bA\ne9Dg\r\n=bLoE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA8oztjBc2LCOlGCFdWoWzbIfoGRHQ4D8EAyDNpAJEcHAiEAnE49vOoEUTDrkyQ0rsPwP7bJ4vfidtQ4Dn53N3tETk0="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191015_1571123744552_0.6667313085369397"},"_hasShrinkwrap":false},"0.15.0-nightly.20191017":{"name":"brs","version":"0.15.0-nightly.20191017","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191017","dist":{"shasum":"281a87b78bc4d4b3c8227f096139acdcc04202c4","integrity":"sha512-IpZmDKNHv996TXOcQJNepcUvHp+JNUWPvoUvZh6pcZsoW2ke15Pv3sYI20S4oLrM9dHnp2QDmQYit2q6WX6uGg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191017.tgz","fileCount":144,"unpackedSize":930880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqBUbCRA9TVsSAnZWagAAGdYP/j4BK8/pNpunttdwRjQf\nedy9IJgOT6FO6Uk3YbWKPINNponifu6j4I+t+/ri40D7erjjZZREssPG/EPQ\nauSx1t8e2etil/FCgqkJ6Ra2xdBOsGUtUf728aIwPUJkCXLnt7oEBDM8cUkA\nuQ0keppD8+jv7Qq2UFzP/yLaRUGOgp8aQRcTXv9GxoN9lncyA8ExF7uvsnzW\n3qh9t4E48hNsWV2M6uGTwySR2FUpeqCbHq7GGFAtH8i201If2jE+O/vKsOhF\nS4lPFv8GuTJUXau1FN9DKgGCZoX47unxvwxYtKharO3+Cnm2Qsojvzb7woY8\niPjkzN5/3RwzFaW6Xy0jO8IDr5PFL+qaxHLD3JV87AO7GafDWwAUVoQMVHW9\nI9fkLUNqW3hXMDh3H07AXtwwtqGoAfV8EGrU4h5JctI9sEr86zJKYNVg/XFb\nqnhMizBu1nOnFHsHZ+uvna/MX+xgVdzHCTa9RD9E8bI3pbzv/qdvc2RPctVf\nOxTTsu9LOGW21XX206dd7d7tuYTQ9WW4Oegfwms0bRlDXiGbgfJKD8uNvVFJ\nUh030kZb+qPryT7RdNRdRP+AvcKzEPzILj/YiQxlXFlgZZ3EFE/sMktjJxOv\nQSH3BVaj0DIRjjOgYyLnN//vdBRO/581wDcCsmObfrMOoGkD5VI9UTunvUEe\n6sXf\r\n=lIoC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbfBaUS5EBRCfHdk5YkfZhNvTq6O0L87fD2U+Va40fXAIhAJF7JQkL4iily0EUK601K7f5CBGTA5gzE10lZRpce1P4"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191017_1571296539088_0.5065967956960522"},"_hasShrinkwrap":false},"0.15.0-nightly.20191018":{"name":"brs","version":"0.15.0-nightly.20191018","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191018","dist":{"shasum":"c683df6e596a2ffb192eff6374a9dc95e0cf50a7","integrity":"sha512-ASc9aolpuTEth7aaCjJY1c+QUdCnwOCziJZujO86Ave9iiIvKnI63PA7IwkRbj0WjAtSruj75ebtc4bjfHpq3A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191018.tgz","fileCount":144,"unpackedSize":930880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqWaqCRA9TVsSAnZWagAAqv0QAIasoMKTTqHH5yadcF52\nb8HJYszNYhzz2bLqtwlVkUo8l7as2kbCnL9KKVVPFwy5pCE6ivnwwXp94V9m\nlpvgu0rKHhZGv6d/3mSn0yNY1YHlSHefOteS14s/oVyxWF40jzri/FjE852N\n27ioXbsZrTRd51UTvgL3DwblO/Tz0jpWaK7uY8Wfr6+lvjyCU1SzqgfaIPw+\nk7tdEqpGSba5pEt64vYoj4Vp6bL6WwtaMAxllxS6A0Oyxf5GbbdGACovCzlV\nW6gUhW5wF05jv0QumR6GmGqrxQABcmVMPtZ1QvT0/1ZH7IPkcMUa2MthN0oo\nb9Y4ij3PvmaqbcZ/dcfNbHDmruEvCGQ1ZXpx4w5iYvwWtLZD92vyUB/lPYPU\na5T+0MpQqpbXvARvaF+S9ENAxMQpTOL7kRYwM7JpO4rll8Jhs5sHe9MtTRTA\noH3vTjQOHHj0Dn9SI9EracV0c5DyibQIuhWHXULSDoBq26Ol8YSbg6Te/rbR\n8kb7QktD1we7GP9Pr91bOdkij1pKDrC3IcHL7bIpxUPhKn5HDRJYqPaUu2b0\n5gcQ2aMw/bl//JRTJ97tHpojLBjK9X3TaRZxeuMIYIt1B5ASOggnGA761/k4\n+DlWRrYIuXna6vMl5Y6M26uXGLz1TJgYP1xTs4VR4BGzg8KwnhiwnqCDRhVQ\n9sLn\r\n=+sT6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCdGNJCsfJzkp5ctlzl7iOTAExnubTe81U60N56jSWYjwIgErXHi9NjVHoPG6So/ehnaXHreguGCzeDI+LPrmSRGSI="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191018_1571382953074_0.19914977815838886"},"_hasShrinkwrap":false},"0.15.0-nightly.20191019":{"name":"brs","version":"0.15.0-nightly.20191019","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191019","dist":{"shasum":"10dbdb62079e90d5a820d69954c61497037cc03d","integrity":"sha512-2CxRgtkDbiivubzGG2f0xo3V86VMzavZpmr1E4JDxx4YE3KZtRtKFxJlDq5G7zx8vtrgbe1QJl05ky6s9gUo0A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191019.tgz","fileCount":144,"unpackedSize":930880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqrheCRA9TVsSAnZWagAALEUP/jB5qOh9M5LhSqeUk5MW\nKNNdF8FvamXS0+DBJsheUO03YC3QNqjIY5jt/3QFX5lUFNnZw+EbHAKs0w1U\nnpcMVZ5+oYJ+m1NVzb8bogG1yCirUtxD+5qIJpcjtAKRiaKm9JgxdccELoM5\nJNQVFH1GzZ02kJuV/sYd5/8mZUbI6800IOLJwx9ivXMlrFMqAVS+XkOl2PUK\nOrbjc/WH5LY5jLkUVp/0PnsuQeNjMQtC8bVZxfUmvvJBtj4QPrThHvqiX06A\nx4511gg1JrRnkloWqTfL7pNX+tHpvEUpdPe8ryzJZfG/bF7Rbab2TRqbqKV/\nIgQcDiGD0B2Etaf0Hah3rU44iKQ9b45lQnSoKuU5HIrJ4P+Kp1Hy280VIbIy\nJew54Zc+GiCw08iw0KvajgloiToQhRMq56SBDk+/ZKc3djJOvDgBpoM8GoUe\nxqjw+4jddX474GOUwpgEW2xzYTqav1RXX3uODUDPS/Z/Fdyq9M/XyQmMjJMA\n6KJmJT1KAf+HB4FHPNyL7RzdXm5FLU/AJqyEdiWtei+FXhA6oLaOBgl+8Bkk\nTJV24D82nac6xiVF8RqfsdV6UbQSVCsNUf/xKxLeXPcnTQ7zquzMkTnDTW8n\n5e78c9Gn+EnxytDL4rM1Nrf1KnCEZ1Hbw5ceeMkD+DyXUUWZoTbKXD+iACMz\nKrgv\r\n=/iBv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDGX48Ar4yn06s3vJckMjZ9XiHZF4BPvx/HaB1YySGLxAiBI1vwLaNvumlXfHiE41wlOoIXcFwP3TBaWRdmq/LZk8A=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191019_1571469405925_0.8517614364957857"},"_hasShrinkwrap":false},"0.15.0-nightly.20191020":{"name":"brs","version":"0.15.0-nightly.20191020","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191020","dist":{"shasum":"82a32f05d0754f0b7eb81897101ced5a04a73b89","integrity":"sha512-5SmA8pNY1L8mbDe48+J+PnNAGiU4Ze1iH+7GcQhU1BGN08S54aI283iHMSpzGS4CDa9ZFdm19kNJILeszvAzEg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191020.tgz","fileCount":144,"unpackedSize":930880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrAmMCRA9TVsSAnZWagAAkVEQAICWzJNUwESwWy+N4zvz\nw17eOB79dm/nwIxbXg7jcTXdLHNDbKQ3VCFjhtCnAahrTZxm3yNRYlGctSdj\nyr2amLKyEatUTaXPJAIqiJhgtiQCArf0NgZR9dalc4tG8quMLMuX1Jr1gmWM\nQxdKKSYU66egoWyU0qG3z5OL77KPumi1e78oZTijzLj9QCs4ZeFz/mfkAyCf\n005cydj02R9rBpNtQCOBA/UFLFEfkoF5YTgqYyU+a4lIbob5f34oMz0YNADY\nB9mdqkFKQugAmfRY1M+SG2kHOkpq+1mspqchlRdfeS+FBaEstkMsfqXHNJWv\n5qjbgA1nJlKsg/B58WC8k24tfArlY+O6Q5EXBms0F8PEAsopB29Ypd1odPG0\ncMY17Pagu0aC9cwNm5x57EmjdHKqa7H7Q9QxKGY4WcNnkWtzFrmRDso2ItbN\nMeQi75FqElNJQ3iifejqW1YYz6j/3vAZzp/ehChKm2NNnO5iA5iLqzx3cueC\nu0bT8rCpDEMcbRGVeZFDRSNsf2R0Sj7PBO1zFfcARLAKolub8Ta57rH8eUBd\nDL9nKxQQZ/eTeWGrZJSnU08LpIAAO47EdNpP/C+QCg5FpAiVk/1C5FarRuG4\nq0nseRgvjxOKfbMSbA9Lg0bd0sNnvzaE1Stra3k64rsWid55GxYatHTDl334\nnGDJ\r\n=a89f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEdu8dWHqS8hSDLvzuijZwxFiXP9vXInw6XRgZEOidd6AiEA6sem9hfUHNFhkrYBcCP4FsA8YogNmuLNYZXgo4gnfZw="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191020_1571555724060_0.5769328548054744"},"_hasShrinkwrap":false},"0.15.0-nightly.20191021":{"name":"brs","version":"0.15.0-nightly.20191021","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191021","dist":{"shasum":"e80e1419881afa54abf96071ae3cdaa26ccad0aa","integrity":"sha512-aticIZbR4xlscIwzbIyOQIO+POhD6Hi6e3/QA+q9AYeeL/CnLZSKiqG8GjoAQX0dIoh/N2sJKBBOPi+qW7yxow==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191021.tgz","fileCount":144,"unpackedSize":930880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrVspCRA9TVsSAnZWagAAbDEP/R+xmlb3FWeWYj1cKOTN\n7l+5FHsxdBd3o3LmM9BPXAL79foKfbyNH65AOlYByORC9nfExEF+3tjxNKLq\ndnTOWsBYgGR4AASzBDcja6Puf636AX6/CyB2Qlev7DQQs20jNq7/lZ6HWQtT\nEB11o9sUKec+sXGsdynpimwDcIiYggEvvy7KZXRdnbwQqynXDFzUZlZIeJ6h\nG/LDFxzs5A904adBcCMY7wrbJJiQ+wEUI6AKrpmmf6DTh/rF2TfVuaXwUI+q\nWFd4MzinF/FSSBWQ9BniJwHFdUuSjZLhSxBucgPMRqvQjn/vlNSWUpKGb+jx\nz6Vx5uqStSG7C99TcF0ETHoTsJH5ak69ne82Rz1ANQxw2VEFqZNk9vcYz6ck\nqsElJOm682nNlh8Ytr+RKuX6t7cQBH7I/UAAD4lRUO9tSP4jNRp0OElKLW7X\nA1MKOmfSypjEdo2pz1rm/2rODBS+MsesWofgqVzOc+3+zMs3Z0gu6Xj+bKBq\nIZVoP/ZdKsMGVmGI8gDHP7Kz6jk9abAGro+LY+D5Z7b3ieCB7QrfSI+4ivO8\n2q0rKtmUVmWPqlyvjGxCptV1qm3LIABKOWIoQflitI1k+dev9LYOhSuo2VXh\nSi3CcAHGUkD7h4ao4K28yD6zX4QG6ARunR3evZKNakPABU40Zu6x/ZEzYny4\nJdRO\r\n=WCwj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjmcW8tMytFPJqDUX459eC39DpVJ6Hvdz0EvryaFIiRQIgX0YGJCwWKLtWNF/suQfvlGx7ZYs9KC/3f1FVFGXj+l0="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191021_1571642152282_0.04538530755404113"},"_hasShrinkwrap":false},"0.15.0-nightly.20191022":{"name":"brs","version":"0.15.0-nightly.20191022","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191022","dist":{"shasum":"1e8be6269ea371e9ca8395d32722022e8171d24f","integrity":"sha512-CVQowvTgCx4/dmrLdKtONGvnjqKVUhcG40rhWBk15V/4geKdPevCGCzW0EyIqt9WWDSk6L5mQRATO2A6JXistQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191022.tgz","fileCount":144,"unpackedSize":930880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrqycCRA9TVsSAnZWagAAUtwP/3y0FKBgOAAshAc1FS/J\nRjwUZpxJWId6yuI5UAmqI/sJRxgQ5yKxsKMxFMtnr9KdHwZzxFX/oCYQi4iM\nvcQFA8GXjkHYmjwIhvy2T5hOk3FoNTO+l8qgjm9cUYlt9iomTXd7EMDKLgt7\n0gM28cxHiUCZ/BQ7TcwPUYTLToJTQR1YMk5j/YI5KhZJBk45acSvQGq5spmt\n205gz1fMWpSHCZaADr0rjwcoQa3pZCqtmMZ0TfUbBlNfLbRggTpASsDXEFPt\nYgxLZ638275ciuiFR87tswYZ4d1y+AkN29AIAasG7vnGH8Y6NeBc6FZCIrHZ\nmgwZFpOx67qDo3ITA3767tol9LmZeBQDLKBPCyF6gvawF/Y5FPc1DByNQzHD\n+S+VDLY3Xlfv70fl9rXWcdSjOkcijTlpO/9xIYef/FH36ZZj5ilj7ksTWjNB\nKfE8YpkEGpn6Fy5ryds62jNqdOl5m/6C7mncxSLZIG10uZ8vTtuwKxNXD5o0\nC1POL3NDBcSijUjeZTFuUEon81uo2Fd2utmEdr8rJkRRB0A1X//FPzlfiZ8o\nlvyw6JGGWRrWxGzRNiNe0ptjNFnL91WwFnb9DCM9KZLbK4nKoIhINVYXBsWW\nWrhpmldQfuxO6diNufjW/l7ZQ0QJPXn3cvW8QNNW3npqA/OisDp1FnuWV6HL\ng8Jj\r\n=TlU/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCleWzloEAwj6/bE8/mauu4MWtu2xRMyRrALdsAU+knTAIhAO6ySRBwL+ytK+1J3xV+h/oX9inR84g+M9vZVQyxZb5V"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191022_1571728538987_0.6033603432961769"},"_hasShrinkwrap":false},"0.15.0-nightly.20191023":{"name":"brs","version":"0.15.0-nightly.20191023","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191023","dist":{"shasum":"6f71447bcdf3f0a4a72e4e0b40c58bf2886d3324","integrity":"sha512-h5q1pe22phpxU9YgmfPIVImT4qtMVYs8v9U5OvpfPrp3cY1cH2TTovr7z5RGpI50zOoO6QhAIRbqaCmiC0PxVg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191023.tgz","fileCount":144,"unpackedSize":930880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr/4jCRA9TVsSAnZWagAAwIcP/AiN8aoNKNMCfuRyXWWD\nn+EM90JAIcYGcEua0QA8iYX121cPimrHWwffhC/aQm3DRWpzYRFuN7x1Fm9R\n/G+oa2RfNjSl8HzVbDAhTLf7bYUpoheHxiP1a8COxoiE7++saEJDP6T1T5lY\nuKE5VcRXqVuLXwuob/d0rQo5JfZY4nwl3wdXGnz6iUOLHufkZ28mTjonGbt6\nlIZ4ziNsPa0kCKeFkcUGmQInQ4aFxP4CE5lB9vlKlMSxMB7QM5dqe4qRfebq\nDTJe0BV6yjsE1Q35SpKyGAbO9KvVufukw57qGFWBgzC8E8Anljh6zrGh/AWM\n/mDpQ3rcZN2sT+MXEH6TJ8Mt1W+MaQzZJy/Tynqvz2cmdJfwYAdPHr61Ef/s\nUoOtAnGZ0wtSsaHxL8ek/Mt05qcW/LSucR1B2MMOu4yCACknU80PgnsZJc9R\na1REXEoz6B+vVSynrZqHvjty2PjqQYtCvQvAXfmNdnYrx3+fcsXEzYQRRgjg\nNVdID9hhnF3CwnBgXnWZc45XCBVeuMXNadgJD4vVRj62YqK6k2yCfF9CJ3oi\n7SeukKA4UBCP1hvDNRzP5iX2bulLzKzFEToN46IsSbEGPUPKAK1pIa0iOaHe\ne7oYOXxf9M5SbgAAGFVw19vkrRFx1aWnliDjw44K88gDthf7JjrSpuzyio1S\nYqbN\r\n=UHI5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfDjmDOyCjcZClw0Uy5jWpGOyyotFLo41OyBoOIvOPUgIgJH5GCHuwS/lRh5Hs7vLSzIVT+HaWTY/Ygx8G/Da8tJ0="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191023_1571814947296_0.44090774962947865"},"_hasShrinkwrap":false},"0.15.0-nightly.20191024":{"name":"brs","version":"0.15.0-nightly.20191024","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191024","dist":{"shasum":"493e11abb2e5dd08a3565bf4e787f39e6b9919db","integrity":"sha512-9ns+d/FKZObHLEYYLNTgkzLK2M/ALvJkyHDYkfUnZHEv8RzWs2NUFK+cXGhvN2rtaZwt3EzyNAH/XHSd3Sj3GQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191024.tgz","fileCount":144,"unpackedSize":930880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsU/ICRA9TVsSAnZWagAAcyQP/0K07CrOWcE0GqZ4KAR3\nEbOvD1es5iseCyNct8ZxPF4qzzm/35OemJwacgqe7O/RMIr+PSItFoAGdTVz\nPnOQT+9BM4L3Y2LEPD5VWNtwWXBL4dI4RoDWOxH5d72oHC6rC62EzriCkMeY\nltx3tzIZDGEiR8ye33UOQ13gvLBmpo37M6lx/lO9KdTW91u4BGSzbilc2tBx\nnlzOBy42VEVjDWkuXsyrYKF7mNkdgt1FLKwI/aRWA15oXEBu+wANZs/aQx0x\nu99E4K/VCs02lFiQV4fHqsqXYOArdfZatGHLipIjdkGBLj40w59JJW2C3v8y\nNH9ykW6xHAvoRQxT6OosuxqfABGoCbulZTNiUFUgQqNfIGZ12/jairxIiuvg\n0JJnH8J0LgG/nsaKnHtE9Va1XIIsvKjQ63BiXwNQEpO2sSjjPQmKtmjoS4+9\n8PglWu1uPPnMK0rMBd0FJgLOgWE8GiCj/mneiylsK5kGnZfJeFu9i7ZiV9Wj\n6PUHQ3gk2kxSh6U2BCCWnuhP9vyFJx9OXfzm+xGhlXVmKzi8xCJphL7lXp6A\nzJabGpL7xVDqB+aJLNhFigv5aoipEdegNd7vHLtQrSqbvMGjRNVNw5UMTlp8\nerbnGjX4Sq4doSxpPs+Y0/TwXbEXkkUFQSnmZ6ALRpQgSSjao/q42iLjvMvc\n7aGZ\r\n=Dpz2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFVHI4eH/kShxkI70Y/TOUZACSgOz9zcaRTQK3X1oA4PAiAaRHBhzBJ7mTtECBaai2Lzvad7KnbV/872ew3qxCBjlw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191024_1571901384174_0.8019901234966227"},"_hasShrinkwrap":false},"0.15.0-nightly.20191025":{"name":"brs","version":"0.15.0-nightly.20191025","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191025","dist":{"shasum":"2a9abbc71edde85ea44bb5c2b3cf83247d8e54da","integrity":"sha512-sVMCivok5HVPKJdz6Scewg5WNznuH5ZBzr3O2VSHDZ4cCXP3J0Nf45IQmq4LgCp3nlePntXeIQvhuClXVv6Bpg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191025.tgz","fileCount":144,"unpackedSize":930880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsqExCRA9TVsSAnZWagAATgcP/Rmy6+201koEwmNfAVp3\n6PILYHhK+KqLAxCW3s6MJYgwI6Qrm6DnUcJ6Qrl6y+AafYy3e9fXSHeMJCnS\n9zwZdWq23FG3oCXT73/kwn6KIfGDLRoemzJt+JmPWylczl+aLvliaV1l85CV\nI3gZ7mepsV8uDl/hkqB9xuEz/PQGtbKdKVZuUaHtsaJeS4hE4865WSaY9oOO\nMm04qJM9RbioE4QK3uzEbVAZYdZjnxonB/V7/Twi1wEgeQpnnvcc+aicP/vw\nCyShafuxPcr5Gf7TXzP2jrCU2bsCdYecnPwxgSrjcwKCxRYSVUbxszndp06K\nbbfVOo+L1eSrvsF/wYOC7oUogF+5o5WQvoLCcsEZcTuL/XCvkUNG5rY9t/7o\nY/zHHP7d22uhCNCnG9HnjWPwqB2jz3LeDWyFHqEamENhRJV3tnE+be08Hqbx\nIOedhu7ZzAqKYtFClTtcdcxENt5gYNvCnlNVxXPHsDlowtPUJf+JNABulz86\nstKVzfJZvC8BV6VDZgKSzAnW8oTNvGjnKVYjiWsUS1aziu1viHkssV7LJjUN\nuqG0c5Rs36k2QHZ5dYx7py4AQk2/lVt/f8XayvEk2g+dMrGZWfxx5F40/Pnz\nh28mobYDlV6/qYczxkysFnmyiukBUDeeUgLvkkx/HtFzUtAypshHvrO0mDtE\nInYm\r\n=E8FU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF9IMvFJNPf9GjfgUO5L+9SDFavOHt2CdaLCXuZKMMWjAiEAt63DIIQnx//SpgZ9ButH6z3TiMt6WA1nDCu3P7QbgI4="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191025_1571987761293_0.5082293272933236"},"_hasShrinkwrap":false},"0.15.0-nightly.20191026":{"name":"brs","version":"0.15.0-nightly.20191026","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191026","dist":{"shasum":"23a68a183fbb5d5035d24c9750013de9f99df3b8","integrity":"sha512-rdTGIwGk3NEZR9oMRsH2lahh7AQv3itfHSRl4xDDu2kvUZ7WjDBOGZTKkm504i5vMEZ4NsyWUbwsKdVx/iKOWw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191026.tgz","fileCount":148,"unpackedSize":948010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJds/LLCRA9TVsSAnZWagAAWMwP/1pUNkvOVwf7tUXiZbm9\noSYSHdEH+IWuq+6YoCVIY6qxMhUsEDTXtEdt5dlxZ2/8y9RIMBOKFQXYg4FR\nI8as9mSlLeUmPcXx6JxTtfKdjTcXEUnXBFrkmiM/SP6ud8ln/k8jHuD0sZ1v\nAJITb5/qcKiWZGh7agdvHeos2Ok814bPeLUuP+9DJn13Y54K85vqwl5zyyLQ\nWQsh5Xu7HsWluKN7ZpZuQTMXDOm0cuh861467wyBfaivSjs+hFnIc/EYpVN+\nUEu9XxP/BWrivRgQH/P0wuCROv+gynr3SoUUTEnqrmiNjIwYcyVy+R+4u9rx\na9gN5/nKYf8q+/OJdCwSh86UxxVVMTC+ALqwn1ods3NpDbkw7RgWbUhKqBXA\nSbaJa32GaRyVnn4o4BlSbjXXp2JRsZrpdK3XcraE0sebBMnGLja74B9Oz3X5\nT0mfs06CGcHVI49N9AM/YbxTYNVtJoDZn1moqrbuyMgB7kc8uD34fnos4hc3\n/F1XN07R2kWCWuPhh4gwqxCu+/gpFke9iSTowUMQrqr2sRlSEmrccyT+eRG1\nGmfo4OSzUEgWwAqbrgrznChhmeNjjsx+6ALyenLiHgTFvzLdtreL/QeBb2Ky\nJUGB3GIi7IQeIDgmVWEhls1CL21x7g9SdN93cCll3YoD6uwfruUuLFCHj+Pk\nEKdf\r\n=jPO9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhQeR8qmYrELWRXZLb0ym64D30V1Z4JSGC9Ce+Fo8I2gIhAJhvC+gBVIfqjK+h3uVNwswYIas1f+nse8CNfXQDtuAz"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191026_1572074186942_0.422375656216444"},"_hasShrinkwrap":false},"0.15.0-nightly.20191027":{"name":"brs","version":"0.15.0-nightly.20191027","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191027","dist":{"shasum":"11128657d5ba44c0fbc157e0212d57ee2767e32d","integrity":"sha512-30tIwdUZ9/Ga11xouMHvVocP1GllN7NW1mylgyFmPezcCdOQi9GE2vED8c09CxXCwWWb18yqDkBK02t5XdQJew==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191027.tgz","fileCount":148,"unpackedSize":948010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtUQWCRA9TVsSAnZWagAAcxYP+gIm14WiOMERTzuCDgfj\nbct6I9uho5jQbXiJ/8HGjtcdTDnFtSRgzPjM5hpE4DJr3qq2va/+53NR476U\nhigxhWrpk2Ife8e2Hf3y2ilEE1xaTycIBn2NGc5b5YEJLhaZD1OCJzXcbxbX\nHm5gu2CFq4uE7gUIZ8YYzsJ8+qwNZO8692y1/3zoJhfEl1Nrb7H6PRJWYP1l\ng/9lRcMa73uyiyCkVyAPxa3nTigzZRqr4Vi2upDQyWcKeCFPYX5ui7sE7il5\nYzw6AT1Tqh3o3ARFypFzMHABWpJFfUg5zFKpzppp1sMkxaurJiLM+ILZhlKQ\nlzn18HdlcZ9NusNK2HorE7ouXzb/kbk/0SULAii/A35Q5XWvI4ElhXjv5jEY\nb+oApFVYB3tCpT73mckFRJTXxNe+kN3ozD45KuyhNLRqdHhO4CO0a7fVAbhw\nQwdSZkAv7+TQumFO61n2Y7U0A2IjOFSw+gKEccC2GDjnfW/78h8pXRxXijMT\nNl0+y4YiMiq/w9161pzics+7hi7ehIyM4PNWsX5ZYlXtrR5g5CA4+D+ITjkn\njlGylrLKI+vcrY75WJeSQLlsVQN3zK1YTWcTUAR32iU2DrZTVPlIwgf7QcPO\nXljyCm8emJAwFDfT6B3m6ji4/bN05PXMYyaEs7a7Xv/MlRnhT0oIlANMqeK4\nNq59\r\n=Oce2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBVydU/+cmJruLqi1SRMuSacorGdm22q3e2IucScclkqAiAcWNzdCcYjzVVL2MWZvYGy8kQhe20p9kIh+pIMVAj6bg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191027_1572160533923_0.6605581063647759"},"_hasShrinkwrap":false},"0.15.0-nightly.20191028":{"name":"brs","version":"0.15.0-nightly.20191028","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191028","dist":{"shasum":"83e91166e105be847ecc71a9e0387e74682112a4","integrity":"sha512-9KD85kmBzPmyUuS4/zQI6nEyGP1aBqiwvCIJo3yhKV/HGAYWMTCTD9wCWSXIrSWm/xFykVPFn4b51asNgmda6A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191028.tgz","fileCount":148,"unpackedSize":948010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtpWgCRA9TVsSAnZWagAA/BgP/39LR7vfxGjxWGmtj8ag\nYg3vZJTepSk5R9k4WAD4+Y8m5t0QQw6sx2ZkSkYnOhJwl/mDX/si6HcySHJp\nB/C3sNbx6wuvoCXp38ndYrUAf/vNY3fa4jNEiktTamOgabnjgCybxU0tBHq8\npgSQPA9oNpcBPZagJpBxreKer9+duAwWiOviiP6SjXBgOr3XmSKxz65cmCI6\nF736nuCo3QU0zheH3zULtYIhdTWCSqgqB9ICvpMoSTWbEmQXWLV+tGGiIca9\nMZKGpoXhxGjLqAPhP5UdwymEAv9ZuW1gq/M40ck+RkhdLdSzwhxPbXnwyexJ\nLqT6v42wjdactDlvJ89TkEhMTKhykyXEZ/2gG2TYIatNZv0WMuwuURezSn3s\nmyf6YGYx2ryX318rot2lFYLJL0K5rv4FGomSftHgQHk1EO3k473duB2IxhjH\nest9f15+/smGZBf3FPEDpTSh79DFdFuPjEwaB4LUDWT2+IbNGEvDLEugLAep\niOGvMYjb6Utm8bkA4c8to7lKap3Q4aaj+vlIVC18S0tQXbx+HUeA66A+Y0Xc\nYJa4EjATkPjKrZSSaCdgF7grf5uqXsvGbnQeGU4Sma8RSNVuLq5t9xx8Db4B\nwbCaIEKZ0XEuEtxE68i86LFHkkK0UE6XQGjIB6C255Ev0wOrPTC4y2+lkC8U\ngJxj\r\n=wQ4t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG2uutf2V/VTVx26Mf1HsEAi9KMBttHMb2BxecJceCnCAiEAxrOtOPzshGxvNygQSA8i7crofsivY+TZz8/bcT7lqGg="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191028_1572246943675_0.4167399838746051"},"_hasShrinkwrap":false},"0.15.0-nightly.20191029":{"name":"brs","version":"0.15.0-nightly.20191029","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191029","dist":{"shasum":"fe617d543f8ab1c86c23875e9e9bc96395689f5c","integrity":"sha512-SNLE7pKDZRSfVFY5vNkXIfJF8XoWhpoelLGNx8PSjQyG71Mtf0GjRwBt/l8LJZZV5mL4yqmdd4As3WCkD5/wkA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191029.tgz","fileCount":148,"unpackedSize":948010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt+c0CRA9TVsSAnZWagAA8BIP/2JVd1KLNkQRRjikjpPF\nm6aidHcL7XsOjmBmLd/OxqpGmtwPBUzokrBjsGo1T/ZXPBcqqE96kh/Pid+T\nqIo6A+IVXoHfAj6grI+N3FV/VjOdP91wJbEFQmjwW64iV/Bd8AhpMMiBrl5R\nHYBVPjhn8gof/uZhFDhcn24AdIbUn/6Par5yuzeLCO5sxnIUa8FqvEn6pgMo\njY+esJcCj2rOYCd83xxun74n68CLCILxOxb8jK5on7dfZ35Sgqbk6JqEChL/\nxT9Nm8h0VpP52i5a+CDqyHCpBzpYuDjbYIoMdiobDk7mBFaBdugpxA/1IS3H\n0PWqKGRB3O/5vzaOT6Bqn/j64BFpsvUKyKHq1w9nzCs0M1v/C9s0KOlbSjVX\nQ2yiFZ+QD+rCeNTw3qY3F9WtKk85QLG2cokjBcKS7Wmtceap9z08dZhw+LM7\nQdgZRQ74TbG4xUTqemiRvlIlf07X3i4kSPyhvi943rcm5p81csj03ZVuv8qy\npJXhbSTvMLf3UbFl7O9/QoPdip2wQ9JeNRAzAdRud5CQu4v2EUENWhbqauzv\no9hqM3MSjuEuPWoMhwGI9BrTF1rjEMcPyaOrzaI9xCNtOCYGT4VERe3TbcOd\nUzKMMoDe1uoUAaYJHLXhMi1fPmpaKeoPVTXmG0vjqpeNByWZwODRYc9zMgAh\nQtQW\r\n=DQbl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGAbEdeWJyYzCQ/KfWOshpjjPLYZjIowx2wcdSgYLwmLAiEAhZoZWnW+Ns7ilE5gHPrkC1rIwgrIp68gvxeH9w9s4bg="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191029_1572333363593_0.18186516887105952"},"_hasShrinkwrap":false},"0.15.0-nightly.20191030":{"name":"brs","version":"0.15.0-nightly.20191030","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191030","dist":{"shasum":"6d919e97ffc89cb75f007c8606d7d0471d1c0b9b","integrity":"sha512-rLukD/wecPqmoZGsabIapG/pHitVs9dgER7PFr+XsYFBz2FR0FaXzkRocXbbtoh4XnE4CnS+k3L9Vivmyq9/bw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191030.tgz","fileCount":148,"unpackedSize":953632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJduTiZCRA9TVsSAnZWagAAHUQP/Amllvwr2Eleu3I+j+7R\nSnDNW8iUahWo0m5aOkv6khVoFqBPJG1E0HlfDsT6WBKQf0MCLK6dsZbsFYQz\ninfa/IJiv7UJ8pHSt3qBJMYYexcchu0sAafFjMPQuGPgGVnnn/wqbvLQhG7Q\n+WBjiU0+Cn/bWJomuiaug47j/iurVkXDse7zHrrSW57/iHOues5NPZoqjXMq\nokGZRrZC4ztiZC7ppimYQf7oHWjn3s1OmuEXP3WSlVT8S9PTE0CPK7TcVgz2\nkXxS7aSiwZ2qMIZHOiUIWd3ELM5Bp6V9n2T3DcBE4l4Kwqhtc+aSpCTsvwfF\nV9Vb2/8wzzklmwIMmE8toNQknbZ9WlI0xyBJoHtHUVsRjEp5AFRqA1kvXuxw\n/rlN4J6wggur/kNXjEFbQkhTAwwtsuVcriav+gCIVt/ksVPy4ETpaf+hVdlD\nFExH15MwSt53EKSPU1EOymQq+fA8cCtX7sGXJrGmfItaxxB7v5hw2F+jfSzr\nQG+NzNHncznbyChpg8Vf6VTtqZw5rnOMBurgx9OAW14rSixPt+pTaml1JcHp\nl7kJmqwDk1Um9sef1lcz2VpR8lBj6mBlBUhEUpwRTp12/j04uKg69CmxsJXL\ntp9YbvH8EfgluKSgwyhXLgkDD2J6Kj4KQYVQh6H1mSCa5TO/qCrBpkRYb5m9\nO5dE\r\n=lve7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAqCBn7/8N9JbXVoVn6tQMM0R4X7uFhWluEUbGrIuqChAiEA1DvHI5KAfPToA6JTJKicWVlgBq37q1Akg1c1CHxj7Q8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191030_1572419736731_0.9406899735608629"},"_hasShrinkwrap":false},"0.15.0-nightly.20191101":{"name":"brs","version":"0.15.0-nightly.20191101","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.15.0-nightly.20191101","dist":{"shasum":"e2c78aa65de75b7270076cde02e73955df8457a4","integrity":"sha512-GH1POFx1+cK+xaOO2GThFMa+hhxQIndWjIm81UCv1m7f6+a7GD0zLv8it8aljPJVdvkFYX0ANT8SWo1EB9Cd6g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.15.0-nightly.20191101.tgz","fileCount":148,"unpackedSize":953632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu9ujCRA9TVsSAnZWagAAEQUP/3ZtJJqET9oXT6a2ZuFK\nN3VwvjmUwnj3EASSShriX1BHyvRoq0qTQuOq3Ij3FRcXGNlcyk/zdOG+Z0XP\nVDCOdtial1VoFtkwU/VIKB7wZpn1oIvp+Jb0m1OCtrr20OPQkTjO6LaAkjnW\nZ1rQnTL8njhoCeWFzRd25YLPV7RdTM3mcoEzYQSF1Y/GQaggvqwZXitg9Nko\nSaNwW5b+KPM5TqltdePqG1DlD+hmScXTwlz/o+aMasB2GfdDNhQM+21GqpiN\nYuSaSIAGXdST7qAh0g6bIGtfuNz9I0RUW32BUeZbk4FI6lWZ9aWgFVPCBrWo\ndc6hWqv44TwB0QpDYHVqMbm3FWFAyf0/AsHwYs/44V6IOwrUaFUUVZZvP+W7\nMST7ZCgT2LaYN/10kH4ORU9sRyfVp8eIbv/IcKn8Q1zJJUJJ1JwvIyP+EsFl\nBiV9H81tK98KlTMP4QKR0Mdh5F9yD4xuMltTJgV38ky+kNL6pE2iXfKvaVxO\nO0ySEzHZNnRPvFB9xSizZS+NE7mSq9vqE6iFVoPTrdD41YLkzTRUe4joc8Bf\niLIf/Wu4mYKJtJCRpz/ilz/QF4mNSn/eBz/GB+zds/K0eH8hCj+WZcf19owB\nkTOYD/yQEsyLit5GtwFX9r7anzMDwrRtM5W+A0IsFuajKafkwu7Buz94UJSa\nfRra\r\n=1o6y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGKymzMTmCb85/mcIRZE8+gd4Jb66pl8N8buh4qPU8qQAiEA/UiNYuOIYF7wibK23jyMdbOIqDGgYZvDHTmA84i7zI4="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.15.0-nightly.20191101_1572592546864_0.748646108728259"},"_hasShrinkwrap":false},"0.16.0":{"name":"brs","version":"0.16.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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) 2018, Sean Barag\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@0.16.0","dist":{"shasum":"e08d7b3c1ffc041f91f8a8b81fe065c2c7e78c51","integrity":"sha512-RzEENmo2APkescFBXZuHh7Mj9jrLwRYNVM/SICZVeCa9HfAVoDrDEG0+6xVSIm3pLV1pRFxUpKRaTUOHUhchuA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0.tgz","fileCount":148,"unpackedSize":953615,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvLICCRA9TVsSAnZWagAAwrMQAJVN+GM0R7TE4ssf3ZYI\nzZTDkbs4saKUkMJk32ECezlbhoQ1wTF4bzn4WDYsm1SVb7eq16/8Euboq/64\nxyHlp+f6nLY21Zrr6FXpqcH1bIFw784l7R9NoXr4nWhoSdby0ezohUJPUKOR\nVYLe9sT5OK1GXIRucCqgElN5s22JyLqzHw6R1AiNWqOHi2rwA0aPuzKqlHT/\n+5ircU5u3WPGLLPeXJtPscomgbPvWpRAA1v9KUzuObWCFIGrDGqG7PfPboTM\nTKlqJB1YH9kIIgf/NNbQrMqmumxMt1xeCNSw0ZEHTxgbdiJH0NZrFO+mOnmr\nQPNSpDqOuyX1nYBJYCfaiB7iFUqGMXWeygsVYReFb8oUxru+a/EHiIIF8c5W\nF83WJsMaQ+4OMd2W7Rldc4CLxpsiYbVxpmn8MoSG3mC+yBlmdU//SZ5aQBg8\nP18CLus6uI4BHOPn2UayYMJAL5LBYcAD4VCIGPRtEY1SN/Sc3Rmc4/azePjW\nkSgD8JViep101OvZsNZX+a2g/BmoHU0BhAcUpK8SUWLOphsV1QbotIFenHyA\niQb/F+bSF23711kxjZD8lrujY1a3raKvwAKQ38s8r3DLilF/d24TBH2gMXmB\nWfwXpuK2unxfAWwru8mW9fD5Q3spn3Kmng+X8IFsKjnxWC/f8x8Oyxl4pg7C\nl69C\r\n=/o6u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA5JTdkWXdjgJbmJkpxPHfPr9ru28Qlwi83YXmE6SebPAiEA8d+DOMOqYIG1ki5maYVHcoMJ2L47QvdHVsHY4De1v70="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0_1572647426066_0.17175380238116"},"_hasShrinkwrap":false},"0.16.0-nightly.20191102":{"name":"brs","version":"0.16.0-nightly.20191102","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191102","dist":{"shasum":"fcbe4a05e7f017a66722eb169032721570321aee","integrity":"sha512-9AJlyfBpc3/3G2lc35A4ueR/nnPtujEPBVG1pWSGfxOdVv23doMrTAzStz/S0jPpOlB5uWI6e4vEAOc1BJAC9A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191102.tgz","fileCount":148,"unpackedSize":953632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvS0sCRA9TVsSAnZWagAA1KYQAJAxWtut/76stcINoDM5\nrJm3kYs8hVO8R7huGVPQxIHNVvaBpUcrDkQP9BxdjN4yZ91VdYGPXK0nZmYr\ntpjf5gy3q8Uo7Jr9ssWa0JeCTE1Vsa0vKk/2TeTQwZ0BFEr+7V68kiLvodb3\nYU3/AUuKrG3wzYID2oSvfGlT/rRJLUw4OgDX7io/tw1tzk+DMl9G/XOCFiWn\nbYWHcJDSezLOtqt9pAGW6+M96elSpIbKy00PMaAtKlF6CEdkOS3KHsnRBXQL\nlbc50ldQ+dE0XP2sGFo/5YXUVegXvrlRlyOasZkIDRGDiDWtBM0cmqdVn5ug\n+SXv3PMum96/wIgn9+N/v5tVqCe7LH7Kx6azh7RooaXqpLgJ6Bc3GpwK8gs6\nkiTRahpPj7HSgEBQ/YMJAGy+zlJdhk66PyxxtMpwjWZo0/WBVIuSZk9UtJGz\najGLfjAk/ErJwRroxg9LNH4nudKCkFMdtiL+jDxIwbmPC0nlMhYmg+Fy/h9T\nimOw+RnsvbunozIFe/XXKsgO5WcjAfyaDBCIvlpYRrtmvypVj8/uzL1iWQMg\nagh6np1YLmDSnWhwB51qi+dO1yvryFdJZo7Vf+lRbFH1RenOr91xAKoSAbPd\nJQmYrh0h4pCrSHRla8tosEcaub/DLpJn6/yI/KzgBRctf9EK9Nt6RCR8RPJ6\n8Fxa\r\n=K3GW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHdBF9GAdEGC2cJRnO2Qn0fUpL0Zj1ZJSXb7y2hapw/yAiB8E1X00nb4TX1w29c9a2OnbchxNcgmTtaxxLRc7vX6Ww=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191102_1572678956114_0.2185903129916824"},"_hasShrinkwrap":false},"0.16.0-nightly.20191103":{"name":"brs","version":"0.16.0-nightly.20191103","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191103","dist":{"shasum":"8bf84ed207e4eb1a45d5571950cb249bda12b92d","integrity":"sha512-s4FtSaPotSwFGdQOIWxCcRmyaZNKVbCii61eNxYeHEZGsjY9AgqO0w492C2bJHHpNswMUhISrazXCwbUZCrMIA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191103.tgz","fileCount":148,"unpackedSize":953632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvn6UCRA9TVsSAnZWagAAZKIP/Rw5X1a9PNdG6DpGJPHg\nLKm3RXUYHojRyhoRZjVc/pmFseNSaUfAlEVZ6eIEQegu/N4+X+czV/+ZmF2R\n5BcOlZnvSsX7Lbv7DBdgxkzN/bF7XB1wknCSINhICi6T77wkCcXtRIzi+6pG\nrLX7phJ57Uodhh+TJSDgqJbCup8THE/C5o4KpoSJwuQLjTIz0H5tAmfFizhS\nhFBaUUUj+hVd62QQNbmGL8l8XYKLFNRsYECP8rcTjSFlslWiMwQAU3ea7EzW\nFStOoR1QmydOOKcRcCGTdaDuA3mCHSF+ya4EMTtyL9qqP+c8Vuvdy3/Hpobk\nf9MBdTa0Jm5yPGUxIdrjO3fv2DS0gBHsejk/xUN3ZW1vuwyBEP+JjOHERjBs\nnoYnKsphWnuxEQ2LyngCfST/iXQAQAcaGS7bAnSV5Rddv07qqtWnZKeJkPqF\n8/wShAebeGRI+MckbJlF0KnMY8+n84JnIBfEV4OHMPUpeB6psk4HC+h2vs8n\nWZF37Hfy3oSDeLKW6M4cpNMdAEkd2qeshCQDm1oXrHzyqEyqLRvvEXQU7eVR\nG6tWp0aNOQ38OgIx8su4Hk+u1AGZpdyR9YY4lM2uiwYeWud/kEVVyfoLmnoM\n9229k1RxQVevB4vIPr9xQz4j16Gc3t6jUcksiartgZW4mLrMzhPJ2gMhhQaN\nGJbM\r\n=8+gZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAoT789dApHD59NJusTcy5QTVIKoshJT+DVVnJ9wYAJ4AiEAvORb2ujpAU+P1Auo5zFgoC6cF4EckFaxF6vfZDS/JT4="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191103_1572765331571_0.17414080685772615"},"_hasShrinkwrap":false},"0.16.0-nightly.20191104":{"name":"brs","version":"0.16.0-nightly.20191104","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191104","dist":{"shasum":"17f4fe8c2639b27a2a71a6b3118e3ee85bd2dd8b","integrity":"sha512-DMnl+L9tHRu4DnPzcWXbC1BRQpIH9i21+BOQBZgxV7FlOhMDCgOiy24lX86CnNz11kvfoapfx9fNikAUrBRfQA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191104.tgz","fileCount":148,"unpackedSize":953632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdv9AfCRA9TVsSAnZWagAAutAP/1CczfGu309Q6rbM+rV7\nHLU1HhcLsycB0OiOYsPYUsTMUXr4/1l2lQ1uiX+zY8dYCky5w5pAki/teu5R\nwZiiMXMNWVF0c+ND8yrU2cNb8zZZjm03CaxQXi5ycQ7ec/KlR9MaWkrHCPty\n4bYSMAFwHtmyw/fDTBRSnEYQ8nm8ZxCsUlhaZje8h/hsJPObS1T2tEmYX8/T\ndGExHJmhnYbK67+GWwJGeZM2Xp71K4qLeydDbjEu7saOMhcGWVnCu5M3Vfro\n5pfatACAor3cBujXlnFi/UmuDpWD18JA4+lrDqZuP8qoGmrxvV7iAE1vsXrg\nPZCndyhfkbwmJHwNykFbKcnUqQEgHl4KtRsDqDvca4OYt4QGG8QDgLpJLx0a\nez02wG+kn4hfrL40pEc19feviUCR48nXvrYX2kpk7PJpn5/cCII9+9MKQg1B\nlbLQKAdFITSmpXXciL8p9/DiJ6mb6TdMu97o4J7ZdrWdPIwkTgx2AadoIG4K\nfru3SmRHnvWuamLkF/hILpZufI0/LSfFNU2PfXVX6y18uxFnA4olfoCh9/Fn\nylUCk0PvOaIrkDxT2nrhGHgeszXJx4g7njWEWWq3XHOxbiadANXS1qnYe+0w\nszhiI9BmUy36l65VSkg898LdYIOCDvTF8Y9H2+bXrP3IhDx0Xk10Lz1SSwqx\ntdhT\r\n=OSYq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAWnslTV14N4zrMYVSe1mYR60HYBp9rlOd8Xxf5I99lMAiAn7rpkqaI1yXyVwAKOT47qwMv/CSzPmfiu3MRas+RUYg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191104_1572851743052_0.9610943779062955"},"_hasShrinkwrap":false},"0.16.0-nightly.20191105":{"name":"brs","version":"0.16.0-nightly.20191105","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191105","dist":{"shasum":"8a10ee4e6ad1ee39410219d3ce717db37c08c29a","integrity":"sha512-fo3ksvoxDase3MKlbLKZQocvu9X8FDez+5jz77pYA2UEvhXSjPC64HO3ZEnmxYOm0rzoaLsJmpeL4cWuB/015w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191105.tgz","fileCount":148,"unpackedSize":953632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwSHxCRA9TVsSAnZWagAADnIP/2amlWp8Rr486+S9pxdS\n7095PW3O/+QSH2aXgGosl96DpXBB2HRt/8kZ+FpD7+98XicFHKEtJqVYJmK5\nch9AkwpGZJv6sVdANRfoiA5HBslwdi5GT2yZ5CfjUeq+vH++/zIrG7d1z3fW\neV1DWOZP1BLZGsKHBRvQu2ZqaqVRCxIxcIWlms3P0vGNFR8oeQwgwE1NJsVC\nBTV4U9t9d6GFoSgXm+ZGZZb9tUvaMth5JxZL57flhB5hKlFhq+0DhJaWHLOR\n4VS/bWn7IhaDsTDcPb4yox1Mn/vq40M2IlX0/2Ua14quAUiiWZSmXQXuILVF\nb36XWhEn1SdKFxmKP7ire9uczcoRb3y0ULFVN0apbdps1o/7hZFFeh6Sycsq\nXwbDK0qkYot84Hz9DHBzo3IZAqz9XWe+V+UuqL0ZWaBwB8h/NNCP8WuSwrLC\n0A41/RWQdCX2ZOzkEmUxiVUO+wQyvGhjwN7Bdp7C0n08ER73/jbuE0xr/Jzi\nyIu1lWgaTukR05Hs3vfYMOV8tqH9RYVGQbwXvgrV7p2r5oWNy2SMXjQGkhHi\nLsOQ+O3yT77sOfyZQH1w21AV/5/4AldRTGdXcyuyOQxAU7juFmCIVScsxQ0l\n7W7mUU832ebGr/6OfBNOe3qax/Z6KHBlUvqElLUbh8LovRnG1sDSgz6IXU0M\naY1y\r\n=kSS4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCCRuVSYU2gIeZB3yfKb42KVR1n5vPgEm8UgGjneUIQ7QIgGU2CH7Cq0EFp75xYlgDLoovhK/Kw/tk7dihNBbFoZ0Q="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191105_1572938225360_0.9637727009044779"},"_hasShrinkwrap":false},"0.16.0-nightly.20191106":{"name":"brs","version":"0.16.0-nightly.20191106","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191106","dist":{"shasum":"e9a4bdd06b183aa5b647229ac8556f96f5c5758b","integrity":"sha512-R2P04ZJur0uwcbNcdX7161xZEjg4p2gRQqi4fKfbTetwHhWTrvDA8TQk4fxXpr+AjgrjCYMJupIu8ECxf8+1oQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191106.tgz","fileCount":148,"unpackedSize":953632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwnMjCRA9TVsSAnZWagAAxE4P/0TSamTlEQ7i7bqMZvm8\ng3NCf+miwjjg1Pdkr9nFuZP2IgqQHYL+RKrbinDieOitryFGiuHgAWKCtolG\nr9izduzU/5gDGK1v+iMJVIW42efDdPl2ur88+4nFysK5E/Hx8RZFfxvmBukg\n6zTk2ktwW+eYZOXnqf+tz0Z9Lzi7UTTW3ONZ6fmg3+JWbiXa7EIKeEIyKyyd\n/gOzqFhJLpPTXVc9a4pmyV5OCf/rFAJjcdnJtJcUYGY8xNVmjVIklVhDVQqI\nL9h93GPoNaJhpSf2s3fwnb/yBGb9IE/s6T9eRJuJugCNOfZ0Kx+WH8Sngap9\nQlvtBD0J38L0KdNi+SLEaqg2wjbi9ituyhqOk1DExXFPm7WYV5/+cDIj5Oh+\nAFSy8RGDg1wwlYtRU3z7zpW5vWprXINs4VJ+2rCFChgpm0m1h/lk7xWzXQ8Q\nM/ipAaTg2fcetgp/Waz7Kvgoy81SHhndJQCtvQFWBqa02Ht7DqZ/GKWNrNQF\nl6aY+6x3IixddId/DWYjYbp2182TVev38KbD+e36YO1Brl0/BbYO/qDQ5lcL\nCDhM+pRjVxEYSWwSZ0MvRcWMySmj+xo8DK1a2Zkj8zQOY3JEg4uv9lZhuPmR\n2gzXktCSyBP8QatctjPRzgaqVpkI05dNwB/fIc/nbQz/9eCESsASMMwfm7J3\n1IqK\r\n=KAUN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAuRbz/nWnexicNcb+s8dsOWfzy9OVf/uE0PvnnnbMVwIhAPVadz8xBLWby4aQ9iCIPpriqnCRFKoHSeEBLPLEygl7"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191106_1573024547187_0.2615548560298253"},"_hasShrinkwrap":false},"0.16.0-nightly.20191107":{"name":"brs","version":"0.16.0-nightly.20191107","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191107","dist":{"shasum":"6c39d4996cbbb9d620c766198cf60958123e620c","integrity":"sha512-hplvFAM6bsqMSSr8R6a8M1IvbzCrEZOz2kgrVTYL47PMdMI8sC6bPFVUVAIhOyPhR3hSyF7ydFqwTk1lKkS4+g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191107.tgz","fileCount":148,"unpackedSize":953632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdw8S3CRA9TVsSAnZWagAACHgP/A4fP1STezGtsYrkhkwq\nKee0jRmidUvIEK3G5SDdhq0JH5Tin/PIYsWmBNvKSAwxKYXj+LNYtJAR1H3P\nrfj5kpxgm801aU4/AYvFFZSrMqpBWSryeZ+XD9gCg1x3wVEt8Ke/TbqXLwbA\nQH4920ATBXpg2kFWBMe2/rStufaf8lTj5Ax8di08IogZoghUmioyChOeetcT\ngl5JFI/m25ru+kIJLwWtwX+cp+84LLNAlnPi3OEIHYS2NhKcUvp9jXqFtxCh\np/tc986e/8HOXtl9fH4FR5fNZ4C+KKqrUnEPMViEJPZTbprjz9vCsSyaJ+qJ\nx0CcR4l2kctDQGntn3UwM2zVi52hHUA/TliSkbLTcs4BAVjm1QxvILtEt5L4\nBhst/NXX28VrH8uQTRl4U4CinQ1R+1CQmLw/xYAVlTmqRyr7xISvxPloVaxn\nXL1QFdXocDUTPLRnaz5OWGjg5f/+xqk+rAKj/5kRuSDzOVDlSjDh4ZW6eZw3\nXNsR461va0dFJHMxVV5Vkatm4geIw69biwILyzP7372C2Zy239HHaV62K39H\noTX5eATtxlxrDRkLMP2M1LEBgAgbTjL3pctyuG8P2O8WtQG2xrzW3cocfX5h\n1g4nNp7Jy/j+7DJDDtj3rw+lVRKtNP6kYzQNdg8MaL5c5IzJGwoSLqDppJ+u\ndNlG\r\n=czNF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCa+P52efftUN2Fh+cLjVIe0MSFJpIn/M0zKlUE+gQ4PAIhAPvK9egNhwFxcqaffBp67GEmTYBRaAhFUTP4P6kLGoIi"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191107_1573110966511_0.35499159537436076"},"_hasShrinkwrap":false},"0.16.0-nightly.20191109":{"name":"brs","version":"0.16.0-nightly.20191109","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191109","dist":{"shasum":"daa48e5f441db13f9b665035e58e5a541778d637","integrity":"sha512-yYGZs6cWMK39qF/PsbrnFvNQgl9Z9HjKglk0bttjRKGRjwetA4qcp7tBgbut2PJtfDhPLiosR7eXIjKngL6UFw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191109.tgz","fileCount":148,"unpackedSize":953632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxme2CRA9TVsSAnZWagAAad4P/RmiclbAArhE52ZzZf7E\nq6TcqFg/yHGpbnFA6NObqekjz5ujNggaxyEYHR0JwZGlQQxE/nNu4xcpC3ql\nVG/osaS/RWJs4/ya9EznxLwlIx7mdQk6IGDDjGgVUjl08qgIu0zm9NIZ1aEC\nSp3sb5wi+exYlkP2dIHl4JzP33xda9Z1kxIKRpSxB8RAfF3klFdksy5BVnhH\n1Pxcas+G+rKwlOZPzfkk/sAssQTBbvybs1N7EZIAf4Y/pfl1hWpluZdlRPdg\nhhQquJDA+ey2NTbQeUDpXGirS8my00/CZo2N7FxtjO/oJchXRm9Z95HBR8/C\nnVio0JKmtThktAnbBjzyGfSo98Vi/oN4hPUZmrwHA71W8q7i2RwNGnvKJdaz\n+dFT7EQvYbZeclGyURd3zwFm6+QwJ0ANQKvWbHEaDHxznX6JhBNAXZA+i79P\nPYDEJakC/zSqNcjKZZHiPFJYwjRBSQB/caiGI6aIkNwnGEspYjEpFGOAkbh7\n+le1HBIkETo3cb2pgmqycevRZHUhZ2fov7KekXVokGsARDhe8RKWU6wZuKhO\nzpZIRuDfvdDRiGWaHLxC7j6gKuLxYimOIPuIKEja9/DK9OjUFgOeLywXF+m2\n/9XK1+8Y6jXaDqYnM/yPd+Op+8IF9m6a5w4J8+s95rRx/bcgWn2jBDrPHjJR\nfjJw\r\n=0uEo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDqfaZtTJZvSBQZS1lFT90JNE8hcD9Hok0eEJKFNYbCxAiAb0YkKPpJYNBxGOHpjMH74+AEXY2iEjuAly1S8pcc4XQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191109_1573283765575_0.04763296435007569"},"_hasShrinkwrap":false},"0.16.0-nightly.20191110":{"name":"brs","version":"0.16.0-nightly.20191110","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191110","dist":{"shasum":"05b174a91623366affc552f7422462e766f23437","integrity":"sha512-l+RBk4bOxLMuF8gh6g4aEuHGeopeLX6ihXMeyW49TwWZlBpdf8SIr+OjWDRt5YbsGwtv4LQJOBn+LdGDanNLwg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191110.tgz","fileCount":148,"unpackedSize":953632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdx7kaCRA9TVsSAnZWagAAxmwP/0udMG4C1w2pzDNFREZ9\nCOKazZmbwxInVRtXY1xl9EetMNge8dHcB0ByWmwAWY1R1nBF95bdniNDOS9I\n5NLFTFjJem4kKabJQszMDcoctxdLiHiqcoUvSIWrWLdcgOZo9xfmfDSwVP8s\no0qvXgczLlvgECP9F+CLw8FJ9cFOTsQr89Coz3ZJH+uf/j/aav7EAdMaJMym\nmVRIhMhBlWJqQbmDWCTGgI+2WQpSFmf09qtC7yxedWM7rIFZPQW7gwijMPXd\nCJq0X7Nkg21lR5/9hyDvCHELxRR1LCkeobkO4AQV2Ts6ic+WeadMqvsHKTBK\nsk/9hAzGYoF/BcmqML7eqDuMTlQONzIKNc7mLzzP0hORnSTnnXaD7mDfMHHB\nm6vYZqJ/cJ0FgxP0cljq6rlpyIP5D6aaP0zKlLov4prhU0Kd19pbbz73zoBD\n0FDTF1HSe2xzjkPKyca7At8O33G1kPD62uMFv9pI8VbILh2KhuAyQ4mIMHRo\n/AFLS7pnNlFou/t61xBsjIqorzNT65dNNmRW0/BN3UvozCJq5riTgzdpDAJi\nrw827H01Bz0yqiodIAguVcsVJaXPIfbbnMSMFgvYm1TSuuKnQQFQ4cYj4LPc\nK7T/VOX/a/J4wqmj/HjkoXmqhrvek3pk2eeUrMX/zp9dgPpFwXTKzKH5k2zE\nuN23\r\n=hvLx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDA1MIkhxkI4+IYfs3o/qQ+y0xu2BUawu5RDj2mOT6/7AIgHTxclo4QhFdml8OvWLCfsenV1QpKlTnvcbH8qKJ+g8I="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191110_1573370138195_0.12988938522649662"},"_hasShrinkwrap":false},"0.16.0-nightly.20191111":{"name":"brs","version":"0.16.0-nightly.20191111","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191111","dist":{"shasum":"8e7702d2a26807e83ac033671e05c0c548c6adb4","integrity":"sha512-MkMFDgkldgiAPTpt29UEnuNEw2wde4ux5y+pWTtsnk7XobHd4FmNsUdRmsSQQhY1BonP8XF51kuaYAfrbfhqcQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191111.tgz","fileCount":148,"unpackedSize":953632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyQquCRA9TVsSAnZWagAAEk8P/jMsHKF7BF3ml9PrlUvu\niKSJIMgM3qssAC5roNjkRskoLwbFPVuF+RI3I4cJGLlL05pppKGBQ++JbvZr\nDe+lZ331dhWAxwNXi3i8Z0kJphpoGfjXhEvlq6LNN82EIHhF9pJaRfDEahGT\nEiweMFksNS0wvlf6uw7OGp70pFWeITJ3LJoAarV5tGmqGYC1H4wXVjXg4kDF\nL8t9IguCGd/swvlM5jWwyijfGu09+og9uVMzCctxvF1s02I0OnMghCsqQdsf\nhKp5tRGtt9n7ha14LplzdFN7v0KZuXpCttNLYFolud1lMsgrSEBpNcsNZgd/\nX0ww955kaa/tOMrVKlfF2htpqPAGNPXJL8izp+gYlg2VsnBjEv6axmKrd4tG\nsZkbZJWI+nR+yGuVxJKcu1hjVELfMXjqR3TR65gtpOQ0ZdNgm9yYTChk/zpU\niuJ1rBqf6hnAKLMwymXp+FYu5kozZIS9V0uL5rq6aGt2HyhU6gOTqiWrrhq3\nkWVlXKUHW201Nf2x9ldf1W33o/vzCVrLsCQDu3JkF1MbXmsnmC7d8P4wDJrF\n4esK5vOVGVoIib2cO3Ydfy0ixn2MgPX7o0cMffuRz9CojCC73a38irRIQm8o\nTPxU4Owfy80bLQKvg3w9/T6AF2qJ2o8uyCznUrXqak8BqOa1fLD1InSntRdE\nlOtG\r\n=Qn+U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfIFPio/ScJJmZvoBQiElgM7F0xYe0RAhvLzjfwRSRnwIhAKcH3FLMyPHFpg8Dr8mKPfAjAKs0navMqCc4D8+Bd57m"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191111_1573456557709_0.13358235443739686"},"_hasShrinkwrap":false},"0.16.0-nightly.20191112":{"name":"brs","version":"0.16.0-nightly.20191112","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191112","dist":{"shasum":"564e92cedb67c9427148ddbc9a5f327aa81e453c","integrity":"sha512-M3e9GSKD7TDtNqR/qr9vr4y6ZWsodBaAQDwqsQS2hhxMBDyjefEenwmAxaTwC6jtMit6+7bcTqQ8tz5EipKd1g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191112.tgz","fileCount":148,"unpackedSize":953632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdylwrCRA9TVsSAnZWagAADX4P/Rn5sh3fNdlfO3OZ8twM\nA328WZVDG1+we0DsiJjZ/FY4qT4acg79PkPAmp7cBEBgwsRtEy6TRQsU6VeA\nd1If6QTc64d+EZz4jlVwsgIHnNn5oEzvWJE5MxsXMwQ6sLGnSAnNEMZR6o37\nFX7IuIBFHfakpp0zQSCZMV8QDS8yFAg9XfSmCkic5gebGcEZelgactWn0pm7\nBEzg232onKmVBlYuLv2aUFiqbC1o9f94ZEJZO9n2E1SZd4RHxetGZNDLHuC4\nIDzA+1lCIfcdiadJ9Hp0Bn6v5Q1Dh1TQLzSFw3RHLR4DWrKGzQA5WImbHQ7+\ne9JjOGW8SECdEb+xJl0pbHFcP6KsRvPYPBRZ5TfOrrBKq1iNuAuAg2ZAcFtb\nT53aJHqCPooyFdHmn7RNm6GE5gcgZ+KfV9c/DK93l7wXxwwHHYbBxqDSCL/k\nrHXUhWVpynGJxv2WSPWahFbmcIgNFhLyOkLSJfHQ4ykmYlOGW1fyRCNkbgAT\nWoiUWfWX1KgB4z2midsyQ4XvJzCGrPM/dkL2JVljwtaOSjJRBoRKAMp0az5j\n2tshZAPGDD5rA6BpXAp92l2t7MduZbgEOZo7z4jICN0wm9G+D03WbSMwD4qY\nlKiW1Igu27LI3waJDETF9s9a3ZrAymiyza5br04m4Z1dxWzYrKDqenXyYk99\n08S+\r\n=j2yU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUiwlmKZMUVA0PUl9EOFXN/x2kXNhnxrbvkZRliZT1+wIhAPc8drlAt7FGbxXwmxr/SJWShlLlWuMJP9//p/3oEaRz"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191112_1573542955250_0.5804040895710589"},"_hasShrinkwrap":false},"0.16.0-nightly.20191113":{"name":"brs","version":"0.16.0-nightly.20191113","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191113","dist":{"shasum":"6b270fbfd5fbec61ff3250004e3a3c7356a5fcb9","integrity":"sha512-zRYsL6yTHj4g3bnPOyets6j3zwLEydxc+h9btMOmw5RKLJ/f4fOrvegEmWqb+Jg3uo0ExD7GJtQ/ca55xEs8oQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191113.tgz","fileCount":148,"unpackedSize":953632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdy62kCRA9TVsSAnZWagAAs+cP/2Rt010BDeD3DftxJvyY\nAfn0kTuXqYjSWtQmE21o72W5sL/dOUVHqgwW2JPoPhHJiUY3wGM69SSZVvC/\n4n9cIJnkmPeYJ5fZUG1JzFRAJaxPkSb2Ekf5W6/+D3Pop4Tbi5ly0ge8vcSm\ntEO3YT8Y6QOVdqHQOI60WIapoeLOn+6gaMiINgeYfgW+I2JzQ8aIdcGO4AZF\n/RJFn0OTUG8jfUtv+HaH7ZenHsUaXegYVzKb1PINY8Kdv+H7+7oAWYkk1a6O\n/Uoh74RBxAcKrOmYUQYcoNBezj2iHLw+Ul2LWbFucwlxzJhinyvyh59+b6vo\n/oeFvVbZi+acM90Bjw06nLnZYTH2Xlen+Q0vr7msNycHoOK9aamEcWB3cg8l\nqyb5AAA37j6eJ6scatf+OFHG4vobIF1ZStra/t+pXEt66d7lC5LaPIEza8X0\nCsxESG1pzL3E4wO/3zF8kq4Zb6HOmxhC3ICfUCic4PMV+oY4xskTl0IXlsjF\nKzbPkBkoQZcegFNz/FU+LRXNIfGstnSJaKIlMLpzaN6N1m0BRAGasIb2Py/T\ngE/kL0NPozQIAT+q4sLKifqAh4EZdX1fOvNjfqCDSAqoRues13Z/ZdV35HtS\nfQs5G7QIX1nJ5ImoMiyHZaJaxOMzHJ0r2UYf1+CALYtaRNGKCeUU8vv2y5Qe\nRvH2\r\n=E3WK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAh3En+irL+YfBR4G2x2IDpQeFwySoGA6AgTlDmNYHklAiEAnQwUZudxrGRx7X6P+YCoAU6nEVwj+hQTob+vUqH5HRA="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191113_1573629347715_0.7899314999474456"},"_hasShrinkwrap":false},"0.16.0-nightly.20191114":{"name":"brs","version":"0.16.0-nightly.20191114","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191114","dist":{"shasum":"7dc5995a16fb9c118defd7a2f99eb5641670be77","integrity":"sha512-uiPXjgsDh4oIABmqJrvNOqh7R60OSgm9O+gbG4f07ll9gkF/9DK/8l+UHbg2+aQfydL0tPv4Ze6+UoxoEoSQ8g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191114.tgz","fileCount":148,"unpackedSize":953632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzP8xCRA9TVsSAnZWagAAkMMP/jgakLhkCzsuIrYft0EM\neuFsHPwZpSUlaOnSX3BoWQU19w2qQEJ34Yc2cIv9K3PxsqF7KTSf5upeZ+AQ\n/J03oVM2qDmCfdXimAyKyoLpo9PWJIGq5b/jbuQX6s2ZYkEhOJqsmE+7ewP3\nw+A1eNpIJ/Tb/rMq+WgV/X9A9t/9FlAmcyMGNB10UoRA66GmYE4nXVX9mQnM\nAtB9sN9R6rxSGAkt++85WCvoXV3wCHHc+q7xDC9v4KYyATZtPL+HFqN35gxm\nvuitEucq2dWuCOjHocOJM5XT6IpCGUNmh59ordXT6YLQh73b8McZmo9+JZAz\nFVtcHFEdxDKd9F6gUOp1w41nEmPLXY5YNMFGJ3wNoRlw2X01xivz1+NSHEBA\nYduLiixyU5u26nRoJ0vtwC4Go1Bd4xvy9EKDCO6f+CQx3O1rLF8aNraYiSvv\nW3ah+TmbCvEj5jf/kUB4Ag0ltZ9vd/f8fPb4QPnCJr/vn40kURBR8oQ+HkZp\nCLM5yJQdpfqcoirRnbLI3uz/23kYPhhi6noFpWSgPq/SLdTMoZ8f3aWiQFTL\n4weqRq1gUgak824Zq5XwBOSLUP8gsPtNp9hJq9RIDwhEKma6iBu7vVr+uBnz\npt2NqJPVmNtr0kvWr/YnMyS/2jORuD2gJahzvQriKVR+pkhSCHCl0PJNSwGE\ndNUC\r\n=PeGl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAhWi4GcHTe62tC41wmgIhg438XaaI+XC1OSdI6zktvRAiEA++V6UW43D6jjR22XDMMhpcenAe6Up5caCWJ83ieGuqc="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191114_1573715760904_0.45882776661622304"},"_hasShrinkwrap":false},"0.16.0-nightly.20191115":{"name":"brs","version":"0.16.0-nightly.20191115","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191115","dist":{"shasum":"64e1b3e133b77eca6e659f7a596b17d411587a4d","integrity":"sha512-LmWbajf3YzYsKkmdU+AFt0q60ks/CTUfzWNZ9/7/hhqCDj6Iiw63Ryp4IdUQC32Pb5IT08RWmOXeIsv+ZOiX2w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191115.tgz","fileCount":148,"unpackedSize":953632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzlC8CRA9TVsSAnZWagAAZl0P/AnSH7WRz08S4ZwoocOt\nQAoCJR+zeoB5IyJCO2drKmXhGnEIlzVqVPadgJ7LNDam5unzNAdN0Nj/5DVh\n40simcX+apEMQSvq4fP6c8sulTQTXyaI+rk9oeA9pYiwa6tExqo48c9GFGvp\nVlJq8mA8Tf/jNDBbsIfXsTL9grnBU63O8zJZNuy0UJ9rTSLXJl3hKk12k1DP\nw1G7OQJdGiAgHZOZCfY15+ZJwon4BRnpFnD4QCilobfzN2KFCPR9V34HG0sk\nCBmSxrA+o+M1pzlbt3ZcNBIv3HexnKW/kp/QdUCC0UmgywB1anmUaG007axY\nBzPsSeC1KHa0ibFZxooPGjS2WN6qRmE+CypvqQVAeGfUxq9BuwtPbn0KFGvP\nh1fv3prn2fxo9uvQp0+XHrm3Aus4pHyCFK6hociV6QSuvJ5YxmH7eehhhA16\nY5qxfE7UdqaP7PMbBNFZyAj0a6dqLxSwlVB8LRbdyvTYiTPU5Gl0qsqh89a0\n+LB41QIkBM4qNYloA/471Ov6P3QXvMr5plD6DTHCfXRwAQdktshTREwNyMme\niBHYW2fVj0iggy41pu2DJz32WEcuxkpRrTzDRGHW0NkG6OoU6hj/f6lo67rx\nvjIaXXPjFW8Cl2+l44/6eQEHpY9pY7Y2j80mYCRz7yHC7+QgladQs4qntT/s\nEOxs\r\n=kcqh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB+Hlc/JIqxdXTvUdHDM39UrYknV3GSArurQwuMIPLqxAiEA2dEmDGrVy4d8D2Ub6v8HXiN5KKfHU30vJnr1MiysMio="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191115_1573802171855_0.7993814941399837"},"_hasShrinkwrap":false},"0.16.0-nightly.20191116":{"name":"brs","version":"0.16.0-nightly.20191116","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191116","dist":{"shasum":"6f7836a3a82349aab53527da612d58f4d4f3ee63","integrity":"sha512-oVeGdsFhXvBRPcTb82RYh8eSmQJJ+8frqe8evpxHIFqeU2PvRFvn2I28fW+4p+OPndMt9+mJo/JAse+GfYUZRQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191116.tgz","fileCount":148,"unpackedSize":953632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdz6ITCRA9TVsSAnZWagAAk4MQAJ+rVmYn9zNH77ppOPPv\nntXh9v1/usYRkRoHYPs14fwt3d8edN4NOKLGTT5fDbklJ8Md1tp4YcUAws3p\naHqq4qBRV5gUPR/2KzBcx92VcnxBCir8XrHVM8r5VowEi0wLB1l/soezjyCy\nFNKfXZvWZ9JeuWzHvTJmVgDpvI6grhpgqai4mhWXpSV+E5N4s1q4oJxOgt6g\nth7Kb3vo27T7hOypcsuqoabyjy3cs6ui7v/cmaBgyLGsoY4+uOMMovRm12CR\nyvBmRWrgey1wE7NyKsd64RYO5Nlsap7j4fLtGtYgL4MnqB/d+NcnLF/TZHTb\nICtDxCcXYHgPSIQXHQzlem0hbNs1p/xiLVT+P4Mp+q81Jc10QpTJsKgGUZYQ\ngEPrDOTRqfoCcn5kE60ATXMbfPUQj2o3wGojzF9b2DNMJdH/Jf6f2HaN85GT\nGWcPpHe6HQjaEFscZJsE+9l9csK/DGUX0eOBSDNxVWXs6ETIzJ1pZvIgYawa\nijRH0iKpFEdDcbvSab+fAZ6Mzkq/Cs+QsoKwFkoH9rYFBMoE/GiEQ7ECdpzB\nTLucFm+i6uYDsG6OYXtxYp5AVBs1pnxlod4zU6vnhD3ueW43tihya/OvCSOH\n//mTUmWY1EcQpzvbELNSiW+R/x/ZC+YvOVLj1mrwF9kNifIlcHnvlg3+2pK1\ngGY4\r\n=MdxF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIETT1Tdsm654V8jT5aXgT/YnSmRYY4OCwe+Ja5dAY2UqAiEA1gidLprqCeCNhXsqIOxOM9yx2zpQZKjPlOCXVZUT/1U="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191116_1573888530723_0.5058147240949729"},"_hasShrinkwrap":false},"0.16.0-nightly.20191117":{"name":"brs","version":"0.16.0-nightly.20191117","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191117","dist":{"shasum":"912694556e6ee43d9ffe6475cb8540de799bf340","integrity":"sha512-Iljty87wkE+2r9QkIadXc+cy1jfE+Hw8ZMSGU/87F4xz8wk4rnZ8LZpq9eEbQnzJxxlGJ8QggXYasejroy7OpQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191117.tgz","fileCount":148,"unpackedSize":953632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0POTCRA9TVsSAnZWagAA9hsP/189LdKBvwG5ImHoBFhy\nGhCmsgRBxvz1WKyz1cgdBq+bP1ppkbRfG1oRgP1BzZ1lUOPOCnrF/+1KRMpw\n+VCXQEAA/dG8rvek7VLae46FGNTGuFjyJ9yHDiEOFuFjEG1mnZLJzvmonPS9\n75eRmuncdUjyZ2d7dhDMI61pKvjyB3Bc1flEyfpl8udwwETbqbxQEXqG1qz6\n7CnSJhULPbtiOp/urx/aKYgMa7khzLzp+K8URA2zMBuP1zBOIg8J4ChDrbc9\nL1Gs+shXUYhKw2eUkJzxv+LHoA1htGWAypR/K5xa8Pf6yKwhIlGI+F+1gxDr\nhWxNrRh3hMCwr0Jfo2bspxtyTcs3JfOf0mrp4YpPONww8r1Xh5U/X2j+paVT\nPM6Kf5LK+/cv/o2CQUEHx08hJnZ8uVcb5WfpLhT5U0T9Ubv7PMryDUDvXZGP\nahwj503t6oY5Lb7/g4rj6gTVA46a0Xxu03L+I6fN/Vv1h/9pJtf9DokDE+Rn\nJzotwVFwgFeKbOBChYiIn3ZsI4gTOlTyuPro/Onk2Ut9PteDsNeChDLisXbO\n7Ad5BAXIa6f1kt4FNCXN7gbgmTHDmXGS4SdrhQoIW+Oa4SY2jesJXHA/o0UN\n0hUFsGclWxXLbhgHP43okGSJmOk4PzfoMuj/LHHGyzQINAYXxrBmDh4edmjR\nApS8\r\n=90mF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDsU9ay6rQY6F9WKNVfPKYYP+18XS/KzxCBMr7XWWAxcAiBPjZfuuMDOuVvKK1M4OTTsQG/u9gDw1fbZCp0lhag+YA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191117_1573974930903_0.631773733048375"},"_hasShrinkwrap":false},"0.16.0-nightly.20191118":{"name":"brs","version":"0.16.0-nightly.20191118","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191118","dist":{"shasum":"9ba123b3dfc53c67b387addebecf0ae387cbac96","integrity":"sha512-CmP/ZDRXfhqRcVIb5kectG1IIfeZzxNuOHatGP5rf5hmrLWMLd04J4BhV2mMDycTTQIvuxypuni55Hp0NkfC+A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191118.tgz","fileCount":148,"unpackedSize":953632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0kUoCRA9TVsSAnZWagAAjhAP/39+8Y8UxpcBBjaeGk1s\nP6wMfxNj1piff2yZ5AgZB/mM5WrtSKaEnR4qsSxK7zpUB2QWm0axLZafDsxG\nLOiUEt8NdEWYFTtokv6r9khzDVo3ahVE4mP+Sk20jPKh4Nd+oj5rx/bm17oW\nryxYUv8GmurMCHZCK5synIZeBTE8k8aCnzaK+DuFK1FCP15VgCouzrNG08Wl\nG5ahx0EiqNUrhJlB00vN7gbAD+LLRJFXgkyCwzIu0mq4SyUz9U9Q3cOxZmPY\nWV4Lm4suqD38jLwJMN8iFKnfNPZeOTVDvZliL3JcraccUIZgEGzET18mTYWv\n900X5UsVfaEdM1BFLOgepisSMkviGbIDYlsQP8HFq2CkfVQny2sr2eG63L14\nrPicvabpDtwXQ8SMBjBZ2smNCWXxAV1DcNNWC0K29Ler6XK4we1PE10PF5WU\nqLboAuDWUNKWCDC0HkQEdteplm8HFEIND6JeVJ4+B29bZ1DRvWpXTjV4iGMa\nAIvOYqU8wqodfOZjM7EP+NVYMXu61R5nmft/E9mrluXunUbdVQnrNhI3VVKv\nKMLPI++M7Ohw47rPJxmWykymzIVv1H+YBtvIgmC+fFoTiLZaJ6A8aLBS8YHr\nA3LHqFKQuWgfHs3weSA+OkGM66z7/42sFEuvrscrgoQ9VMbOL1cyHcIAo4te\nIJGX\r\n=Hvgl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD0V0qjb22KmSxfLvmNUw6tskB1BXgzoxeqYKDyf9cF+QIhAOsVMLen4hMLVfMhyZ7wdj9heiDGM2SPCCxYrwU5Yv2C"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191118_1574061351960_0.6165743856578083"},"_hasShrinkwrap":false},"0.16.0-nightly.20191119":{"name":"brs","version":"0.16.0-nightly.20191119","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191119","dist":{"shasum":"ea03f3878c32ca9ace1d1919e3160c2f76a76a03","integrity":"sha512-jg1esW+mKtx9be9m8qRHrr3rHj6cdj+TqCySD69tMub4A+ajX8V+EdXZ3md1B2edp7zu0kGEIndoUl3OXU4/DQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191119.tgz","fileCount":148,"unpackedSize":953632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd05beCRA9TVsSAnZWagAA5a4QAJkLttvDNxxpOPZDoWBA\nQbf0xMKkJdpj/boUPyvCVCYnkiik2cMhlvgHnIjK+7x/+bIlqz2hSg0JyLay\n7ySgIQzJtuOXJ58AiQ/6OdT4VpIufr0KMIXaI/Bj2uBX1yCbMSzQsDljkkr4\nu4y1JxNPMj7wSoZCku7zbXt+dPJ5Gzs1ZEKtEDuX7xAwxOb72p/fVJw7HI9l\n7/QL1eM2f2fl13lgt4dqY6j41JZXPm/ZVSEOfSQP/7Sny9PaGJFLZSGOSRWx\nhSJTIdaCExSz3MPp1m4pdUrneh+b1MQ/hy+BPehdrrDZWjtpFrWdntAuXJ5n\nrHEF1wQrTAPiqLfMTFyJ/a0g9HyZ3ZfSpAJhB8ksadWPAUtwLYUGbxEMIkso\nyeWxmB/14i5TX/EVYJXDIsOOqe7LSVW2K2DmsfBON0K50zQkfvanDDu8GgXm\nDbj1L1zA+n8ViU1NXSDNvENkkSiFQw1Bnwj5KZhFY1/Hp+lqbayXRJDyJ2YQ\npKpHe5cDm55tzsWxY0mOE8ScQJfneqopf/Lm2M9UHzsw+9ridc2QX2fZlc7u\nb4g8ScXd5DN3E2lgXTg5JGSl86AGPf+OLsH5vKmti3ps+pHdtq0vGjXHvIRr\nMQonAz6PSb9+9Z2oeUJiAluc0HwtWfmrtjIPpuLmvRxlcyCgUW7NE+OOP3Y6\nteKK\r\n=PN0A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTNdZ+nsfu/eE1eFGbI/dxxpIFyDJpJKgAnUkQQ6G9kgIhAMkpM3dkSq8ELXRBrMJGHJSnM/ws+qY8F+RjShqxb7q1"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191119_1574147805386_0.23147466128898952"},"_hasShrinkwrap":false},"0.16.0-nightly.20191120":{"name":"brs","version":"0.16.0-nightly.20191120","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191120","dist":{"shasum":"63e9c66022d8812094c93e32c9b903dc9d490902","integrity":"sha512-qJ5WopzP/Xa5cCbOaxi0mRXbfuETog6mx0aSjYRyZo8IQU3nKFZJV1MB8/ria1nOdoO2pozU2k0BgQhgtZQdkg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191120.tgz","fileCount":148,"unpackedSize":953632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1OgnCRA9TVsSAnZWagAASGgP/3NyroX14DQWLkCa6XA7\nnRbSVsVzOK0MrzfrRx/0NqE0DBXXvAHmcVqMrOmuXR4Tiq3x7M2C51QFlu9T\nloWNJdg+raMCir5ZcbNlHab/uKSTQgxGGw4hSri725vmks+dJQQHyuEfkIx7\naZhFlCxgtSw1VzUvwGvcN10zDNxQHjs+ldyKP/0jVQCkCYLZenq5anhGklGi\nDassgXxw2mWZXxK4QIB0yapgiShOAmodDfWt/ZSnk7QeyrpT5qnM+g/BHSJf\nUEIYyWmF/JZi8tyIXS+uW3tr1cNKI40nt9Eiq3qSdZlxNMr6bjkYcXtw4rho\nXpFmwFRlCJWss6fzkoUIQHdPE4IaYdfg8sUStnesseVK1GKfew0jTolHURWa\nxtM1BCmFHWGy49Lglpjc+QNAkQB3VcHqNY0xB9pF/DGr5yYfINbR7N+zpyAs\nQsCY+DBLgSIMjwqhRjr7vrZXLiFJdM9Tr4skm4rhzMgPpdCXQhWHGVJh6vDk\njp9FqHiMMS2TTrQSH5pJrlgIrkcNYcfX28i4AL+mL6EIuosVPyBr89L/wr/X\n/sCGkl4672adBPAOlkxHBQBvgvYrA7vEg508v3E6P+v9Be2S82EO9tHXSFSq\nhNwmZ7Hsnib4T3de7CrRAjODZBeRX0zMDrc5FnM2uzIe5lfWEREi3MXrP9mj\nzKve\r\n=MW5C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDcYhIvlZeWYx0P0vGLqWuajwOyqWAy8aSezfGs5nD/EAiEAvmlNmjs2zZAjmlEQtAM2znFQ8Rke7i5xQpEBQYs+vCo="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191120_1574234150471_0.5467248681629808"},"_hasShrinkwrap":false},"0.16.0-nightly.20191121":{"name":"brs","version":"0.16.0-nightly.20191121","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191121","dist":{"shasum":"b284a21093294ce095fcfb0eaf18dda5fe079814","integrity":"sha512-5buVfluiQMK7qkUuszYPsfBpmtrxZRQV+uf+PlJ1ULXQl7RYzPaDucebKMLKz0+XR3mZVW9hhXSKHcCJCiWBWA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191121.tgz","fileCount":148,"unpackedSize":953632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1jmwCRA9TVsSAnZWagAAJj8QAKTX/G2PtriwxioPk1ht\nNqKHSnxC4imm0U0SGMFE05v/RLrdW9z1wMYNYzfqJvt/bs2UqcA6xupnn0wP\nmcWwaDGgKboZ8G+f2Shiz9rppMobkPYlGcBGIIK0WiFdTel+o8r/BGmxeRix\npzt9uMoNiQw5cNxh1L7wOhgsN1ymxCAfPuCs1YcpQVRMhbevhOJimx9I24Zx\nVbRSsdNBEv2i5hJSWKfYEYQYR3SHOIeYhmDgnNYszR6wEa3iIaHNtGRD+Zti\nYPHOJrN4giLEHPFqhOm+94bdZr+hGjzftG3+gNvzGjP+ujLg1A1hB2Ptkg06\nKg75QHe5QCXOBf/SgwSohr5CyV/BVzYDcsvJEsNOtYIoGC9yIHJBE1egYUUa\ntyMFeIq1D/rZoezD8G5+3hu4QLheJsrofaGwyiaalaOzbxC6BPt6wO3cmyIy\nzMvWN/j2rsGEyTm5UaHVM42P/HtqZ8iEyxn8dJtF+QDKLhl6ClhA0X8nPIMs\nEK0//58U0TD6QB7UOagvGEuYMl3EX6vRmGC5lWHxkIv2BeUZf+0Uaj/nOp4Y\nXp5MrL0/4aSijXcXqLX+k1KEbCmftj+foUFmL1ChgiFKcuABYyJNS/pYe4XV\n+bclZvDIc0ID0yKNMawEFNfcLxpSJf68pZRf1ALUA52bvWXsgwmnRokceN2f\nKRKk\r\n=EiuJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD0eHBGlHn8nPnjSEDqTcu/S9kHidmczRz8YIrqfwlA4gIhANR4ZIL3M3h5IR7JzkzOXc+uUdimwC/drlG9JCkeo2oB"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191121_1574320559989_0.7626674710849435"},"_hasShrinkwrap":false},"0.16.0-nightly.20191123":{"name":"brs","version":"0.16.0-nightly.20191123","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191123","dist":{"shasum":"2281315246f76d4495213258043cbdf52b061b3b","integrity":"sha512-2dg8K/HF5gYLfhNhLwbgoGE3VupY0KKmpEck9xLZrLZrWvK/iexwh3E8JnEJXLyKR7Vy3Q+WSpkVbMMgjGhdlw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191123.tgz","fileCount":148,"unpackedSize":956477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd2NymCRA9TVsSAnZWagAAmUwP/1Qh4WGgu6axHYvhgknF\nVMvEZTYepbvidPNRp828ZbyWchBwK/SBHctMDCbjKlu2HDbyBnqxQRFpmB+p\nmV2ituEknU09m8oUzopDwOg36XX8r+kQ2NpWeq2LY8gAzwpGBwwQfzejMz4x\n+Zb95Yw5rwE04o9xV2XlUF2aXpjFIBLbTaClCW5tv8gSoZkkNhE3z5WaWtkq\nRrsJKiEJHBwrh3K7fdWgIzo9ccaKBA6IIfzMjUBbl8NunOT1U3NGWXSp+fC8\n1oG7Ww4gDEyUP8CEaLPj1O8Luz4cpn0ddasbCWnKAADm/GFI9SK3NxydBHz+\nFhQeu2RpAHUczEyll8DZKQG5h+ZhYDmn3hUp9NjVB8cjvFmHxZBNgNpV6fhY\np6NG6kObgtxQDvOpr/1pSxI3ew58ptxJwh5sxMahVdOx+YBI1qczk276eIHk\ngj7LRgqcrKwJG5NP9/ZZjMLtqbwahn6t1jpIxB80W/yJBwOwFi40yN+0Nq+o\ndhtHBqb7R/I5yZpGXyVBuFpwJIEM1D3fqoH+hH1lXN1JsaCjEmJVTeNmfXBD\nHvKs7KsmKrDBVfkOFFgEbu4MezLAOk31ZpVTX1EDUPQt6ivVu4OPU1JzqWDM\nqKG/HrOZzmelVKoRur5DQgxUoMIHG29DSTvYwyRCZUiKLtkv6aeRgw+39BSf\nsrc6\r\n=9fau\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICx+MqfV2eWIBuma6GIGqqjIAOgDZuWrDd42C5aKvdH6AiEA78HNzRu6yNoAQjgJ8TQZhiWOWdX05yPX9AeGpneSEbs="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191123_1574493349463_0.8575531199586841"},"_hasShrinkwrap":false},"0.16.0-nightly.20191124":{"name":"brs","version":"0.16.0-nightly.20191124","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191124","dist":{"shasum":"ad0eaca0390d2bf688e5639802bdfc4a826dab77","integrity":"sha512-mEcjYiRtgey3aReo5NLWwPuZVvB8fZCah1/ybEd4rSQz1rwhZK5Q/ce5zY0FyjNszUO2EFUnoW4SK4eVtZcwqA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191124.tgz","fileCount":148,"unpackedSize":956477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd2i4nCRA9TVsSAnZWagAA8tAQAJUUwIS8/YFLqifdGXxm\nUoZJJvZjObEBaTCRlVGzBt//NEReg1hOYQOZM6vHqx1Mng48bQMTrPdavm4O\nZYT1BGKSMV/Oe1gGMgLbFK4Oe2jbBo6GN8oT4dh4aciuCxbEvyndOWjtPWFI\nmBtCKy62vXWlaNGHY0AauBq+bEVIphUqm4agP1/O4sgx5USs2CgusetgaFBK\nQNeb3QlRITR/W04Fh9U09tgkvtFTWYJkqAtBjoLwfUa7MFyWahqoSIsNsXY/\noJMiECle9YpxP9q1rf276KxZAs5/TuqzdcZa3RUrkS+et/eL3n8rqgoJJaSa\nEjUdgKJFacEuHc9xgN7lmFBZiwJCAXu05KXZyc52vsaP2/OV8W6R5Th7jIub\n/+erulhp3NxXtxZt/G/0lzAmo3uuoTwu2VqcFi8VptHnOMtAVEqwvZ90Sa6E\nKi/mhTbFx+h3LXHkTRoNiq0TjTvxkW7g5UAP8wAvLonOdLJxqIrhxv5BxjCO\nVOL9L2+a4oowoE3utZWsLSBJAU1E/7pNtVOzORifaK95qj4ePcWFfytizJ89\nTPtgUGCEu6Dpu87krX17RuEb+dsKehszagfKCsNc2zgF6O87oXycyMjZwNcy\nREkOHdqJhc7oeSC7le4NqYnwPMxrnLxuw+iEnALGfEoMNs5Z1OVZpKnzdlZv\nncwr\r\n=QmWp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF7/K4zCKsnwtWt8LiBZ2Bhaer8NygDSmthi+4QaeLqkAiEAudKImXacrLhUbbrhT3jHQ9fKfUCByEslRKvMnliDXjg="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191124_1574579751351_0.9346983681972045"},"_hasShrinkwrap":false},"0.16.0-nightly.20191125":{"name":"brs","version":"0.16.0-nightly.20191125","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191125","dist":{"shasum":"cd4a576648b77187185605560aa843b8e1c6b391","integrity":"sha512-WGL25wedbPlAtHAeiJF30D7HsYE9hZpbYjmv+hjn3TVe+einywxsdcUl+ytimKvhN2UGU6zBYNPK9jmQCJ5r1Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191125.tgz","fileCount":148,"unpackedSize":956477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd23++CRA9TVsSAnZWagAAIDoP/irsYCU0dgXaBywd3A5c\nNZjuS2YPL6ibOHc2yuXy9lYXZfldD+mig1ElzkWUd8NT8b178gttvuFsalxk\nWJXFe1umsS7M/1yhzyQFTNp+x0WK39ZrP0Uj+P9RnrUDGgIILrf0vEbpOjRC\nZArH1bLxKxE+GhheClaxloaMMUuU9ZiRKvM755iPMUzkSBb5cErhWMUPh709\nTOt3LbD0mCHQbt605idpjkXPgh79Jbqjf/LICX4hqGvxflt27PfhyJCPkSSl\nwfzP/bv+4FvS7CBedgtTDudkK33vK6Fnf2BdgamNw/Jo7tsxoXhydix+rWby\nYKzcXfEvRUuqQZPSGTso8aqRCuiECkRodtlAOUmrn7rx6DYGWTzMMHTzhkCX\n9GfgQMdcmjiWNVCNg7ZjR3GRV6l7rDjo8vZnWH3kCTwIrsHa31ZQXRCpo2AN\nS6P6rwDpEqiFfOT1iFVT4y7bHRQ8XxlyMOQwv2uu3/uAotHvlVxD9arbytRO\nv9NJRr8UHm+7dmkNmbUwB9hTsjeCG3vNyDB78oJQgdjYevAzN+JWvYSe53Ab\ngEtAVABU9L4ujT/iTlnSZXQaJkd21Zx6uFm9nJOfvhmO7esMP2bU0WcJU4lz\nOw3XbveLr4FzhOl1t7D4LhSh5TeJdmO7FFO5GethVb1bM8dQ89hd7SDy0QCN\nXa0H\r\n=Uxz6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCItuxVBpO0/WuTRuAqEToIdoIschcIYbF6QBfqt/siXAIhALBzNxZlwp1olyxjxtvKhQbpMo76luG5KdkXl5RkS27j"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191125_1574666174075_0.4487623467036779"},"_hasShrinkwrap":false},"0.16.0-nightly.20191126":{"name":"brs","version":"0.16.0-nightly.20191126","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191126","dist":{"shasum":"9e877b2e67c400e460d191e17e8123ad3a20d915","integrity":"sha512-lqU9H9tO+PRT52epdT7/zwFPzJ8+GV5Wt9+drUNrUGcz95usGbS6fh7M4ePx80TU5BtEDKyIsy0rQ+enIa1mPw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191126.tgz","fileCount":148,"unpackedSize":956477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3NEzCRA9TVsSAnZWagAASmMP/0Vi0RgAb3NmUzYIXJAQ\ngGOtrxb4cxo3xN3aZq7pEnmqEYAjpsm2BaVyntFCgTlKcFlJDTHhwISoRPrH\nTLrZ792wrazyoCKtchQKCBxHwZ2k5QTuQNeKQ1E/736poq+eCWuK/LcxpLRA\nLYJ4Y5pL4NAUnUzKU+BAXSDkWsjFs1jktsh4LfL2Xj8bLKBRHQJfRdDEa1VL\nzn3HSLRLbKr2t2O8ul8D2SmgOe6v2jE0Uf7bAZ+MPggGIxlBP+loAo4+dht1\n80wRl4Wk/fY+L4bKaUT1cGDZsh05H+no4oIA+i2Nvrewyz1YK0E5Gk2pEptt\nja2NPEK1zkcy418oVBKHLYcyhQI9t5gKFznbXQ3b7JS120UpXtyMt6iikOI/\nOR37EMX+/XePuYGuQJiRkIXrPhqMPg2MNy4OjRYA/K9GIV95fRqv/HoepJ55\nZcTwHdbDUDequWgkqhQV9kG1pyb8mhGz5hUX+/cPzUgR1mLDCyVvWZZtTk5d\nboNBQ119F/B1KoPrtPdvFG+MQxXTSbMSeTKzMxHkf2KQEIeoAiea4nu+FyRI\n+quWBUx3VCovVgT9/nnVfNZ2+vyIxcSmNOTBGredZZQYJR0fCTd5c7diH2fY\nWShgDP1kWY6QmeGru81tt4kSDNNvfDu7eHVr4Z1q49LMh3YP+q6qYIIbuwfE\nXXnc\r\n=NMQN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9NtXTXTW9vTHpjEZsTGUqDZSjs6ChyL7BFcYnOF0ryQIgHGnNEw0Kuja6WzLjqfPryxTdTBZ3gDRPr6ce7JWoz34="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191126_1574752562993_0.8766538250537952"},"_hasShrinkwrap":false},"0.16.0-nightly.20191127":{"name":"brs","version":"0.16.0-nightly.20191127","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191127","dist":{"shasum":"6badd1ee1686e474bd4da552eb96fe2e65722f01","integrity":"sha512-cSUN4JtGLLjZEf9+xt9wJDIxYpxVjUXeRio1NzX+ee9egoioFFKmevuiEvVaXDAwWpryRRUfMoEbHi4iCvMICg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191127.tgz","fileCount":148,"unpackedSize":956477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3iKrCRA9TVsSAnZWagAAKxMP/1aAEhwgxrbjRI34GxB4\nwWINLILKzHhB450+4It/WYSItQ7wNsHWuH2ky1L+pP8yqzUzZg4T8y4+RwSf\nE6tO06FFqjxtvflUz47IF+n+TGVpkQkQeeiw4VRGH0tAi2I8inbXOb2IRMq5\nkAfGY5R3mSX52wNfOh1djmvrPf32Vbvg1vTWrYaV45BoLeausrhy3phsm51b\n58NYkySBGMFOxKxEqS+oN5l2cegiLgB4W8CVZED3iZMDRSj+xWwdUPROSS+z\nCDqDkXnhCQsG5B0hZtn8FNLchJZIbC48da1PvxIIqehDZzCo5+HP/VUD6arL\neHNasyPKtoYzXZK1mSomO9ZcThfup5mzHysHBDgXBvEgB7PhoAz3p0y/SJfP\nVqJn0RW/Nlp12HBU032Bv567jLbUtg1Ghf3TpWUcqA8jCkgm8qG9xYWy8jk8\nkaB375VG+r2EhBLIzjD4+Yuv5BJR/dUg1MxPMBr/hW+P/6v/J9XHgAfuceuf\nF5L4CPOiGnmYzvv0iV47VsDWEmSJg6uE9/kkxJUmJ5IIrqxnF0+iwGi5VmSw\nKhS8U3ISUl5cshsPEJ0NvnToVwjGniKQjb/sieyRjeGWI2jY6pQsNpsGs9pb\ncz6XMvtaO/mrPAm8hftP63rk9mJ1E5itrWOLrHOKp3oGtiMHS6z8+MBUqOgP\ndxxN\r\n=sUzS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHo1z4x7X7Ek1w9MR5yCQrTXHbrat/4o/9ysti3QIppGAiEAhrzTDRqQprcv+r3z1l3KBmPWdAUX8HV76l16TUNiNbg="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191127_1574838954949_0.46810224844213333"},"_hasShrinkwrap":false},"0.16.0-nightly.20191128":{"name":"brs","version":"0.16.0-nightly.20191128","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191128","dist":{"shasum":"5a167163efbab44b58261c26d5b59f3fba56f022","integrity":"sha512-k2pZHIvoX/RT0U++BMOi1l2ervDJV4HhiucQ+QXg3b4NPsnRwwrKliBc8RdevuS73de/1AYKB1fIKJij+NUGOA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191128.tgz","fileCount":148,"unpackedSize":956477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd33QyCRA9TVsSAnZWagAACHEP/1KaOLmJkRPVQSpu9N5i\nDawTwpM51DjtdDWCCzRTkJB3G3QzphWTA+aajRBxLIhZk9G1n77ZOLToDckq\n7qBcBsVCTeCdXKoPTkZr5lKe59/3p+U5OaVXiPxubGHGtud1ZpBPQ0oWsL1X\n1ucMdqQ7wC4gyl5ow5yOiJ9suJbe5IFVoDFsr4u7Qfz5XJmjsKEZqQ79ovvA\nvh9m8AO/DJj/lfVC8vPAhG1aV5O9Tir4OHWIxEsbf3ZVjEkBhyiDQYjxNrap\nf61GwLnvxlVbBSJnh8DwRHBz8pMpGVeo+gkMJEUp5uNX5CiSlHu//FV3nrax\nJgZRx5+Qetj3PqGnxFfHhCFz5HwkNlnxR5sHmc1b3HZaYEyxaR2J7kACv3wD\n1jh+j9uhsDmHUisuqAwlvcfSyp04wJbYmyTmZaPHhZBZyrwJ2+4qVy+H7Jk8\nHAXcsqyWJNIJr2460wfKKEtUpl26P9f5Wc9jvLS5xwsRsGEppz2KDDCPhDxv\nmTeJtjZZEBgXkG5/O/zJLFges9LijLKG+YwXNUkz102Av5/WxYD4QJO32tRX\nwam7gDJXd2gPAYgRvggp2GDRnWz1zMEDyOzn1HnR48ENW6tD9KZsOsQwo1IV\nfWn+kb6cj+Z+aF4Gua02dOg2brDCfuAtEruHVM3FYWKPDo2RK927eBtgSy/u\n51VH\r\n=1GVd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICqH6VWTrO/KVJKmheYP4UYOYpehDM0/rrRJlZx6vKG1AiABIOy1RROi+fz7wuf/fHw8cnUr9O3SgUpnE4fu/7ee9A=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191128_1574925362085_0.8485127321359385"},"_hasShrinkwrap":false},"0.16.0-nightly.20191129":{"name":"brs","version":"0.16.0-nightly.20191129","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191129","dist":{"shasum":"346a0f16a2a1927682dcb231f92852e1e0672250","integrity":"sha512-x7uvdUQUZvHpCOLBxpwdxvDE+vG41x2920JiY+n70qf6ScCHKtv0iND3EzNj4N+mXaXIKdehwqqZLzzjczwm7g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191129.tgz","fileCount":148,"unpackedSize":956477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4MW2CRA9TVsSAnZWagAAUBEP/3d+wIy/89W4j6hvdbwO\n9A8Sgyi5wD+zbYTMmMkMYPDfUBUW9p8m8LMhBjujRVuv3WP9SVME41TdC58S\nShET2V9QehpYWt5w8QYd666EJ78/xbnDaSiuWC3tzmXHm15O+QOkfgGHFl2q\nqL4glrwHS/M1bIYPP3FRfjwqHyKWerEYxe1U0Z5ciOk+Y6y9gjGruU1fhjgQ\ntCUhj/ex4MYfM+Af2MHN9E9tHqrzx/C7sgriP/q2ZBDSnS1LCKlf3UC25zmT\n6Y/iRPiKr/t1qtXUXvpqyojCyLwdrqknOE/KgWDIjXPLdAY0VovAYVoQSVQG\nt9l8Cx3q3aOyg808JGC97c4JP6LKlklckGRYTWopr2QQnfCKiJMfX2beCpNz\nYPpaI1Z1RNCQux4U2FnvzHurZ0JvbkDRnbYGfBl1wYfATUXkUAy+Hb23432T\ny99Q5C/Zqgdf9hUB3OKmV1w30HLbSyKfusb6mntaBr6phsb4VRDMVqkc434w\nyNSdHkPQbeFKTrBP1tyM4WJ3XIX4LhGyNqDnf0tzdd4+yq+FMI/Bp/hhLJ7t\nPijJwECQIx4W5z08gCq8VkKz4H2hkPGf66+tRJNXWcg/TrIYUSpt71eX//Ph\nx5uhniaw6HmXVUp++DNR/Y9jjHA1wedl/RECu8sjtwM+k2gdKiTzF2EciIga\nFnbG\r\n=+3pa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6ZJ8TJ9uFSHrOsdKeNkeTwJMa6BK/R2LVN5ossTRqhgIhAMs5sWp+3WcyCfb4lKhGst+vnlwNjkPS+W3QTBr0/B7D"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191129_1575011765639_0.45368825154040104"},"_hasShrinkwrap":false},"0.16.0-nightly.20191130":{"name":"brs","version":"0.16.0-nightly.20191130","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191130","dist":{"shasum":"f96c5b3c568a95eefbabc312711dd33c7d453ea3","integrity":"sha512-f2rfwHTPewzhVAoQcOfXIWUDxdf0e2MbF4o78VRJVZZiAsrDa5j/MEmJKuMJ7aj9F17T/zxkGn0F+/IUqqpZJg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191130.tgz","fileCount":148,"unpackedSize":956477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4hcUCRA9TVsSAnZWagAAEA8P/0Auv641GM3nYAeK6Zrp\nxdXd7XcaQMOeHGkvL6WzbJDH6BdWdBe/2PfqbKIvpHWD+kctX89xhq3tGi7S\n/S63lM+ag5++R+t2/bLQg0goZhPbyqn5nidhxeOZQ+6l/AzHR26J3OM/LFNd\ngP1l1GRezpWWBwEf/MRqVH455tksgYUU5N3Vki9gSxu8JpaGHF4uQx4tpSdx\nt0BqRVcwKgV5YlkOfdT1+ezI8N3UDU6MPsd0SgWvrjzReQ/j/EGKgdWvZuyl\nDxFgxL0z+XQ/XsgoSqVAFkL+h84QpcP3WCtrB7KXP58o+2SR/G9vfEBMWnRu\nCKLlj9dEFFZhLIxKnFyqJoCqPWZSeVqvuGfLykET4YN93PtjRtvZ/lvnWFog\nKFLWWZ0CW7ZKnOSKj6TNYfOEI+yz73DppENPPcw2PjmorIbBeMgeEnF2DvSC\nX+Zk+7+quQ1+/fSg3W6Q6okIG0b1UKqRin+l4vCDuHID/2V0k0koFPkUlfIX\niZwh5aZj/kl/surpTnRIakAIVAC8gP5Wv8V/Yzm6o0OAXmeXaFYzfwX8tohS\nkytmx07ELY+LPdA6WCIQm87GEirENNV4mYm8i1D0WN3ojPhwOTXvTFIZ4YW1\nlM4xtpv48F+yUGhcpPWkQG69k2sUEMAOBsxP6FMbZIThQoMVyHyvGOxBtMVZ\nvBA/\r\n=d2ym\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVQ63uUe/S706RlVNLuXhILg10+FtEbiVH7XaLBy9r9AIhAKHFYXkuPV1cOJvEZb0r8fI+DnOrlEn2EqU9/FnqN4UV"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191130_1575098131544_0.20946702336678813"},"_hasShrinkwrap":false},"0.16.0-nightly.20191201":{"name":"brs","version":"0.16.0-nightly.20191201","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191201","dist":{"shasum":"adc9ebf775307c6e44a3a17cc55dcff2d90b380a","integrity":"sha512-c4FnWEKeFa2v3I4r/vOg3qAIvsmHDAl16nf2sjjRqe4/Bf/DA7rAtkEGq8AZQXSqHNrT5N3Mksxvm25oWeB5hg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191201.tgz","fileCount":148,"unpackedSize":956477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd42ihCRA9TVsSAnZWagAAZU0P/1+M7pwqrIq4lQAlLX+8\nvsC6+qGaIN3zM8NdgFAAtbqWLpacAyb+ST6oj1JELSXP1PXfhlnx3+Wle7R4\ne51ywKyiDpPXvlqGi/uW+PAe72YTLGMC6elqtA1xA1IRVYMi69EU1jHws24y\nroa74uaqrCcQ00UxJWpPtw+ofFL8KxUxNzR6WubbgPg4PVy3m48JhmWl2czW\nLI/IXPD0QaeiLjoTcvlkvPbqQDiN7z6S8lydMHWCTzsvOH3yVb6kcPPy1BKJ\nbU1p/RwXugyoIYBczSzTZXMH5PUFUnOamXxW7CLbUQJSzgGjzXmxKa8UdZU3\nFhJPY+r4++El+Xjx9izkUTalqWH1xWmfaxqFUB1WBI2fGtTsCRhlzGbHQ25B\nemH8RNO1wlRqFNkUnh4kvpfjB2nZwSoCDcXUr9rEFQyup7wH85byUlis4YgZ\n0p6WfSk3yLIKVFjrfENagqNvK9KRW4A1WSPtEpMu1W0W/eRN4LtX9pB/ydkm\nc/Jl2My8C7oJ/d5BVWDcv7Uwc+LIg0LkJ2UiXr0F82ttvwjVoePyFT9A/2tA\n1k4Q0LgB9o2PSiY1pwaNTZzSKD17JPApcv3l8CfMo8rz3QmerhKwhq84pfft\n6tqUU961k6FX++F2snNplg9JKEzvgDjiaghf4GVvQuRLt0WFJI+nHghjHhvf\nYmj0\r\n=oxcp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHG4H8q+DrPX7D9D0v92ei1JilXwB9LKC2H7Gc47KY5gAiEAgsZe4rG9X2814CoT9tt+FxydNPShB62QNdOikqH/QH0="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191201_1575184544505_0.5368618537792587"},"_hasShrinkwrap":false},"0.16.0-nightly.20191202":{"name":"brs","version":"0.16.0-nightly.20191202","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191202","dist":{"shasum":"0e64affa69d1547fff6cced8a6675bddd455910d","integrity":"sha512-2KD0qeshLCCDmq820ii+bCxSEtniuhoHRx/E80E9gKcLAezAF83hoQ9MKYbdPU/G6xyOCEFu+i+IElJ/ufCA3Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191202.tgz","fileCount":148,"unpackedSize":956477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd5LotCRA9TVsSAnZWagAAtEYP/RfjkT9yInygEw9Q3+ZJ\nJxn401PcTqtONe9DfTArbw02Kx/D78N/ZuFUaCcUb1WV7SWFUP5BVsUuRRpt\nj2zAfArgtNiegVwg7yro7ui1ArevaA6C6LuBVD+nVd5dss4oBNYRsaNk+Rsj\nu1+z8xr3KYp/qMgjI9Or1NmsSKxrjW0Hy73qGpC7/TJoo2MQT3JOf3YrnBsQ\narlq2Hlpkxzszp8H2nFHMn3X7zMMwImSetp2Ry3Np5DEIiBhaVEoC3WVGm3k\nxNFsgszfR1Pe1huKphDzMKUGKMfREmLlCfN4gOuoua3XuKhd1f0E20cRUZku\nA2T+ytK0ZzATqs96yN4nSuAbIPntrBVGmaoHsg/F1xTr0w38FGJyqHKQXqCq\nmi83nSE56WdCpW2iY6NwVSuI+UPag97nZke/X3Cj3kIafNG1zFkqs8yO+NIj\nPFBUmppIgVctofBNdsALbWR7PdgJrh5WXL2CrUv9c2NabeN6n7Cz+foh+nuv\n31M0XLZyBOD9lHcNLnuAdXKZkAmhyqQSyldIXMD5m+qOlXb6GbkDntCQkEap\n6aK1h4iyjij/mdUVdx5zLYOkzojcVWksLxjS/WGz+wExL7JcfLpEV/utJ/PY\nvl4c72czZZJYyUUSpJoZDzIZL1jd/t1M7quZ8CZ5TdeCpRpigqe+4Nmf8Ssz\nO7jK\r\n=FItU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3h5oc0OPgLDx8afru1DaA06S9/NZfh1wza4zOCVyVkwIgFzHiWsQpSjOAMPkF+ikp0Ezyw2E2iqc2AdNFxWfa1lg="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191202_1575270957350_0.47816733468329353"},"_hasShrinkwrap":false},"0.16.0-nightly.20191203":{"name":"brs","version":"0.16.0-nightly.20191203","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191203","dist":{"shasum":"187d9a240253dea5e22caf568f60909d17cd13da","integrity":"sha512-nIZHNPD8znarUr1LtvQM+EhSe2P6V/z7OuX2lVnY/msF4M1hkpZ+T4WU9UJGnyh0JFSkB1nUy0wNvvJ2p4wjDw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191203.tgz","fileCount":148,"unpackedSize":956477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd5gusCRA9TVsSAnZWagAAu2cQAJQjcvhCtpI1D0J5z0tU\nO3H08MO37yjIwg2UECrclPvJ1MvBjscFzBWuByGw3Ch+FS4wJ1dgb6a/HxjI\n2eizir5OkJWeumqF6HqP5DMisHG4zMDIoOMDP5IlHsc3QQaH3gwmz+n1mc6A\nNqtWxeeMITDhuraAEdn5G4Mly8l4SgU9ukpz245ISowVFCkFFkAjwecqZYpm\nCNtcEb+xGPNC2tQCLrrApVqdytq9uce3H7htzsK+XRwIMYjcxNAqmcLDAxrv\nnr9eYK2kSmfrM/RZei6rEDmWik+opu4I4scJy72LHATrG52r66noD9hamz8r\nPXJ7lKGMMPjz6OvnyQndueOz6T2PMHCSe9fPAkPzgqJeQOYmAgb8i88v+n9z\nsbOxQc6pAyVVuW1sOUGoUDxScqpHGlb54ZGuA9Ce/Ixjh3+kF9/sh4L7lToY\nasJx3hGj97ZBrEv0UTzGrIYjgYPUvvxUiyplFjbT7VJRFZbsQjMgvq1mCXKw\nRjas4p7v6dVZ4r8ODOV1XqP7fY61hkvGWyNrgP4yEbgdZ9dd2BfgUzoyQEKP\nO9gf5eD9mcTPkBGcNOiq1PFf4oM5M5R30Ujp67slHco7UggGnX9TW04hpc8o\nupZ3LDptQt3ayt7NsOzx/cReUhkMMwtHi/NC0eA26fW2OxR++Wk1b9rW8CbJ\nP9kD\r\n=7qge\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClj9neY2AjIt7dnX0UtO2oGx1t+2ZTfew5UoXoddY+aQIgTLvhjtI6oa78p6nIwTAmKENj26GnX0d4TVMEVf7sGi8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191203_1575357355895_0.29061836858221435"},"_hasShrinkwrap":false},"0.16.0-nightly.20191204":{"name":"brs","version":"0.16.0-nightly.20191204","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191204","dist":{"shasum":"e7960f08314629b499ec5b5ecda18b517d8ecaa7","integrity":"sha512-FawXPTib36UYlGh3yV1cqYmhVkHdErdb9w+QVwY+pDzQAFVpuUA+PlngadjunzNy9NJz+XVZb1UAx6Nz3wx0FA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191204.tgz","fileCount":148,"unpackedSize":957026,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd510QCRA9TVsSAnZWagAAe0QQAJCq0nGLlSCtURnkPj8E\nYox1vNJYdoHFaIC/AxLdQSERuWVmOmZWixnbRs9WXpdsxTzSM9/cnCiKPnug\noXbjVyE1yo7qjWKpIkmjD+QtuCuLnlElMVr+AQ3dyJw9c9JISpiNRAYS404F\nvje+qr8zIwgSHmvJhwtt00vzgXumlDFID/l2Gsk6DRn4RSj98oLMktUi8r4M\nPRSJvzOSP9D9FaDhq10xxN6sjBYe/qkZUAhwMvBh/P0ji8Sgb7mIxdjfIVPV\nuqo+qN0ox8Y5cg9AaWXCRJ41WZse6B4QOnjaMBHbfSg+2LSCyrcWtGU4J0vK\nYB8ucFSQBvkvHav/rSkXTIpL+yjGwvKhzwZZ2H7m+JFHerU8O+QJtmY1D4Y7\nKoyECtPmuXm+IVwU+MGksjZzDWZUl+dRRd/38pvV/Ifz7c8nieMv1sn+fWRl\n16wjcgmyM5Lrs3HYm0U0lpLiKe6lOml1bhbYcFNBLa1apj60Gj3WUuu5OlQD\nHaurZ+fNuDnagrJUd1L5KG4/WCvewCgFPBdmNxLuVYmpeKHAVtucjxlDr3kZ\nMMOoRdLq6Azu1K1tJjMzp0UuMeonUWrO8aHwdbQhWwgpYe0eaI6RHot35Ldd\nHI2e8lu1t9EHsYpS9KhqZjH99U7xkqtl+c6FIvmlaLIujUpnxb89Jj7FvjhD\n9Tsy\r\n=Ozhb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDF6BtmlZjeJB6eeoxsWhg+GDv4rvl6Nu7g6Eu2mW+XnAiBkqEP3scrirGPHyRUYi0VVA4uhjgiWmODa+pWj2yhviQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191204_1575443728355_0.39184487262695655"},"_hasShrinkwrap":false},"0.16.0-nightly.20191205":{"name":"brs","version":"0.16.0-nightly.20191205","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191205","dist":{"shasum":"526699e86d0f2a4c503621b5de3af59c3f199005","integrity":"sha512-2eQuy0egi9okMIa26tm0ETLTKDE7jnRAsMWpzu8ZrD5bCwbqO2IeDyAC0/VLY6wALrvvBC8Zlz3WAKjae++zrg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191205.tgz","fileCount":148,"unpackedSize":957026,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6K6lCRA9TVsSAnZWagAAWiUP/A4bS1HOO2b53E+za+QI\naOIFeD3U5BOaZIO+FPv2VtNMyLt8z+Xe7yyi53ezZKexTzSYla9YGLSyOgiH\nZ85ImdVdWGH+EBaoRc9NLku7KeNeRyZn2GJNHhuxRaxBCxarqLFRxvtJ9pAX\nuBmNEDiFQE3y7Up4uaKHRWlXM06zzTT9e6y0sxfeUEofT1gg2pTCLT59disu\nf72SlgwsGa/0r11YplnLoqrE508TuoMymcHPw0oyPhKWvGrue8I75LFLxQIr\nWHGitn0w6iSlBGKk6tw3BdohXIUfRdzxCRjWXZz2nU1b12euhjORke0/uFKK\nrnZlgB9NoG4ge+Uk7q7Ix6De102IkbMbce31Dmz6SfzAIJCjOD6CFXI4iawa\ndemTbpf0YJVYzF6/b4H4jCpzVyVklJteRr9AZTsKtlU/0QZd5sHcfGMInZ9B\nL7ul/vrUwTa/659NDUgRkiTLYv7R4nmT/+i0Cs0xj4/pmxO/mYcYJWbStgX1\n8DOLjYYwH/a56KK46i0bQ6ImXLjuToq4A/40B/WYVbAUGbzsgp4xNBvGFdn1\ntg2Xor5MEDzQFxUYikjKTIiEeKIkQHbmLJv7+tdh7zRli3x4oSnTSdI36LRr\nmyQY/Z7kQjOfUCo7Slnq+hgnQ1/ZarlSSxDjyC1mx8xPiPG/pBuYqCWwfhns\nnzib\r\n=g0Qo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCrpZgOOACUKixoNqRI/QL0Hfo0XD1Hq6xoAVoQ19n89wIgCFvD23SUdBPRcckrCs4NSkI5CWffHpGP0DGgI4C9PkY="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191205_1575530148770_0.6947056690588336"},"_hasShrinkwrap":false},"0.16.0-nightly.20191206":{"name":"brs","version":"0.16.0-nightly.20191206","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191206","dist":{"shasum":"b098a15a1cd6c0f5e364930ba02fdf025fcd6928","integrity":"sha512-7BSP8KtQKqznFAPGSqeGaPIOlYeKb3Ja77KCXlGJOG6P74LGChkG3tyZc22e/IdJSwc29LgcP9vj5pHFeonH0w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191206.tgz","fileCount":150,"unpackedSize":969396,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6gA1CRA9TVsSAnZWagAAISkP/3PLRqCtAnpGSR5F6WRh\nQGYCpUlW+evYRJQ3QsUsONObnJdSeFbOAGKhO5AT73mFa1DTQlHgX1GmcqpH\nYEUk7G492+6qFfVh6i5Rp0ucIaKDhtJE4J/p8BsHSryokYB0xmLEFbQMs1ue\nMpwRDY6oXtmswrxKSoGMxSUuCbPYfHeGV5yJKMhLzH0V2uERolSF/aggWYMf\n6jN0MsVGvo3sMpmg9nFQmZ48wr2IJPTyhKEdWwIjmQGSOLFUdxGiW6YFgzea\nEPrd1jlVl2akJ+G0n7eC6OH47toLnSmrsXjPT1GFlGla0NpvnGOarYWm1rDt\nzN//VxIqo1sd0oqverWnzeoJ0pzxdwom278BnkgOovx/0X1phR+KgwndbRZl\nu/ZwBpdC5uyshKI5K6SXfWHwtslnqMROfGjEJy4tiVRsQ9Nb40ydhMJvJQmB\nXC9GUzW01wbvXXwtg25OIUCxfEV0/MjV8kQrm3qpY4MtfCXmGZ92bu0/lPPe\nuqt2EZvs7MclwUo5hHhF9WFf5P/xd99mtuCbWTHYGr+AAbAi0w60vKJGBhUi\nmFRflb28wqlhoTUft2jgbep2lASuKpxXBgT1Oouo2FYSRc/L9n1RzZvA3l8Y\n+TrouuY4C5Mb/J943dhhwY3DeyW1UhwkbLma0hFSjZkT4BMaRss/4uJ4rC5X\nmI05\r\n=/W7Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBFCK3ABQqmueNnAAMd/QkUKBI0NGcPI8QglYcBW42MkAiAWtP1K0TqlCSwdFoWvuTQMdY65llmxv4RLo6M5Sttwdw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191206_1575616564475_0.07323160627913383"},"_hasShrinkwrap":false},"0.16.0-nightly.20191207":{"name":"brs","version":"0.16.0-nightly.20191207","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191207","dist":{"shasum":"39a187d73291c5ffca251949ec6c3710111b92ff","integrity":"sha512-rtiHYDaUYj90eCNzIZn8KpwnBL5i3Xh7flSIo4Z4XAFzMFybRYFSxwinSL8mTK4mNv14kSTBXsKf/vVZDn11MQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191207.tgz","fileCount":150,"unpackedSize":969522,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd61GPCRA9TVsSAnZWagAAQZQP+wXy/Ab6THGAzntpnJYI\njBdtTfAPD8MXMVvzg1OZDyr0DF9ZUj4eX8m1zsPyDrgknEpy9H8BAQarnGct\nscUG/euEbYVMCWtTGriwOFFCiAGEhzRUckX/bechVEvl1E53RCmXNqEcbPaj\n6ef5ahBLOLM7pYJkDdvrHOhDohGSJygsAo0pdD/3+QGG7olnqNx0YPCLYOa5\nQn3ur9sasjM+Lfw3HW/aZr90Ei1wnqCa2S3oQ6aBMi5c6pXod5GNwfrPla0f\nrKVotcofsBnTQBXpR8sOObLXqMtB5bFrMCbxAn+ZNBQShoAI1gqdElSGcHz2\nYZWZZtUh+ytBw/TK9NKgrHRHVEsRdu/Z/0R7FTL4VNigebDVEqQ6Y1jrl58R\newpf11B6sWXnipVJyql/XWrmerC1gPaZDlCKiyQuuXtePIZoLVDIjc7PPMRJ\nGRGIXqLZpeo8GQiVphnS3YhLdkyfpbt2EVe+lX5BkNM/UlL1Mh2Nd7AAy7Cc\nV8f9mi0b6qh+J2u3d1dyK529d8v8HG9z2Zmd0M6+8OIZVL2slk+ix+F2TZKF\nJNqRP4Dln5H9DS6GqrOoxK6oxHFvByuiOHqNK31IeuYTlgctb9SD7Fw/ErUd\n7A9gPnTRB6YXW3t3WrSvdKQUVuogYq1aM0xTp0Oj8ZvEszMgHvlJfD3fZZC3\nMcx8\r\n=UmXk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG2BpB04quvMvAXvn3WjjHmtTQdcTlph0/wxETwRTXB+AiAiF+DHWPlID2H4tVxzPxucPxQV/OxkZU2K2mTRVS/0Cw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191207_1575702927206_0.2710893564884671"},"_hasShrinkwrap":false},"0.16.0-nightly.20191208":{"name":"brs","version":"0.16.0-nightly.20191208","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191208","dist":{"shasum":"fc10e2f0e1212a8ff8fb90de4833fd38e3b215d5","integrity":"sha512-qeZ5KzOL30JTiECE/6LI18pyFqUeE/63zOq2zcX+ckR0bnZ063OWxz2LywCIHkstaGReN3Cu8a33/xiTrW6ySA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191208.tgz","fileCount":150,"unpackedSize":969522,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7KMKCRA9TVsSAnZWagAAQA4P/2PiDszSnCLWbeRyBKXH\nWZ7cj6+EkkZnywd4px78vToscxn+h72MnPr8/UBWXp1iNF+oncfADfm41QXa\nDSaotDl88PoGr+yjSOfLK+dqTYKv7ojSp0mkeyPXHWVE8dcR+NiZoZWcesDN\nx0CEFAwtGF0FDKgbG2x1NhycX6OpKcf/C/V1r/zEv2AhPES7TKp078P4KZSy\nQe/tk8pvyXm41lqN0/wZ7rn4iKu4lZ8stV74MLMff91r8eU5lOkDEHp4/R3Z\nzjWlgIUNWxpIkm5d6xythp04fjM4ca4d8tJfF9yudMpyG2UUSI2pwp4YJwlf\nqdOzvez/8RqbIBG+wzY4Sy0tGuzdVxM9YkNl3FA/Dl4ZeTJUbaCVU9nNZHHI\n3BtYqMTJ7512MwJ8hUc1m8Rckq0hMN8aHBYkcbr8s02MZ/tlyXytAyxU4zL2\n4SNwMnEl/VTL1ug5oziC7JiiW2M7tBOfBvt0SuU2vCvXwImdbI2tMiXgWqtX\nz83y2M/VJduc9cv0pI+SawplXYOZQ7faJRxZUHMhV0hf5XJEh0u7uIDaQynn\nAeAFB3x593hK8VSaOpPnKy1NrU88S7WACMlxSzy1NnuD/xRJ5HdCp9xJLqre\n0Us+C6WIz/sOPgFbqh4ZSEeQgXW3vRAnvk9epJQZCu+DBQLcoYIats7Yb6Ty\nEEss\r\n=bAX/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGmGb00km63RbhdKQS308Ws2KH8ay/xmoadmtEnM/sbtAiBLIowS2YMBAMpdrE/1wxW5lBOe0ndX0fTaLtrSaxV3Wg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191208_1575789321942_0.7648695741221596"},"_hasShrinkwrap":false},"0.16.0-nightly.20191210":{"name":"brs","version":"0.16.0-nightly.20191210","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191210","dist":{"shasum":"b67191013c8658b8b7b3a9c55f420936ea7c4d4e","integrity":"sha512-886c73SsuDeZYnTDOwTujTAa4yEnXFFW4Ry4K4uMUpDs7qwbOgsLvfjiT6pjdUtcCclk4oYKFNLKnre510YTIQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191210.tgz","fileCount":150,"unpackedSize":969522,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd70ZHCRA9TVsSAnZWagAAIlsQAIruq7+KyqbkN6mrN3cg\n6wWqsxBRXiOt/OSVV6JrCJQDkuk3a2jNi06QK4ySsf75/mxM3O/z56w0xs4b\nFkNHQKqTKBaGMKDwD1E8GULzRid7ZVg75BCojTEaEOBX4fl/lOhs54GqKmzz\n5eyX5V4tNHuopQ4nJvcNIrLrEnPy8lfn0GHGWoybZprT5eqycUJ90CbNlsVV\npLaYXoirlH1OAayBvT8ZQRgkZ0q5CFlEsc1aZcVdRqUIPXycSwBOOOUs8R6X\n4wRmi6O6mnthymb4GpXKNuWIzyJ/uh2vu9cM4QciQv6qnRvm9yvcbNkJhJ9s\no0gBoU8rPWSiSgU/9icf90N5+SFNa9vEJtf5IophvII57FoQ0zSz0YiSx4TD\ndfA7c79InF1vrFANpRLX2W9zDG67Sg7Ep1GjbmYknr7GsLCIjcOg12io5S0o\nMoOMjMpcjdfeMsdKQVjA5r0GVZEnLulFJLYEw3ntuhTouOPkrazQ6WdXhd07\nlTZC9MXBMNheCIm8bz95SxiJt0A3WIi5xqWSuTA3UXUD4aDTv4NKwWT3nb0o\n36M/aOmjzJMidHAPX9Qa2WlEu43+cPeiYRZiZIosx8V5QEKqRWE3A/L02zPv\nPRGafF36MBjec4f1IFqQtIl+G5CI33Rwix4riKvpJMW6pYqjPPLN/8dHg0j0\n8jmX\r\n=oamR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxb1aiHZBXBl70AU74d6XN4w8fK+OaClwIXKrBF6AwZAIgG1+aJLoveeZxrcw8TrzX01ToDoprF/vOEgdjbeUTbVQ="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191210_1575962182980_0.4155909878684332"},"_hasShrinkwrap":false},"0.16.0-nightly.20191211":{"name":"brs","version":"0.16.0-nightly.20191211","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191211","dist":{"shasum":"ff13455a48d0949840a634aec121185a274e3ffa","integrity":"sha512-rC/PZkRNrWnqdCXFq4OcmS1QxkvJY7GP7PEEzvv2s/3+tibz/ajuAG4qvu7E9lYRd4kJnXXy+S/6TTLsHq7Q8g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191211.tgz","fileCount":150,"unpackedSize":969522,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8Je/CRA9TVsSAnZWagAAEiIP/3tDQKXCOHAmU32t+vQ5\nXvcudlT+gZ9e29vbuw2x+iB6M2Kj2LdcLCSvEcq9ex1TQeQBCQAsvXWeAMCF\nCkaaRg3QN5+ebR7byKofSL3Gce9QOyyFax/eLR1V2a2OfTBhBHRt47/wcpiL\n8bTgXv8hqFR4KRrsQgiuR/WSc2E0skehlYd9gDDrwFUYY1lZuHUYb4aU9Cvb\n48ItGz+27rXOaK6l3AJ+x/LUnwyU7GkmU3InX0CpCFsLVuiH+sUWnkqfRKmZ\nFwEHz+sa9JdPusJzJixAb/Cm1NkEeq/pxcuVspF2MIBekRQXKxhpv9+K6v8h\nJmuDaGEiDgE3tK/1f7DbLPV5F7W361L54BLE35bkJwb8pd8mkgQyka0tsiqt\nyaHqcil7PT3nwlAoHmov0NRauQJIW3X0DFbfiUVjC3LCRNIbSTqIzg5aDUJv\n78CvE4gZcqxKqWY99TcAkuzkDTT/aAyoA3l5H/c5qN40chafoDvfSnrNiQz3\nQcYAVjJR5rCCOLBdK88P8xuJHl2OE6Oc0KO35ozpKisieSbgUp63vinRegPl\nm4rNhXQrB+FkPlsgxZTlOgddCDe5f6Jd4Jj58YDh7DEU3ClVPYr8FAuFrGxv\n9DKdl0omACIhhMY4732ND3l9ZQFBIlNk5bNA2AyF5xNyq728Ba29LFjpXCv8\nWztF\r\n=raui\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBexgeC+uQrsrsq0bEaMK/tjRDAPrdVfd6GhpXJEe4QGAiEA9/b/Rpg2+dPib38HnCsiCHDHvC3jiNGmNK73R7tN2D4="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191211_1576048575102_0.755210706006664"},"_hasShrinkwrap":false},"0.16.0-nightly.20191212":{"name":"brs","version":"0.16.0-nightly.20191212","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191212","dist":{"shasum":"f99771f78ea2e487a34604e3fa6b9ffcb4c71c3b","integrity":"sha512-KH633ifcwA841VzyC1q53BIWbpa02PauP0NrExz64hb5mT4xsRdtjWl0keFwKpZWtB9933apxxH5gXVVUUhwjg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191212.tgz","fileCount":150,"unpackedSize":969522,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8ekuCRA9TVsSAnZWagAAHE0P/j+1v5OSdFG56eqUe/YK\n5iQ3/L0WG89OR8QY8GegMWIW5DNiX2Kwc8kwhv7iWlTFvbbxDf4FHsYTpcSd\nKz840IcxFtmr9jzW73s3QGzglzEd59yAePSdLookvfy/KDRmfhrLUHEiqgXl\nmzU8DyMbMTnYCoGfpJzxaAnrJ3dEc9BcKktMkvMqaCFtI2dgcrRsiiDI9LCt\n6OiGyZ0dsi0K5aXatzSSHgc6yriF4kkN+6QhoVPQenqyXyGr6v4mFJpQhh2+\nVnE2qp0/S9n1k7D49oDnbATsV3ibD87MMuFD2N1VRVVCHG9+/tIVfAcFVWfa\nEKLEUn5UQSKsqeiWWXCaU4k1eSIJPxq1pclx9YsZDKX7RlilgHYBUPamWTzj\nGd8CmLqNgNhuRdbx9ifZD0fbuf1OHkiPJl0RTOKttK4rO37NvxAKiV4EMICl\n3V6uNjvEGKSWZOMT3+H6+ywkPahjtIpczbq9gmnGhx3SPgtM5uaCOapL6oww\neCbobdEG+hPOGegi0yn72FYtXhjQ232/gcmDKoCM6OcmkjrXMzl9E6AFJx8M\nMlOgdH6dW2ZRZx/eA0kkNUrb3VSthazLDSTk+EGWk4GRGkO8bXGdWCu31qzT\nekuCiWM6MD3akeNk9iIDZZlQwBBGMX0ufn50Kdc2uftrMg9ogeta2w1BKqH1\nCle9\r\n=cJq2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICrDO7zniXmAZO8Luziefv4q/Z5VMxQE6fo1T2uWnQExAiBfgvIrqZrbvY53b7Qv31cFElCn8YUU+W6i3o6XXNM8rg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191212_1576134957864_0.9192111729922341"},"_hasShrinkwrap":false},"0.16.0-nightly.20191213":{"name":"brs","version":"0.16.0-nightly.20191213","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191213","dist":{"shasum":"e851287265979e099391461e6edecd1a19a293c5","integrity":"sha512-ALvis5vtPtFgey2KvXKI+CE2xvUqwmApZR3gkbkmHrxNQhH+ORC0+jVxSV6iG9JDWc08FJJfIaGCjABKJ1Q88Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191213.tgz","fileCount":150,"unpackedSize":969522,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8zqsCRA9TVsSAnZWagAAnRcP/RuMuv48880mzP0ZqB/s\niQSRHlrdVw7RazZPOzykWDLm0Mw2K5uDFVCaZYghr2Uz6B5vFQOQCxEkB85G\nNYb0O820ZY6x5TprER2lFhJA162Cf2jwbGjJcH6v6BaCgxcyk3NTQcKDVKf9\n38+w0fegX6xSjJNb6Rh3UIBjdDX1NqNLpFLzdWJJ5iWFskW/9mdMDvb6uSQc\nEwxPo0L5CPuRGd3EmUWHu8CMEtMyD0iJnAZ4T8QoJkmyh8fmP0AlYI1kSNmU\nyWpjQm2maJ9vpTyqHk7v4QsPDJns1tTBPJQiAY+LhpxzWHRdJiwRCZ8+K0kJ\n30QRhGFn3COT1X0AlBwggdRoU51cTOVI2Gu1bWi7b8w8/fjTd4DFADVKHVKZ\nCbAFBVW4BjAjTVhvrF/+RsoZ5y3GmFMqZs0bVnimveKkMi84Ov69C5Gtc2PB\nHg5DtBm5XQtaEPi7X7er0Ymrqj+VPprU4sc7PWrvpax45mKal3S3ZzwwVwFn\niNAgD3epwbvZKYojf/tkmEsnoC+03gfMuTs3ztfwZc/44IWQS8h9aOADwSGg\nFF94Cv3jaittbjgegKl/oeA4g/o6I8MOOuWXb0o//A6YTZDLIcdMQCUIA4bR\nUw55F81Y+mPPt9oz9/go00baGrNd9JNadBeEKxFIAo/2J3SV8pGYxw0hOxBr\nB22d\r\n=i0YI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAzGSDqNut+W8OwQQVXn43q+7MYrOQ7lej+9wQpGoRc/AiEAoDsbDy7LuBSh2sFECeqyu7BOpbFDJmhEJCQsn5vOP6g="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191213_1576221356043_0.3582561977681318"},"_hasShrinkwrap":false},"0.16.0-nightly.20191214":{"name":"brs","version":"0.16.0-nightly.20191214","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191214","dist":{"shasum":"fbdafd0655427014b5a9bb18f3a31c55ad24272f","integrity":"sha512-/Uk0OrLTd+HLlpNKVyqRWy4/FaiMHz8ddwoMHaqR81K8RQkDd44uo9YVO6C80sOiW+jHm95jqTZr7aFnJY27hg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191214.tgz","fileCount":150,"unpackedSize":969522,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd9IwXCRA9TVsSAnZWagAAYn8P/0jklnuCo3MKLxfCVJM9\nZi7PvqGSrzaab5Idq4nqGoceVkZptfmdlwKO96urVpHj+n8AcPVOF8UIUhqi\n85cPnLxrNYLxlyBIAGjUBi5Ea1DbAr6AUXd9VXTGn2vXFtut7yxeGIBSyltU\nU3zWRXHJ/D1raCZ9PJHohDmmje3t2s5ToGaN2NNmC+E6MYkfvvae4a86qHN2\nLSri2bwxYNMZRAGZke5hkGkvOw+1ePy1vSPeWfeO4fV47VCEPe3V1fzBT2zY\nPR7yDz+3zZdFOdC9R7btmW9ghbauh8M23crEdKsw4LB4IxdMtXu/uy5ca9TS\nojv8R5Jaa7U46IaAUss2/gxYpoxB1rjNPbehNlGSKwQbyBDqupT/2QJ33pt+\nnm6I1Yp3hsl7t7nTLpXG00cLBUor3PBl3i77vTCKLsPi/2mbWy22AEeIKsrr\nfmvgTjjGkmUMnCGFPYxYexEbd/5hgwUaXLnzryAhuD6ikiKAdMqnSOH3r9H4\nR8X5KnCXgZYmDfbH1EnC7kxJyUf4m/MNjK4OQWGzqSgYRITMqbZsUFbQ9TTf\nG8gii1zu7Krpn5w2FVfNIJ6MjoalaOIDiVe4dVYCKz9CeNasGp5XgorDYmIp\nvP4yec/gQpJT7xvQ9zJtWT4+8zD96o2rY+mmBvAntPp1F4eG4cgk1xMd0clk\n/BjJ\r\n=WCuR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCw7aLp3JjzFH9P9Uchj+mHtoKEcLikPCLHL80JiTRcPQIgHWj4Gq5foYOjYJVlEpLxDfGYTYNMwyJHf/f2aaKtwSM="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191214_1576307735323_0.9511611064119296"},"_hasShrinkwrap":false},"0.16.0-nightly.20191216":{"name":"brs","version":"0.16.0-nightly.20191216","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191216","dist":{"shasum":"77af0625cbceba88fba07566985231ceaea928b8","integrity":"sha512-oIZ64eYURZw3mrRjibhmV/qpv4zLUfZWn1fbyoO3cFRArOH6GRdt9vuZS9B5O9Dq4ft2n6Of2LqlN4rXY8ZnaQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191216.tgz","fileCount":150,"unpackedSize":969522,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd9y8jCRA9TVsSAnZWagAAqqkP/1eAQnDnqb0ytF1vcBMm\nVwK+lIuluEgm4UZHOQVFbj+aYYXfJgroa3m1taAGmesY8Y7SEw9a1RGJuwi8\n/JG1YpvUA7jCcUDnOPtcEP7wdabDUmj4oLTlC67lRgc1js2QcMCP7jwzqHtE\nlH7OATX8nEI2TFOAJFhN5kIoLXNyycijCm5eAgG2v9napkI5hDTXDfbnITbd\nMIJbbGYsgidUFOfbKKZFR6+67Gw9dywwLBhSzPNHzwtTZEC7aZE0WRf9Rh2/\ncHhqLDBETrY/JrltdwXpOTn0TrUGkqOcl6j8p4r2EqEeflZoeZq5yN3LakVv\nFCz9jaSE9oov6JMC5O8M2OdmLyPzgZwpIWJuYFugD6Sohf/FdjNIeY7Ktt5o\n5H5Myeeu23FahH59qqBPJbH18ZWnvO/1OjWsb/LPJhc5WHKSGheiKpRLegus\ntyzULO6hun9cOneW80D9PhWw2Ib3b9HXU+4C+IW2HdYjRMsyhdDEp2r/Ecx6\nNuSXsvY99GALN8/p/Hi7fzahWAa42u8RE8DWGYPxh8InLQ8UYllYP4wHdzgA\nK5iH7/auEOiJyt7dsOrMFh3t3RDrz0jeKX84YwwKaxW04w2PqT84ZfIEltvm\nG2syLQ3ZNpIeoPdMWtLewJUI6+vEyByEhKJlBlkb3Ku0h38LGMMwaxzJpfOX\ni3Mm\r\n=SFW2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFQLCH5+Ad49X64pb54jLpgLBFdsh4HzcR7m0VvjdnSrAiEA+/3ocn7D1v6amA3wBQS+/a1bFb2coY6cj0mQjAqXijo="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191216_1576480546996_0.8299862622029006"},"_hasShrinkwrap":false},"0.16.0-nightly.20191217":{"name":"brs","version":"0.16.0-nightly.20191217","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191217","dist":{"shasum":"f0d2fdcf5f7a628917a4ebe495cd90d5b15863d3","integrity":"sha512-4KdaI+yLy749fD/ouwyqGgX9mAZocuYgU3QtIHePQ0v0jKXQmGlb01OExMoO7U257pk4Qjwv/VPoPS2538q7BA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191217.tgz","fileCount":150,"unpackedSize":969522,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+ICjCRA9TVsSAnZWagAAjrgP/3FvDZ+/Mgqjx/vihIrF\nsIKEgqZ0lcOuhspdN+WWWlNUIl2qsHdQVt4WuYR1/ztafP7QJ3Rprx74S+4Y\n5q+FolnJ7ngDvQ7/9amJjiNlOuabgJfUCY3OqrBtM6dEAVxBB3a0K4yIf3ws\n5BTBp+Fw9UZr1ZSDswM3j42YSkrPk82FfmEKxtzEHkDbgz7AI0XukLkJjuz+\nNGy+TIhX9IVIO1IPKEJ9fvI4g75vYTNjsURZdXt7S7Ek0h6dBA9jPew4xVcG\n2WZUDLAeyATAKR1HGtxgXi89zCAXphpTpSIeK0yIRNRS+RDdCvFYJh/OGDbO\nd/ZIwuIR8Yqe42DekkbixA2vbQwvnvOdrFA8TqsZoWbtKkkq8Y2B2ZO4oqKY\n57DNEvHxQIhZ+4V5NRL/2c3EEIu06yfAtQMysNQghKuGrXwFi/39MYm9/amr\npJu3/hoDHgXdtmBDSHRkbhpeahCJ80eRY9G7k5I2K5dyxb8ugsKHte3yhQGI\n8FvCF/7HwfmZVw69PF3avocY+rBNtmn2wTXUJZiHgk/dyL77E7u3HCvlrskK\nb8CB3t5LkGYJuAntsGfdjWfqec8ao8tvWYapbAbGQj9xiDejpE0mtX83s9Xe\nJrcVpbgcq9rwVe2Onuui7qHfVC4NJfOKiLEt/Q7mcJ25HBPatxlYriqOoxQT\n5BlT\r\n=6yhY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHZ+jgYLRGHvItzgOORWvylEZS9ixR69H4LGyB0oGSOTAiARD6/E55h+Cfe2fwgQzNWm68ddI5GHExiMxO+wyRbeMQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191217_1576566947219_0.5425327172204697"},"_hasShrinkwrap":false},"0.16.0-nightly.20191218":{"name":"brs","version":"0.16.0-nightly.20191218","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"./bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191218","dist":{"shasum":"495dd3ae64aad3dda4d2f762931392526c95b4fd","integrity":"sha512-Mj62lpWgD3ZBb9uy3dhslggSjDCVSCnotH/MG7I6Yi5L+Kiiz99KVH+ABe7rMK7BlMSzSSkDS9yJD5DAULffrA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191218.tgz","fileCount":152,"unpackedSize":978295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+dIxCRA9TVsSAnZWagAAHc4P/1d+c7ZLlzvbAbFqoxdt\n8R7OhQzTOQKnzUsCcFxeg62uH09NxX0rzFApYV0slsClHGWrNfk3YORZaFmI\nwionScnW4j4Yyse/4R8vjALB4WSd5W9oYe4t2FwuCAoRPmh85HkjDxIfpxro\nqJ04//wAXvhJBWfXXPZ7zsn7uPdaup0tzBptFpvT9LjskvrHJwDoUC8RT0HY\nhlMHgmUEn+9DrBQWO/dt9qwRAobci8e9DlwCAGiutTDKwiVCLJkIr9te3I3Z\nCdvVTU6BIQzxFZBmNpZXOciK3iEhqym5dx/rR8en2YtprOF84F5pR3PFYkDV\n2thcLEJlTTBfRUInts2pmcg7fFMuJ8uRYHzD6Mm983xmFaCCTc9hz3d8sahX\nK2+x5msoQBExhsMLYZF9gmbzn4fPCrSqxTVw3Je6zFCBXL4rH/Zc8XYNdw0r\ntOoq3jYDRtlE43Q4Zzj2TUAuKCZ4NNeNoiXFFxUvxX8A0HXp4P03vWqyRNTL\npXXzH1dQZAmYruGR0WRMzTl7uaYsL/dIXPddjppWVGr2oaBmttGaH4iw6Y9A\nSRvH6kWQTvEEr30FzYk7dyQodZF5b9pXckcNdHuATBwz0ls0YeJ24PYqpl9p\nlM/qD/dQ+cikv8JBte18flqnXoS0ft9B+zPqqo7xrNUPH+XJ6xvZA28fM7uu\nR+Bj\r\n=y4aF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG20iN9rX1omMohT8yIjmM0Ytly43uuTLumZh1LkxLp/AiBTQksS1c0j7boIWtuAZysyDqnL+xjCNXK91mGohY5KBQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191218_1576653361260_0.05679577692131721"},"_hasShrinkwrap":false},"0.16.0-nightly.20191219":{"name":"brs","version":"0.16.0-nightly.20191219","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191219","dist":{"shasum":"31dbc09893e85a8fe226acab3910a0f7461cc01b","integrity":"sha512-NDclB9tauQF2v0yj1WixQucR7m1lFCHw+Y1mTZ47NCCCaGCTstRgBhWp0K51QZ7S401uKNAelC5r0P2NR/xBfg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191219.tgz","fileCount":152,"unpackedSize":978295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+yOhCRA9TVsSAnZWagAAx9EP/2vvbaTjZoCJvLbqavDo\nwPoJbKgxDVepask0JEm2WsHM9vQIp/mT5QS3Yz2qBZTIvPXtfm/6BUK6a77Q\n4fDvvq0jMt4b/wN7TNlzEUyHq8OPoAQO3IF0xI4iYtz3hqzkq8QBLC5BfYG4\nMMgSI1yyN/F+0FqxaxHr9c7XdrGWU+5gJ6OamshMxFg+Vu9IiP8E3VIJXfvy\nWCX/nNQO8ee6at2LMKeOYa/eJDVC4aJBRqPQxB0DlNttZAoDM62LuuFJXeUh\nrbUjfDzxP6gnCDp2H9sBLDQVsLyZmALQnJIgfZM4Mcp8ttocYupFP01FWoo8\nlqVJIzPq17804CJ3wJzjUwIKeEEKL1LDwwGoccXCRKVmSCSBOmR7tnKHjQ3G\nWYb9p9k/Rtf+57L4SG/oM1aaV/KRE+gUfCS4Wi828iC+qSZjUXcXHMLmEiyy\ndIx29TBO1KI86cKI/QivImCa807tREieb1DyNaOjUEgXAuoryn0ridz13Wdv\nTuhqTOjvKWuticgtXfsC3S0z3WCr0K/7ZShlVZOV7+5WwXtXsrhPNnbQlCTs\ncWVO6jetQ0aGHCfjYvZhLS9pk6R3D21uEP/20QbquzmT1dYCn2eQ/WWgbVog\ncK2cxSlnRK23vIgHk59dB8tdk/fRnUy6Sl1gXwT1sIWppa3StnbxTpLcGKi/\neyYi\r\n=OVOi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCja61y6PxBk0Vxkw5u3kvywgkQcfDtYAZjgebBnIoJsAIgbjbSkhfK1U2QSxCW4XvAalpGNEnTgSAlUf/iHGd1rH8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191219_1576739744391_0.22374183216252885"},"_hasShrinkwrap":false},"0.16.0-nightly.20191220":{"name":"brs","version":"0.16.0-nightly.20191220","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191220","dist":{"shasum":"64872522a78f086692983434cf589c41e6dec2cc","integrity":"sha512-L2eWRv+9/xuV2lA4999eb0aLhgab1zNwRAPb0zxdRljiNW5PVk/VchpSWSc9i0ke+2YbnYkW95iuH8Chcq5/iA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191220.tgz","fileCount":152,"unpackedSize":978295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/HVFCRA9TVsSAnZWagAAY18P/jJ1TM+fIlqSg0lsOO3y\n1yD5IvaItlHmKEIAlTDPkj5bUf3I9M1TXKEV15FGSEyDGKLh9aG2A1DwQFqt\nCuYDufZU4ditjqiZz9Z5TsqyqeqhmYjaxH6SK5vEmZXklX2scpc1/Nnso7Gr\ndFiDfanK3re0GA4TbcnIuoZbaOyymgIZ9kO8pgz2/+vaZQtzSZDDy4uYjMRO\nTq7EBr99TjJRo5x0sJwvXzL4zeeLaSTPv9UxBNa8n9WFIR5GNyfN3GABnFkb\nAdmb5+s7AgrRiFT0TdZGh7JkLWM0NmQM6SoASnIvcvXDnnxqEgOdjVzbsEbP\nRIewNDbDHD4Vy8R1zLQ7Ax0Pq8IyiNVvCi3bORkjNuJphU9+9GVlFXxtKyFL\n58r1hRPX7QTwaW9Dv7KGs6At263TbqFlE06JfdsGratPi+wtgHEFZ0X0Pxtq\nkxXSzMwKoO6OD1t1dulhYArMkaqLR0CQw1Hy1uosW57IXvOQ2jd1wn1k9tI8\n9oIbLa2dXePCMYmc5Ic181u9WCEgOXvYZQq5f057O4/wyfeJZ1J9AWdbT3XN\nmxY+92Owe2EDrWQC77On9D2slR6cO+JNy/vgbprHatBh0f6oxRls5BUuXD3O\npLsekMRomRREALAgS9d95o9gs67ZVrgsyKXaSFjQS8OrB0SOJ0tHGyujESbq\nW0Dm\r\n=Pbug\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFinUVRdox4qTPp+bDaFh8XnFZjoH8Maw+nWe1vmUTQuAiBqMc5Y7hfiFvoD1fTyEOQSEA/YY7MLZCw1zmthkMfL+Q=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191220_1576826180495_0.4286619574515065"},"_hasShrinkwrap":false},"0.16.0-nightly.20191221":{"name":"brs","version":"0.16.0-nightly.20191221","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191221","dist":{"shasum":"6b5149c117b9581958a3bc8f0012855ddf528ed5","integrity":"sha512-PqPJew2qjfycRWfjAGqzkqVSh+ip6+dy0b8Qx2CkbiB5sqOk22gkorhWS/JEifDGJZHeR6mQNtpYoZPQXogcdg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191221.tgz","fileCount":152,"unpackedSize":978295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/cahCRA9TVsSAnZWagAAwekP/3LNUNx0yoNTWoQIgz6L\nIfnY6GxWdN5li9pKQGG4PyB8oj9NBND3iRN2Hhi1Hc73wVUrGKYxGaGYgE3N\n4m/nv9nTvGveSgDiudlldzdVQMHuJpaXm+viaaATOWh1sNYImBUncqt1QUXC\npT2xbnEaUezPDuBaLioCgB3FPFNqENbllvvVZed8Uq3gBtWRbJ2QCvXuOBHP\nn8IOUYqqxsZK9zT0TPc0H3WyO6WNovfshux6WSki/iKRZc7fgSn3uhlOoR4m\nTfG62IunIUpGTXja7S4SG47pZo0zaUzlm0lIR7GLlQWHxm4J9FUr5F9rkT+0\n0TmN8IqnlQ4XiBz8SrhgGLIhBqUb/hDbqBPEE4mYLdrXQ6GrWPSYcvAAOPmi\no8JObfS+IXJerMOW7Pp4RZKUPQrZl1YUWJAtz4rjq22bB3nGQBlRxVX/F6rs\nvZ2pw6sCbnyl0gkJdEdHbVTCz13IxVNEm3rgGiTRAvFS9GtPkUESBC/Q4IvH\nU/Q8ryKcuKwnDfXE3vPEUV+Tpr3udHfuPIURk2gisdMUKdpASeFdb2L4ePqG\nuPNSi+iG843QX+WsbkOxX5kRZJHdsM5Kv5H7Y5e8AcLxa1Nj88EfYTh1OG9C\nFoDsGQNgAKSl64yKpDVDrc9TPQWgkLEZ5gZ6w0DpL4xPE3fMMAYkP/8awcp1\nAge8\r\n=2DEk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaajXpgkOGdtDFtQGO7/dM/dIHQoEKG6Dx3Yrb9C+DLwIgb3soy0s3QL/2khUwDAHAMg+jN9p56SVyxATs2WLKkxo="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191221_1576912544648_0.8831222389483808"},"_hasShrinkwrap":false},"0.16.0-nightly.20191222":{"name":"brs","version":"0.16.0-nightly.20191222","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191222","dist":{"shasum":"e0186806e96050dab9acc77a1ae848b228a1090c","integrity":"sha512-lMKPD0RaEfviWatyNu2WXSs4hPtemOhafmXMl2pPPexhnDibioGjtXpLqBmFgdSRWNJ2C3Zskg/ozL+NjbdgZA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191222.tgz","fileCount":152,"unpackedSize":978295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/xgYCRA9TVsSAnZWagAAYVYP/iyrhMGb4YQX93YD7BM3\nLyiwwYpCgSxW921ciTn1B/mGctoanEGcMASjMeny1hbdMRrtl3nQeSvht+1r\nAwMEweigwQeCBoctWcoyRPfRLWu3kX9e7oEw4n1ztj6B9w6g11YdQnzGd2/n\niNQuEM9q+cDuOQ3JZ5q/JoYex59OKG7EBtIoXhlVRL0eqqDgWZ/hhWiZLuL3\nnlvsiupwb7urNViPjzzDCVN8jKtoqp+yoI8uWUjNd/v/ipT/rdIVjBTON3H0\n6x7qP0A8DWKn2VuS2OiP/RddmG2xyKVwHSyBfl4rPY3kVayfyTpPRhWe2m23\nlsQMpXl311Ep5CQvbAv24yuQnanFMgFiXLF/gsuYLQ/DaHk0bgCxWHfa1EJQ\n4NhJQ31S1Hgr4c897iCLe/3LXFRYLtX+T+MGwPO2kW2DMkjSKvHAVwLgp2ow\nxd8r44TxG/eYscZtItau6c2zioj0GHphOo9E3/O4EsujiLNbDQDKO/9nhcnR\ni4ffR+vSklVunpC3KXSwQq3MqYgl0Kq47N7MXtWC/5KLJocvCmSQ6GMxad84\nquDNsahSCcd/FhatQrV8SlQVZfRgFE92RoNVTNmtazmb/uglNv+ETJTIczFZ\nPhTZvmyhBBtwUi6uxgJTTZLAYMrZLuEEtxxRQa/m569eL3ASqce1SVLDBEue\nHHaq\r\n=1TG7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICazXG877TlRqxvIaXnAk2Mh/SNa3B4O+4TtLVboavGmAiAlm3SBVnmQhArK5/iBv3+ikNvZWEYyDADY4FITKZvZ5Q=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191222_1576998936067_0.9405371191603482"},"_hasShrinkwrap":false},"0.16.0-nightly.20191223":{"name":"brs","version":"0.16.0-nightly.20191223","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191223","dist":{"shasum":"4de7477af97e7d12f6159d74beedcac719b52fa8","integrity":"sha512-hG+raYycPAm/YGzol0WCRINNFmKmhMellNHzZXhFSeYe69pabUU20Z+59r5tXaIWgrQjneLZkgqlhyUp+DZzRA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191223.tgz","fileCount":152,"unpackedSize":978295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeAGm3CRA9TVsSAnZWagAAEg0P/1uERO/XJRpsaaZaws23\n5MxusT/QhRRhdKA0zKu8PGbjyALKkyFyx24D1rIjSlquRYMVC+rgY/fm0ZzE\nlS6ENOqQMXUW/yVm/KhnynwieIie4Kz7935JJhvknCpe4vWnswlZXT82WiNa\n4pLDFHO7Ufa9UY0pR2hGZoGLK8oPQjZ+rSmY+bzldsBqaYHfb2nOKiGJf3nK\nU1yGNJJi1FcGcwWcXlr7kTdbmk/0aqLHjfcsRwkL7Rs9kwjgukNpXvTIGrd5\nDZTRpomyBanxnp0RYSA0qqDU/911UET/Q6uJAtuiBURVya/jkRZaxJw/nOfs\nW79ZbA8UvQACmXQqYNzxsmKHBgS9pCatSa2rXN+cHEmxSASNxeNcJ4iVCYos\ntSZW61QaQSm2SSRtFOxI3OT59csIWw8pDpGWCVV/VKUCKwZR0Vm+4o375ALX\n48N1qyNFv6dJIr04d1HmM1tpZ1BVphRm3huTlu7Ykvor7r1bzPnKc59aYDTO\nCqtKv3nt1ZfoLjv6Biz5n5xlazBS+7nQRXdTXqizrByBPjcKqueauDZvHXbP\n8XQpKpiw8MTHe8xl/CVqFl/+F/CN3EXfR/lLM4Zl8oT6fk/7ZKR4LSZViNWE\ncgZR4ZETVkjlGzfZ97dX7j2ogIGMChKJO3NU7eKTPcEnc+2I4o/NXhPahwwL\nBqGw\r\n=1fNM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCCuxm2x1blSVIsw31DkQQSfsyfUd/aihGSUtj0BDtU9wIgdaXjQGpHsTYnfCyWxP4GzGvPHvfHjj/ifAZfiOt+Xis="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191223_1577085366758_0.44521604479951304"},"_hasShrinkwrap":false},"0.16.0-nightly.20191224":{"name":"brs","version":"0.16.0-nightly.20191224","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191224","dist":{"shasum":"782313c961f17ec455329cb7d62294fb5372f285","integrity":"sha512-hUrAdF+Oy1kHoGjz2eD0dJe08iTRGHqdAzioBe7f1BhJ2Y7PUhwM4S2ZyZLBCEibyIdot+zrQx/vvISpRcDa/g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191224.tgz","fileCount":152,"unpackedSize":978295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeAbsiCRA9TVsSAnZWagAA7/8QAJIIEw5qD9oikVjFfEwZ\nddztuVYr23OGMQ3NvfjFTC/k81o5A6YfkX5zEYxzbNgoHLYX3FxH1FzFy0nw\nefM0bGbwYmCjx8ZUK0kRyC3EcyI28M4Py40XTq25G1wI0BzWGlELOsrVGwdf\n5xfVrXKNrK4Ma7QOquyvCF2ByViaN4iKxqmQBN4jyO/CmXwOEwxI1E7V1SHw\n9vdcUW5Q8LzpDeiKuErjNdBpFBygjrJHc66bWvgt9mtlQGM6KgYmsN3rltU9\nhPel9knSC+F7cBHNrk6brRDsaLuyeus1eMIzhCNfjrYeUYnE1eCKinHLgBJ1\nLkk7gY4oKdZY4LCm3mauj3+aGzRWEY0i1rOAkDHeQvpxYV9di3D7JNaWIV6P\nEvb52kwyKPJdoS7y6ueCHXD5QqvXhhFfFdyUntXMmqnesq7nYVkjTZSENj0/\nVYtVLjg2kUyf6dCKJ+8izFFE95V8ZTGHNHsPdN98nuc9EiFAI0C8sgVFpz/c\n7WQKH1lj/vm1i80EeTZeP4LZ1HXbWltZBzw806bygTdAjU7X4sxv5AEnYuRc\nJH2QalDSyNTKA1wTnVXeH9wm/ajat8pQdZUAibb/HSVDjlGm6FRjW3iViKy8\nJe4L/eZHp9uTQOQI8VP0S83SIdtloZanLwwxIrad5irHNVDTi1L1BPR4Xm47\n+VHI\r\n=VaXb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClSxNaLT2GF1Ohw4R6k7MiPKT4Vfqc5NDmcq67UF+iewIgdB2eGmUA8TQ4JRf8Pg9C1IY5TgTAF+4hYSh6b5XOzaA="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191224_1577171746035_0.9482862897263851"},"_hasShrinkwrap":false},"0.16.0-nightly.20191225":{"name":"brs","version":"0.16.0-nightly.20191225","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191225","dist":{"shasum":"2a5907ddda832542bec3065da99e4a20e6f9b59c","integrity":"sha512-6fXUMNR1+qbLJUbiMkkce9L7TQIryzvcw5SSmEZsAPVg22/DTPh6g1kp/GEut+9R5Nm5vDlCJoFocO9N2rKrtA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191225.tgz","fileCount":152,"unpackedSize":978295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeAwy1CRA9TVsSAnZWagAAHoIP/1kgrFeww0oJLJCYwoHB\nVUL8tFICzeWnVYxEjbu6NkJFc2ZTeP/2aXk5EFwUtY3ohYflIsjfHoFdEE+7\n55CuVDCzEBBVPrDBwxWv9SIlThF8aM60XafhDBkDvuEUSLIc4OtMUE3U/NRF\nbEzclOAT3pEe8XmARp3tk5uD7HqAQvYnKzzIsecoZJAIl0IMmbJ6TQSplJdb\nxZWs2UEshQK8ApOrgj6EP3/Eo85lQCYZKcqiswnFUzy5TSHxNe7ldMi2ydvm\nyJC2K7020daXb7Rd21fnXyGpDXFRZ1OWMOIqcHDM8MFOgg/ur20FK4VkC0w8\n+0fki8mb+TWKuw+NiGfVxH93L6ApI3LsmeXRE+kbyVop4wAikzFt3a12Fqgu\nl+gkg/sEZ4bYzWf1hcuchPHZ90RY/JlelzMd1iKOz6i1sEPd2QaGpaVTkQbR\nDtvLcTZtGLLR/CMsWZ4udjY25CT5jbNAPOfnHxlOoWDXwe3li8q0WdTeY8/f\ngUNROzPXuUmg37MKBPpC6pgtnjz+8tPqRicNxRSZZTrWxal7xq0CRnqtV07k\nZU5nVehAIq1ep5cKqP71rf0fdGSjGSN66+IF4bMMbX8vHoFo9jGW/KoLnd6+\nTXC1WQ7keVh7ON0OAX0ue5vyU4tJCaw1f4Ym2ONuFwpdEqxt+jTaT8n10/XS\nhf+I\r\n=Pqbd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGAlRNZCBkD8kowVMf7TYtLKHiCXktRBq14sxm+DSKYWAiAGvJH80p2gC4VCsOmNhPYfqOKWsiFH8vVJOOtjocpEsg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191225_1577258165047_0.729097821431911"},"_hasShrinkwrap":false},"0.16.0-nightly.20191226":{"name":"brs","version":"0.16.0-nightly.20191226","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191226","dist":{"shasum":"ff9c65815f05d6543ba44d4d153d1dc1078929fb","integrity":"sha512-aP2ZDd/1dZh4GE+PCg4lLYlrsgMAi15jCn78+vJ3iiezg/fxHT5LZRRn7y3aTO6vOdfndt8p9n1L9El3R4EbVA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191226.tgz","fileCount":152,"unpackedSize":978295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeBF4sCRA9TVsSAnZWagAAWFAP/1ACnd4VaoQtDtlayYIg\nDpX40/eOqnFBWix2tAUnqHfX0W67GxCviQy/XRRRdQbCMNULvliXfHcCE3W8\nFHsvDda76I4q/gU5dAUrixlXYxLDcHfLkus/t4b+gdLDBdcFt0DlvLuzMI3x\nsYb+VNJOKfs8X/XENuwBEYDCNzGCOdfTyqub7xvRT0itZX/L7KWU8KExz2GP\nLV1DoDvEtkFwAiDvnZTBZfHQUnu5dX6tCrjJM3u1gdm+meXBZZkaulhPojI6\nLNrrvPh0sYW9t7tOO5ml5lmi36YI64RYSwTwinkpzE/M/Kxv1wyJVq5sNvRY\nZVkCTsiagV7Owda+5UnQozLiNWPtGAV0peTMsn3xdwBv51bjZcyHVgxAeOZU\nfEg/D6Jxa6DDYQnOgeddiNmnHTsMjBiQkyAUoE/Jccb32dJaiUTxYsV1ANpH\ngHG3g39lOKgbUySdBTTIPzX+OhRHBN420Dw6ujshuZntuHE6HXQEPGaSH0+q\n3nMa4at+xLlQpbFXauP4ioYZtRRTrR94D7EuGSIk4HpCTOzfkTCAp3E07ltA\nKVY/IZrU2yycQvOVs/NBwWF+j2IiuFbxllW6TbOMx5q2Ouw5DMs7m17jV8Hp\ndL2QznyWUL85k4SoRD5xfmca5hu2y7FiAKMTYt1SAnkXyNV9AiyUbjtK+Zyk\nWJoO\r\n=+shP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAIdPpCXb9JBV0Z8br4+vTYsorcUHFPe03xHPsNcR47BAiEA/I87fBTmG5wn4cYrkPFQDkdFplBnT2JCBFtuW+HYR0U="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191226_1577344556070_0.2312814118912334"},"_hasShrinkwrap":false},"0.16.0-nightly.20191227":{"name":"brs","version":"0.16.0-nightly.20191227","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191227","dist":{"shasum":"2eda65896a52d0f989a6d876016b853d0569cefd","integrity":"sha512-5LuDE6u3fh2GIq1QZT3m7iGTr85VxkJTyEdKhtqSd7pprS9uU0t9P4b/14uc/W4OtaWDRVLi6aZt9CV1yNQVfQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191227.tgz","fileCount":152,"unpackedSize":978295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeBa+tCRA9TVsSAnZWagAAYLwQAIHuw8O26iB9xjKzkooP\nURys389Y6iMg6gePYLtgHU84VervcIG5WHFkHtpRrOisWprbNOAL96QIiYSD\nRHzw9K6OH9hNcGDkBV5nBmF0vQLMJg/IiTzC9/0VtTHG88089ExrZ3jJIzXO\nLN4D2hdDhgLz6GcXpRhJ+F+Rlow7it0WrXj7pXZ42fUl02y8r+O9i1q6fB4K\nWvr6CISWvBvjrUr+LPv+IdFePDx0+Fx7j4gYFnzU40m9kCLnBRK4LVsmPHVM\nL8Uv6aB838U3UE1/D3PfP9D79jID2WquodXfclkxEp25Od5W8eqXv5tbMZHJ\nZPRb80loRCd3xQYVACRFAIjWH3FpFNMAT8EwCHjMSCR9cTd9WCnUxihmrOEp\nVgnVsnm3PV39skNYanNJ2JXafV9w4zUjRfBR/VcMYp+P2zgYvBZnxl68kldC\nEI0vNOTEVtVz+1XhOB3yDWN+3hijRgOas/VN/xzEV5DwLMa4Ta3zP9m9uMy0\nqMyTRvhbZKA28VkQEWIuvgiP72WEBTlUFJ8raZaMpRAbHJ7y2XVM6D2EhdfD\nGtow2JCnbx0n5vJSRBZL7pWtjTWLlGlkbspCv027kPbdiweFDHVB9qh6Lh6o\n5QhRQbJhUmFV8ygvgAtoPfdrJkKHlc9ch3wxjtRawlArAf/YZ3xw/wgNT5y0\nhkU0\r\n=py/p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCY0rJPtD7Cn0mg9XsKGH8TjB2eL95LAp2Ve+ZadJQuDgIhAPqmoYqfwNjptU5smBJLR1lY2b5P2++sMAVWTRCkou7U"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191227_1577430956425_0.3813560527683244"},"_hasShrinkwrap":false},"0.16.0-nightly.20191228":{"name":"brs","version":"0.16.0-nightly.20191228","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191228","dist":{"shasum":"0849a7fd1382a2d9ac62cc3dcf43aefeef0c2dd7","integrity":"sha512-IpEhgsIg8izfPgzuZAPsg4mmcJ/dicE49OE1XImtAaMTleoAoK2DlXzPGiqax/OjQgBemOq2q7xo/1PWBSKGtA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191228.tgz","fileCount":152,"unpackedSize":978295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeBwEZCRA9TVsSAnZWagAAiO8P/RHBp/+TlyCIhtHxv+P+\nZFIP0gRgf56oLdby0WKv6xn5BgaFobrys34KxzwxOhn7JYLno2GKk66Eyg+L\nyUjhGXQESIFYqE8H/WP+aYTfp5gcqxTnSXuLm2q4rVnwVPqL8kxZvZc/t/al\nEl+DvSZC2mneq9xVE3v2AVrGpn5KBS+2cQsePhw+weGSKD/z4Is3urv0bJKD\nq6KIg+AjyTc+h6s2aVzZ88DdoXyRt1fN3UwJfnvV8EpF0Rn5+OMd0nVtV7l5\n21M01/elN7k6ZKgKMiV2wd6oTujxekrg6Mn9VFU8X6vBwHgcYZuUPcIESdSE\n9UQ8Of041USf77pH+Vtd48dGpf+R/0iYLNzH8fRM+4KtzpOUWfPxu2d+995M\nlUv/0fd/1BFaccgErxUDNzeTNwle5PzbvKO2avOPa99Iqf2bojhCJcr2dFR1\nxxnxj6peqxAtYQlZnpWIxGy7MldgiMjbNi8QT8g3LhAWSRLOQ3Qb4nbsYGvL\nh039Py7KgoBBOusNG5mu/lzOUukh88zHh8eiBxm8QAD9rjltKvfQc6yzHFag\n/+XDinFI9ok4SyhW3UPKno0Z0+MU6gGdfcB9f1pKbDWSx7HDZibKAV2+5XDQ\nzwIFFTIhhBexDlWinrcj0H8R0DpUCW+mm5IuzmXp4ovzVupFFEXUfG/QbV8p\nCYsM\r\n=7fR6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUgGWUdCZ7EpCwtqrU8Hvr3HMW+td0W5nNnjk0L3NGiwIhALXRthzW4NvAhHo6ExREU9Dg/TnfV9/+/7iUekyst8Wq"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191228_1577517337262_0.667676177534319"},"_hasShrinkwrap":false},"0.16.0-nightly.20191229":{"name":"brs","version":"0.16.0-nightly.20191229","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191229","dist":{"shasum":"16a5020e1afe8043831f0fcf9072e35d4cbd3ed8","integrity":"sha512-pQvzM7GmQiY81yW21Jkwf+3hIOS4AHdpNyQxP97gzD8UcEhGVus7mMqCGfeyEMWAzMJgbYj+aakksOW2oBydWQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191229.tgz","fileCount":152,"unpackedSize":978295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeCFMJCRA9TVsSAnZWagAAixYP/i338E50oBlCF6o/wpt3\napck8NBFD4fHmlwBxEJC7iulsB38hDFEnBFO3FXeLsuO+p13GkoZb1n+q1pA\niIypQ2lRNhwuNtTtmyovYp3Gdn2DPa/UaxZH2piI937PBuPcKNML+zfwzxYN\nms+qB8ZwbPvURAM9SPJy4MiFgKfJuBuHHdHN06QWX9F15d46FhnTtIeOfy4I\nDQxuMz+BCoBwzueWDOjbP0tzI5OEJI4hJN3jez8cBqo+oJlbjdDUHLAYauJj\nMn6ldS2E9Pzw5kmy5xN/DqcEOtR4hPUHhR0T2ii9YGTiIVFV7hmOhrOeLo5j\nEvBMbdfCJ0O+yGztljr6w5+1wukjCL7NYfapeegET9qAGe19NyRgtik9NWyL\nMHwClV9pC+gKBiV0AN8mJTRgcfJMWKdkUOUDIHqGXWVrEQkxBsaYxcDMQP9G\nA8nUX/t8auR+7a+7d9JpJpl6g2O4hQhPsiMA+zzIw8koy9IAH93p8Iq1xRw3\nezCFOHv0VmrpxevHyzmxn95jk6MPxcyqawIMS5RxW0q49xuQ2ak61nwcs/yZ\ntgrEtYR9gi2h7bORI4DiWU3Q32AfRQoDmUF3YaY0Q+m7sEfE3Rg+MV5NDxLz\n2E2NqUBLLAzPPodiKlPdS83Wswhr77q07sEGLeFamWtp8BdRUTuBAahdeDob\n5iN0\r\n=nfJr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGgFi75FsQJXI3tmrUFpLMZHYTEaRK9NXgaM9uRRh1HBAiEA7XFvFEqswtr0RWDfO/GYN0JPOD9j1sHShzw/PfuKltk="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191229_1577603848653_0.2684467409363529"},"_hasShrinkwrap":false},"0.16.0-nightly.20191230":{"name":"brs","version":"0.16.0-nightly.20191230","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.16.0-nightly.20191230","dist":{"shasum":"3d15dc8bc8bbe46c863b7a61de8132f7d1887270","integrity":"sha512-vR9jgBVvHLtNEYjvNVvpFUFlBdEekzEDadwmRCSzNXdzqcxHeAb2bb4ya01yX91pM/wzG7zrEbf/y51IouCZgw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.16.0-nightly.20191230.tgz","fileCount":152,"unpackedSize":978295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeCaQyCRA9TVsSAnZWagAAYaoP/RPpcAns0031qX7Ej/zN\n7jnWHn+YkhKLCI/DC/CDsVmgnDXCUeSq5S5y9rHjNmhdH2rcq7CsSGpK1nwv\nGPCkl1Y6rCWzQv+NENvE/HFA35fOGCqZW/ZUjmQ3Se+9ihsZUvo3OpnqeYSB\njICOPYPTDdfgzSuTaChOw1BjfIrmhEdjOszOKkKH1vnX0iT1SLmT5gB6Kut9\nLlaQpK1MX9S/ryHpc+jgNC17tBu0LNrx9WdWX55XVDnn+dSSX50uhLQL/X8W\nqxzv8XlYTNynx+sNAtamh3yEFCDvbF30jzibXAl6G59MNWrhnbGuU7fl9pVF\nMzUw4uWdR5TgkJkkzL4qGKzLskhMI+I0Z1UJIEfCjDa27HGwDCYKWQIKneDV\ncyrfA7LJsC5OTznImTRDSI9speueHoNvIM3KQs1v4CAnI91rLgT9j3Y6AQxk\ne6jNEZL5oTh8yCa3cUG1vVjpHR0cf/6LJzYMiG9M1V5LlS9aW59ozXWahCd/\nd4F1bmV+sKsAP4rzXWyGs0+ni85Z9f6YDarf0CgaL7irZ4IqU0ZUa53pEg8f\nmL5Q61AhERBTLE4GVjLs+ogC8TyxKBbKW9t7ujzNILme7flQuJRCnYb4s+uN\nUTprzB+VFZ/crRek5auMfTVIUSghYT3tMHQhJ6JIo1prNjcb/NyGgCGD0V+a\nlGh9\r\n=u5hU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB54Ulkdb1XOJ9zSpU3Ged3A9KSbZALA2/JTUbl6BWnvAiEAuGdAvG6xy7pRGjJ11Az74Kt+Hi0LbSKeP8e4uQlFuUs="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.16.0-nightly.20191230_1577690161988_0.6468513371223208"},"_hasShrinkwrap":false},"0.17.0":{"name":"brs","version":"0.17.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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) 2018, Sean Barag\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@0.17.0","dist":{"shasum":"0cb09267c4e94e78595e8fd5b44c382c2546fff6","integrity":"sha512-nSxJbdcJrbJq7aJ+8Mhzv85OU5WcUij8M27EEk8sUmOzuO/34UlMYVoXB6/T5ecffUtTIXWOiBqaRILFoWCiuA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.0.tgz","fileCount":156,"unpackedSize":988873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeCovUCRA9TVsSAnZWagAAF4cP/2FX4CXlMKhukZAwsLkM\n8tKbhWioZbp6D4brak97QQyvA18f48KJB4s+ljkMZrcMfWmu/T6lHFqwgnLY\nOx8tOMoh6cEIZG3WfuUYfmAAijvS3Vf2aZRw/aFIzy7IQUq8nYl+poqMD5c5\nAtxuoLbzS9SO9gcGFXgmMCdt4k+KtvkHb7enUFH/dGpPj/yKR8f8D3BpjQyi\nCTT+ZP66jXXU/QVlO5QI/+YQ7RW53HP9NizdKBHRgMpeDPQqFaZcn9u1refi\neVB+6K/eoXmfPnpaLvdSovayqd8curkRCfZPbiZMJI3+YqGIhhRDrYfcoJWP\ngRKkTXKqgWqqOf54mojaBQ014kz1l+o/lAw03Aqu1NUVzebLH7DVvNIN/CB7\nEjJXFs9PtA0b9lI6VpSPtW3jBPZ5Vy8v0Y3leIHpGxrUSRdeiZ5obCg3scCa\nWXFiXo/bUgnlYtdW0xno3ofs+QUtdu+U7hOHjYsUxpMY/c+upb1iWK3n36gQ\nO2YEyX59j8C/u2PDnbHZ6Nob219jVDzT5NzprZFKY2C2FwMPjHSi9W3ecY8t\nM7nIcjizwHZAPT3WkbSBk6voXZnBZmKJK3TIw3okcgRUq+QZ5QrIelyf/Vcj\nZaRlZ/4brsg1fJ6kNZ4qOfyN7/7g+7a9AYMhfcd4DYCbAWDNhPc5S3plpo6k\n+4qX\r\n=xtVl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEFjjIoOz9tdGK+FHPj35BEs11VfdASpgPtuL6lbp6xAAiEArF1V5vh34MhFuzBrTCYHbU+y6cr4QDuM6PBEPmOxmHU="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.0_1577749459810_0.5178326220506277"},"_hasShrinkwrap":false},"0.17.0-nightly.20191231":{"name":"brs","version":"0.17.0-nightly.20191231","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.0-nightly.20191231","dist":{"shasum":"57377f55079be736433a2fc17ab1cbc995eff0ae","integrity":"sha512-iAfK647FidjjIVD2ITedT1ShgRC4TeALiAjf5GXSpQuCz/ZJ3eLQIK5mOLP4Y9VL4lmrtpishOeLadARAcJhwQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.0-nightly.20191231.tgz","fileCount":156,"unpackedSize":988890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeCvWxCRA9TVsSAnZWagAAJoQP/1ZS3NpWZjX5OycpUNrF\n5CTdnWx3HDYbv1Un/pXatoW0nzZt876bgtXlrEurbZCj3/Hi7nwahDnsNKo5\nHkrsq7RxvgslWPsj3AbDhrNI68wIahfXs7pf25XPef9Gyr1qJEgzlZD4wgO/\nPIQ31kYyso/yj/Wwa0oCFmdS/cMRYvESny5wxCaf7ujVqVVMhXc83NWrXse/\nqaWrsqpE6nLwohB65nq+0GRlbzlNqDbrGXFGu0/ETxnELNeOVaCg+mr4PeXE\nqhRGXqDW6ux6UOeD2HsTNMw0JEUG9CEkYvOaLi7SJSFyleXa4uvMvrQD59nG\nLVJx4IIJEzekzkbIBTgGroUOs6m55Ig+eIvyrMuDoH6OndNQU6sYJLk8S2tZ\nQCG7qnR/TpVBQigv4ho3BuAx9hqKJFzBt+6lIt3KJosnjDfC77LAgK0oxCjA\nd2Q7JxKXnSuQnlauVXsm/FS+CD4xLkH540+JeGLKmgFS7GyRS0j1ym5bs4BQ\nldB3fNhu0xdADXz6ZsRimA1UCc5n1N7kI9GD3vGHGJT3ubq3Vq4cYIBH6elb\ng+Yx4Xbneua9ilHj8u+aoCcLhQeD1KggtZJm4pSAd7OR2ZXjaspkVkE0+HyL\neYGCEZUTI8d/fXwbRWdbec0ja/lXPf2/WYuIXhMJ5pEw5xmB092dPR5u+Uxn\n4+YW\r\n=16R6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNQUL/T+eafAL4bxVY+jBz4lCU7s0FRXTu1HVf9cP1jwIgZLI/oH7C12sWNaD4JCyaQTvuxyQ8hQK4XrfOOh2/e2s="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.0-nightly.20191231_1577776560559_0.8234424464724415"},"_hasShrinkwrap":false},"0.17.0-nightly.20200101":{"name":"brs","version":"0.17.0-nightly.20200101","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.0-nightly.20200101","dist":{"shasum":"a84184a1c0857d5f7adcb3ad2bb76978a62d3d3a","integrity":"sha512-tK0C6DobHuhI6OLiOJgGYmkChBSgLFbG/saMzpok7OucpnDGMW1EC3nOi7PBbiHRyBD7svYzEDjSht8LSwB1rg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.0-nightly.20200101.tgz","fileCount":156,"unpackedSize":989584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeDEceCRA9TVsSAnZWagAAcx4P/jxYgQHgcTlKU6aPNJZm\n2wUAR7+qyrrcwnVvB/nCyiaMagASYGY4IluyG6Feeyee0I7xkOlbHk3Rxto/\nu16mJniiIiaO99O26ID9eRY/OozIe7KDMcewHYnkffKZn2++WU1Rm2FifzYn\nnP/tAuwjs4MKudBI+7gV5Wr7L8hdKKNQdpwVESsEHK9oUtMWWmgEFDXbwbDk\nA9zZqam3aL3nqtFwjlwrbbn7MmlfwrlmGOkrb4NkJcCPhaGmbFCSPpRBn3/0\nBQsCMpOfoDv+0rIw1LqJQcFNzAz0VxBV07ZmDAPj3Qy99o4O0FGz6tepLZ1O\nNd/IWKGSQbY20Vro6Q9QL6oI1mMFywsoNLv5YIuU7GVXgVS8D5Sp+sCr3Juj\n7xA3TPq6ZK510lz3Yh4BUea/lMgAoNLFRNWGszbgFrqZLyJX39sF5ksywpeZ\njbEW5zpvqFs/54yA8OmbuYuw7jrGBAM1ojhmhMpiASxFpKkJy+Wz4o8DTjsW\n21IPAD5I+bwKuQ5ufhaDe04f/i37YzzSgc4drKfPXoo1uz9dfn+vKB36hal3\nYga24Xun2WS3RWWSF18MbjkNHpTsz6FlWnYICm5ds7WqRBsJ4NQaVdNzVq9v\n4BhBwrFIOWGyGFtU2GCzzx7udu1zjfMULEvmpHfKlA3thY7bKDXYI/ZzR1ji\nhrtA\r\n=rvz0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRyBCNDQpSTQRnbRsOoaApOfgtA2z8/PslAQcUA2Q4TQIgAdzYDyea5niykeiIvcilhlkn4xDfgAfMd1nbSbKpOAE="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.0-nightly.20200101_1577862942083_0.8948078245452975"},"_hasShrinkwrap":false},"0.17.0-nightly.20200102":{"name":"brs","version":"0.17.0-nightly.20200102","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.0-nightly.20200102","dist":{"shasum":"57b73f0f007a28b5769a95738427430af8f83539","integrity":"sha512-UkfmnzXWLLsKJpECdQpAHTsfg2VIZudvagGE+bfvh9I1h8TeGzRrPBshsXEXsxUM1iAchMtot6qp90gPGpYLug==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.0-nightly.20200102.tgz","fileCount":156,"unpackedSize":989584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeDZivCRA9TVsSAnZWagAAOBQP/1N1p+t85gLvl2EtdVZd\nK8Y9wMrD1AOEyt2Jado2YBJLVfExP1nr9Z0qDAlmlEzHAygLgnNLVyezEmvO\nxTDLTCxC7UZ5bSeHsiOL+EFdJT6E93HGROPssibGmvJys1xgq7q4rzpMbjzk\n3HsK9v74KGdoLARFe47YoaVTUUlBMx2sdepLRz2eZTzrPmtE5iKW9skP/OS4\n14J1BjZQCCK06ZogbkqOqsqspbLvUC2hQZRaTsbHqr/pQQxAhJ7FYCcJQJh4\nVQUOjPDPkL+Kce9TR8H3/Snnz8ad6M71IgzZ88Gg5gEs1FHU6pD4Mx0qvDFs\n+BBQNjYE04s0MaivPnfi4kTwIGCHFFdP7Mm7A8lCrbzI36UKxPsmtAc+w3pc\nryA8yknRKYIC7yZpiJwYSC2jMpma9Dluq0TJ1vGIB3KFvHuehr9xt6KdeKmc\nMpb+3xnl6x2GcDhbi/WuuQ9sqDFZvt2iYOPhZbhwpRngk4qw99zRmLl4DC9q\nUAn3qfzEh/USPmfO9qrkc7Kyv9y1ukRg4/txmUfrqgY/Y8Eql3CJZVgV2vlu\nTBEZcngn/cLqHwIrc49t51mnltU1znbrayGkIUEfD1XAM3XjaPcC9sWxll6Z\nqmuDYNvWXE2MqIO6Z2GTjY249NvagApxTK4p5ks5yLlzXEgHI4uvl9sbtYZL\ni7ni\r\n=Zj9+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEGkd5otxdAB8Du9Dpkrsf+VKZ7ugxapGkGl82SwIO1AIgZ/eaV9XG258G/YEmyRclewYddKDsgQpvtexA6sEqyPg="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.0-nightly.20200102_1577949359058_0.06354358757257894"},"_hasShrinkwrap":false},"0.17.1":{"name":"brs","version":"0.17.1","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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) 2018, Sean Barag\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@0.17.1","dist":{"shasum":"244583c01df8034baea3deba240dfab34d262a0d","integrity":"sha512-oWlL9hFfVrfYxMEVg+vd+LaVcSl3isxt/QXz+fJ2u0Ub15dlW/HmTGZSJvALpousY1kqQJscDk62vbNANgPGhg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.1.tgz","fileCount":156,"unpackedSize":989567,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeDmANCRA9TVsSAnZWagAAn6IP/3DJSrMI6LBwQCCZOaBx\nRms2DdWouiB0ao4Xru3Rn+KdkWWLeLfZ8eJi+4+ERfPgOIUPOHzNed8STl3B\nnqQb9WUyNH7iGhstDukxMCMFT6D2p4rsIAREksL6QY1N77AfH0gdYTK9+PUS\nCzMLIcN23B5dycwk7HpBhZ37yCsX97kEqj1C5/1lEhCx7FvYToTBfB4ERCpe\nerLH+CpSxzMMVQGLZI3q1J9yHlJElsKtKf8Rz/vEJS6TVyRnGfvSfctmrmqw\nsGRS01paoWOrSgeduwQlhiCeSxylF1WQRVXvBRBUftl4LLmQUe+z9uUK8RIe\n/cs6yao6CUgBIyccwkVV9eQq10h604/77qx2JCK8UCOMLtZs8bIIPSu0ms0o\nn/vPxPPRQNeov7HbyhrIkO2p2PzGxsFkitUFC1JUUUUEyXyU5JpWXQeb3+Tm\nd4wMhWHo0XKVxEInIbEHAvsS+4vTktBYI9yUsyf7kEeOGSbEvC6RReBAP9Sv\nyPEkHqfctzZRXyfpRumbvO6KL/QMSud/9ah9CJ2GPP0AT7yx8tayMpsUv7KY\nntgMbQ9uB21jfZ5d4jewzReYNXHdnrZThD+PxHmEyIP8GEaQcQL7C+WKSKg+\ny/N8nm+C0dYfFk48DmkB71ZZgGxH5T7EwfQT8OFMEU4V7Mn76UY2/HBAFLz7\nWgsX\r\n=Stz/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHie4UE0LoZE0fOLMyRDiy4oKmjaqLdZ2A4kD7ndzBpQIgOJLpJqebeqktFFIW1G0wL5ycsKFlb8RWIvb/LsUr70A="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.1_1578000396711_0.7168627923498081"},"_hasShrinkwrap":false},"0.17.1-nightly.20200103":{"name":"brs","version":"0.17.1-nightly.20200103","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.1-nightly.20200103","dist":{"shasum":"00119a4abe7c7a7dcd5a7549b88e74948a3a0b32","integrity":"sha512-G8ccPbncWdaJ8pJyvWn+HCKsPzbn4A3OXPbJjECYEc9B+u52NYEfF9ampTISFsDdI2ag2VPhzvi2WCgNsZhRtA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.1-nightly.20200103.tgz","fileCount":156,"unpackedSize":989584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeDuouCRA9TVsSAnZWagAAr/YP/1ldDbwhnhmJ6J/pNGD/\nkfN1FoeBmNmM0DGFSkXGDJhJZfOFSlcM4NbKLGNVv/BGO0fw7TPV/UWqvBiG\n3cIfBFj7lUDug23cpfU3GCEGvfLQINu7zUcpUYcav2ggkYdAa39zYz8F0vJe\nXNX+N3HEC11E1eZm5JYXJe9h/NomJeasRBT+o/ResX1NY4BZ+Pn6MKIacR5b\n6YHFwmQtz9dSJF0BZrcYlV+FdV8bT8QHXCu+7DIBzqEAwCe037WjVkNsuFB7\n0rFxqXj1tY+lw5FXe4CmITRWE/E41USuEiNpdzJz/4HaJc6WgWR1D41erS9Z\narrQyyB+nOIObq7+43e4KmV4DKFBhCijVFMDW8gGmODV2Zv7aJCDLcI61tQZ\nRhJSDP0a3iCcmYI3S5bj0YU09Eg6L3JOgeGDTIwdvTMw6DFDk/xLg9Zu6Byo\nZw6fCSa8IscSJFzIfmVgtO7m+lS0sc4lAL2BJIuiNZZDESUUnx8Gwsih0qEc\nJ1tSTN7D0iiaPq1BfCxvLqe5CqLUeCmHG8iskKb8zzBHWQjH8c7eoGG9yY5X\n1m3O5PrszTSZ7Rz9V8LP95BekOg+EKJqI6p+yCjz2PjQfKeMPghyfdDbL3Fk\nT6AChyA5YsIG+1bygi6dnTUbAeDCsUolmVXhfeBjxZ9OM8DShOxTw9VEmcor\n6j6Y\r\n=uwKJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/iSOt+VUtP2aFgNIxdmrNhkXhpK31kwgPwPQJUMwFZAIhAO19Ukw8Tds5rf0IBAuCzNYco25Wj3oVPzVbx5rcSpXC"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.1-nightly.20200103_1578035757824_0.8156336378503395"},"_hasShrinkwrap":false},"0.17.1-nightly.20200104":{"name":"brs","version":"0.17.1-nightly.20200104","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.1-nightly.20200104","dist":{"shasum":"c3cd0f86374954850af07d47a7af02a7351b6536","integrity":"sha512-XUHB/2CjgccUKSi6II+LxzdTSZLWo4lOkhrhCvk/+09hTbjrNNv1oIC6AVvU7BjZYhp3wu5+qA0J14mFTwqAWg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.1-nightly.20200104.tgz","fileCount":156,"unpackedSize":989584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeEDuVCRA9TVsSAnZWagAApSoQAKDzHJd+kn2mnnlCkk1/\n2opbGPBQeEES9dikt/iu5BxU7gv1nBa8KJbboPQFN2+4bts1UAv36Iat+WVW\n7G1oTbmQidDC1+dob4uNogcIAdYT34JjoWa5uHE0LsnY/61E58xVMM+kgQAq\nJT0gmRtypivDz3wg6kIOb2FOnJbSiSKgtTmI5qbsZVd9MyqraSW+qxhhIUnM\nP4RQwiT9Q2gVPJhz8r9d4ZewsRo5ZpNGxCVbv2MIN/MUTqNodXBc4fPpcbtO\niuenFpM9WWFgHTfqzNPNlebGRMLQfGmhVpQPos0cf5lcl7RcHFcBwfWlMKpy\nXGGret0DjKhkSEyGTg7u02EmQivprjzg6U0o1hn1/n8SO00JTF+DnXa0/FOY\nlk0QmiBLolxc/QXv3JKUo3sE0808EXxvJO9KM65LVWp57cGmManitm4lGC7J\n6jni+sfxeLawoJI5SgRouBGTlsM5Onj+qJpxfbT9g0h0u5oeAq03e3e9e17r\nVt3T8/glo0pJnfrC8oH+Az4IlGw/3I8AsxKFTZwkvAky/08m+2Z42M3KJc2Q\nhCBpMeyr5W9/0CdDycynmQeCRq09/VU4q5vi1yZy0TiJR6698ucIvEmjR2yG\nOBClej+uNj7jTd/mog/nOdhjJ9N9f2W4g19gSDUzvhOiOQ/10drRWvk29Rzq\nQzq3\r\n=F3HL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKorqWiih6XiTcyzMBFq88MtezMx8ivo6mBjk2l7NapQIgL8LPwj9spmRXPyi4V4xQtdy1R3+ESIkZLPTN5pzkRHk="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.1-nightly.20200104_1578122133108_0.6864607372228504"},"_hasShrinkwrap":false},"0.17.1-nightly.20200105":{"name":"brs","version":"0.17.1-nightly.20200105","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.1-nightly.20200105","dist":{"shasum":"048a54ea81e7be18b6bafb6d0c3ccabd536be4d6","integrity":"sha512-WDZmoALIZpDTg3+IhvlU3aOH1lk/rxx2CaneUse2jRX+XCQi71FWogSrFpKmEElxT2xpnAWnYPM3SB7ugur4CA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.1-nightly.20200105.tgz","fileCount":156,"unpackedSize":989584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeEY0VCRA9TVsSAnZWagAA61YP/jISh2wW3Gx0SEdZL0/r\n8NvwBsbOs43LoP/GPHuV/wx16WNOfuBIVUTpwo5GfXT5pbHdfnXFq0ActLn1\nCGdUPa/OZz8/cwEXiYDGFTfJK2RqXipTeRJjd+002wowzIhS8TV7vwUim/7D\nSbM8JK1oKFGNh/Ew/7v93qfFsAe4wjzOmfsT7TVOlgKgl0/xI9VAyV99B7qQ\nKaBLQeiy+ltM5ldFGaaBEvlXiUG7ryFqTv8Pbe6GxGuRyssCVyUZFoUMFQZw\nVJ+X1pc6V6c67zsSunniyB1roBvpaW99oCKgLwDzBxBH7mQzvJ3pyO4s7eMT\nAdxdzDIDwcJWGYjTvK8xGKD355Xzd42/HSniKze+tLPkBnkcmeB/0RonwvY+\nc9uGOfr0qysQLY4TLQg+CIY90PLp6UASdhClwNLxMxCzeyUa+YIMskEcpunC\nfy9G5oO3LHT4+Y6idg0KqgkNxi2qbn9q3ar0mxe3ldeIxK0zYLvRQeY+g8al\ntQYpZF7bgZrHRMQ348fNs3OFn9c376KaqLi9RH4ktJgWdB9ISZouOM6bSvEM\nb9qggBOJUPupbptVBO7byPusMAulOMo4I719kTDO3/QQXdOOC6Bzs8X7wrTZ\nRrZB67OAkVWZHtdA/oQ6LTwHFEWZB3gpj8az4fRz7VFwNzt+I0CtzFMIiNDs\nZkB0\r\n=kP6o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD97m0yPV6Vd3NZjpRAhhcyFINkx2T9JHTf3U9xLji6fAIhANVQRrARZWmwsdIdrBQ8ILjQpiDzsOiXjo0fs503J2Zv"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.1-nightly.20200105_1578208532482_0.44920680922207223"},"_hasShrinkwrap":false},"0.17.1-nightly.20200106":{"name":"brs","version":"0.17.1-nightly.20200106","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.1-nightly.20200106","dist":{"shasum":"f5e4eac87cfe096f62654a3140288c7d29fc2206","integrity":"sha512-Vq049YDNSD7tPUraHx3YVxhDpVItBL9gNDWSTaVytR6QXDox4Wnu+FvQiaUxJlm2D7Lnyk8iIhyM4bHwCkt1uA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.1-nightly.20200106.tgz","fileCount":156,"unpackedSize":989584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeEt6jCRA9TVsSAnZWagAA5ZYP/RBMZ/wH2gL0NAG0KPFp\njsCqcq73VWuZivCbhyoIeAaSFW4lrN6suSMHDb008YefjbG2wdFzepORri/q\n4FL3nmQPp+vgv9wMrzWfDuxeZKmCsexe/s3XQTDMy1k4YOsM2njQ4KgC8Mv0\n9xjq/FzMPL6y8QT7d2B+Fqd7ya4deXu+DOhSoXWalL4erPE6UnXM+Nq0UUd0\nVeQj8D0D00fu12wOhvWLoUm/E18oKxh5Erg5OLPPs88EVB9e6b5apyYeHfGz\ne5c/nwjvp5odcuBDqE6+Vcj6XDzaeYYRzeCaTz1hpaookISaNUTxU+IZMycn\n3FF38ILqDd6By+B9si3/e/41KmoST5yTC/v/60UZcPdE1VmMsCgGfCP8v4vI\nhSNPwACTsRPw3Ts5si60sm1w0EwHjRfHprjuaDjdwDVm0AyQCEoM84W3EaYB\nUPCh6vBu2VnD12sIyy+3V4IBiTxHhRbo9rCEj7JAd4CI7+p11Q357Ud4mdwd\nYYB1cwcbZ6PWg7Zu9gPxq9BVfrkso/N988A/MB2OjtAOzJcpji+SF6+65eIl\nNM9n6rxjiyTALu4HOonCk965P+G21QOaAsE/FjprdX5kZr2h5hQjJ03CuSxC\nsZoQjAcWoKtY6FFds0FiAXCzcaixzPObO5d81wO/JIHUXsp43TToabNA0jXI\nARdZ\r\n=3VC3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDo391Hnea3SBSZIE3uhNDic/veo/j6P/T4dpjmcpopnwIgd4BDRpV3BFez8LMEqwb7EY1Fjldq+F6f4tRgCXjv29c="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.1-nightly.20200106_1578294946615_0.3486848026007765"},"_hasShrinkwrap":false},"0.17.1-nightly.20200107":{"name":"brs","version":"0.17.1-nightly.20200107","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.1-nightly.20200107","dist":{"shasum":"12bd63de7f806871dbd259f5db99033a8c8a1218","integrity":"sha512-av9YY2SxPrx9u9kwlQljjQjwVgmlh8RZxwQ3pf43iYo/jsb04/PRzLo8ZXmRBxiskwoJ7FCNLIas/1hmewyKiA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.1-nightly.20200107.tgz","fileCount":156,"unpackedSize":989584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFDAhCRA9TVsSAnZWagAAg80P/RsO/t8pJJWIkaxH6ErM\n5jlrQn8DZv3hrsloVwMNl4jnwBNTp1UDuJkc/uLM0gv/Ol/S9j7e2aE4JzQx\nA6PG+1AZ/VsItJ1WuJV+dwmCE4aOrXD1rEtFaKaCZ3DIgP4AzAO7De4aDX3h\n3I3ks6ShdzaP+f6ZZ715hj+5mqbcAFnH0tPv/tU5ylHsT6xjzIJY25lsMI+3\nhAob9L5oRBkTIi5QikYYx4pTyib7AcgQeV+cm40RjS1dHYJ8jX1KPBFGISjp\n1TkAZc09+jkxt/HMWRj5vfF545Qs/xtZxGSmyinUYyVyNlcIX3cdNlpa7cUt\ngxrAReBi86wYaRaDsMXnDHgyLrzGVzCAeXoMFOCSQgA2uX3/jvIjL7lPa7gr\nxcILaqGoIDJHBAzXdH9aCra0IxBDvUV52jcuGovDtf+vxq+uUqBIAizOpTK4\nCX+tjQ8nzEaE4QK8Kl4j1Uy022kXskFqTOlvKBM2e+MAhz5OPdQoT3RJ3gTB\nhUNqaUm9QwyySZiOE9bkJJeiWxmUQMQZYeqcnAChgCr8ljFM4WdC0leOzWvO\nZqCoX0hoJYhzjVXRP6lb3kUhZEmeh9iC+vj7mJgTm0x20NGWyfzrPknNxgUn\niH9ZoTREpkA0FljXMYAq72REWLql+FxaonyyOxgTJAAvBozvYYzjGRK54bU9\npXtm\r\n=KeuB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFhZRkzGTBoI/I5K9Yu8TyAwDZ5Ei04i0YDiymjpTvYwAiAXiFUgWBNVv/niUqtNiUbXB0dADirnbGU1tlBtGKqW0g=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.1-nightly.20200107_1578381345106_0.6453993774720721"},"_hasShrinkwrap":false},"0.17.1-nightly.20200108":{"name":"brs","version":"0.17.1-nightly.20200108","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.1-nightly.20200108","dist":{"shasum":"123cac1a0038ce06a4617936b86160f11d0d5d76","integrity":"sha512-QWAsNYH1whz7N3RQDNtrmm5jhyH2Nza/PZt1MHrzQWweFSGpyKTBtMVuZLN8bVNa4brHm/jJaw4iy7Kq0eabAA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.1-nightly.20200108.tgz","fileCount":156,"unpackedSize":989584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFYG5CRA9TVsSAnZWagAA4aEP/3/fjfER2vEiflaw9o/R\nuOuZCOyxE1KYMYMfmeZ4eeLL8iR7kjAGrtBh0hj9pjSeYWzO5A11Y0iFB7Go\nF6qeP+4zczabbya0YFTmQjcTSiJOWuKjNQUWCBwHJlbFoBzPrErjR19d3ibb\nz+wzkk+1L7NQGk0M60Ya+RqIv+Ct8dd4sxKiuUc4DFvpMmJYp7A2bae43TN9\n+T0Xt3sdCSr7tWuvnVp7bT5e9Hwolt/a210Y6GDZLeDuxqFp1gcJegZEHS/g\nBJIKtx9EX5YKo4xyo+dC+yJTNMTrb24Fr1Q+Wp4WNdgwmWgfHjRs5zOOPrhn\nzPin4fWaBglvUiu1WwTJbSbPxprqt3AAHVKF1+RBCpgS8Ic21NAoms54xfpV\n5mOxhtplSDbxEKp8eBP/qmfLwP3k0PHXWyLRix+XiQKWjI/UGbuOJ81gQ/Sj\nZv0Siogfk9Rx2Ue7FPYs/1stryaa4yOpJabX0p2bTNtlcNAQn/L6HEWc+SNd\nSLxY41NroOb4S7xSXUtke3NpFZB1qK1oLHfSQiUZmub3U2bA4kPXmMYMiiF8\nPLhF/pS2St3eQ+/i7GZj1FFYg/pSurmoqTlV6rPMf4QRRk2NUvNwgLx11w2O\n7rkVpkSxxA9CeMjTZI7fw8JikCwZHq/wSbDKQgLltHU+ujWUhE7cBl/Lprf2\naVUR\r\n=rxBl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF3J89Ox3gxcslyEQZ+oqENILJsCZaOGTasF9JrtoYlDAiEAloXXXSTYOjoiTjg0P+qI2r+COarC9/2B9FsLJsjzYNY="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.1-nightly.20200108_1578467768405_0.5510887366819928"},"_hasShrinkwrap":false},"0.17.1-nightly.20200109":{"name":"brs","version":"0.17.1-nightly.20200109","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.1-nightly.20200109","dist":{"shasum":"16651b44e8ef756eb1610b60e5325712198a9af6","integrity":"sha512-y65u2lkiYYHfNPHQA9XGU7sOfQJeWFmWBZ/hXWpEEZkMiYURh8mUEbML48P/dGTUjiWvcmkw07KwQ74KCExbjw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.1-nightly.20200109.tgz","fileCount":156,"unpackedSize":989584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFtMyCRA9TVsSAnZWagAAEbQP/i5bTAsLK7WTHZVEAU2b\naoDndO0ZmdhUg+5ZW7kChQ0Kh5ZZA+D8CTdgsGgTo4c56r3GqSKrzY0NwjL9\niN/IBvnp+bMCTiDmI/pD3/m0fT0KhqUnyDhFYiyl72LPnykttYZVsekjivj8\n9obCbDCCSKu5mltTeZQJGZzJU+7cGgrdxmPOw6e9aelp7VMiyWwW+SoB7MIB\nzIDH+79rp46P/nBZXjGj4BWLMvLvzdTdsiYFnDW0H4vzD8Ieuv+iJ9BQrWC0\n7N+IHoM207eSy4jg8lh/0WluMyx0EbMx24nZNVtzsOiMLBwEeCZUfA+M6tbk\nKdWJK+DTCE5WJc68KwWjKvVD7qke4HA87PlGVxTa66TJvwygypnJgd9PNUbP\nFrXcd+TxMLaVLsqQlyN+jOr66/NzFVt4k3a/qqYwwTLSCUQNjp+kN/SLLP30\nFH4XiAwnXbURiaXGH+msCqV2RPvt+BqnGrHKL6vdhx0+yN+dEuVhli/Ux67b\nWYLbA8tZMP4nQn/LGkxcNqpv/kIbz8ZDgFRW7IkNDgXAzC+O6NmlOPsSl+5E\n9dCpuunOZylobq8bhwwfxKEgmC9Kq4Vt3pCVFZFqXSCs2dhOexac4t6xOQbM\nGr/+QxG48qF4WUwXadVwLlKqTF+7z1zXnRPXQR7pxWNixctRX5zxmLFD7iIV\nqSoP\r\n=GqHi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB1McMWNx00LlJ8Xb4ZWKUuUpKY9CK/WB5Ga5/mfewolAiEAqkl9VS79dN7RBS3UvOiHsFeAK46pBDBmQ1vegcQK2Lg="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.1-nightly.20200109_1578554161795_0.29472744314650035"},"_hasShrinkwrap":false},"0.17.1-nightly.20200110":{"name":"brs","version":"0.17.1-nightly.20200110","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.1-nightly.20200110","dist":{"shasum":"15fdcc6330b8d2d0ab4b22aa0c99e0ccc86550da","integrity":"sha512-9Jr4SQguOSBv3q5rLTuLbH60KNgLWpEmYlyVicsgDlbGo7hvkfSPYUYQ+N4t7UH4JJZD3Xx1x21+n8mZQ4JXXQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.1-nightly.20200110.tgz","fileCount":156,"unpackedSize":989584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeGCS4CRA9TVsSAnZWagAA1XgP/3S0CzpsukJeYHBW1/la\nuO5FLloFpcTYeoTPP5TnCFMIDD0hVXf6yF6qcwTbltFIaA6vwMnIAFywc8le\ne+enghdQ5dg39v5MnLXSbL18CLIDqfjiEjbRRenoYn+mWT8n19l/EtgYmwVf\n2reRo+GGGA998J5NDPFVnrlo+OSvioo3bcvEHz0zaFFpEdn7gnlRLbrJarXU\ndqD9a6RsokODEhWSZsBXZb/cGaU3OVSyQh5RHtqA3RtCNUXHuFOutGbxhDw2\n/al6E3/oza7TMwPjgwjvvPjaZT5RhJuEsB1vVi4CEidg/SMaLX4g5Y2OY3Iy\n5QIsxJbjGrM19wqO88ZpbfdFxN5aPpbJ6oVoHNkEP8OlO8ZiSaUT66s6VndM\nmzCN6eosNLGV+YQ1lNQBpXix5J8bF9ckqdNKEPEm26PwKgYPj3GCVjiNWcbm\nuWCkUEmQlX35lI1+Dov/n4o3o1L8u9aglnukk8IRvahdBuyAQlI15i4LCRLD\nwdn9A4B1XY5dfGUWBjaXp1iBLn9vg/5OM8ij5l4g+ou2SRDf6CkSOGEEqNZF\nS3UWpEe+aR7JJq+BQImeRDiuO3/sJQr8Eqw5UqZ0m2n4p4MSd/3mMJrbBvqs\ndPy47cuuIwo8xqDAYrkjPILCREWxPKkRDFpFyHCOK2I7xOBCraZmWzXo5t7a\nTAfS\r\n=x+MU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRu/Wxm3GIfJ6HVTRnnsrwhfEp2fYWpncH1m7RF1xruAIhAJlx+6qkI3nqbzqY9t3iMo0JNuR0YN9pBZ3IOSP/8QTT"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.1-nightly.20200110_1578640568133_0.8055376124550493"},"_hasShrinkwrap":false},"0.17.1-nightly.20200111":{"name":"brs","version":"0.17.1-nightly.20200111","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.1-nightly.20200111","dist":{"shasum":"a089bcce45e6ccbbae5f35cdb808c7923792d77e","integrity":"sha512-UkAV54VJjqI37tU3J/+a1vQKZexYaAOAipuQsIhkxAbcg0IhPZ0xldCokak4d9K0Ty1SfOyfIt6mKGTDolRVzA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.1-nightly.20200111.tgz","fileCount":156,"unpackedSize":989584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeGXYeCRA9TVsSAnZWagAAwtgP/RboK6cXe+kKujyd2v1w\nfXvIgay2KOlj+X7ggiPm/14l7PDEn6Edi+pmj3VrpqaIEdjn76K+MizkbOoF\n2dMMs7E7bN5TrHauq/roioi3oRj1TY+ZrF6U0GeEOfzSikbcdD7hTn5+Xcq1\nsofJznJ99l15+V4PMeYhxhY4U8boLs/y3LqhOtfIEe/yCO72m1y9GzF30Aje\naLNWcW+zTSNBELxV/BcaO45+bXAS9ZavZZNodSXkqmFeMyWwiVbHoOvdumoL\nskMukDbQGJrN5iQhrHBeAVC0t68drF0ewIfzw5cbeY1nhawwUeeTloWzZ+4X\naOtQe3lIsQEaEQ4hUXAA74F/1YxfQYLVB3um7XR93Ak5Y7r15B4MKWCYPwqr\nq32eM2lA1Scie+BNzZQlY0kfOR2JItn12uSvaU5uJbvnPfYNEEYKlNRSlGGi\nuDWxG3bvD0SZb6QqRiMAWB3zUh5XZIZn+aQsM6B+XijXuDtZ4tfGrAPw9nVL\n3hk+ZD3IJ8kz76rFQTq9RbBXaVAYrBkSP6jjPAUoytKpcZVYdhXsg9Kdgxqq\nwJU6UEXL4Q+h8qDw6hQGAobiSQ7LCIleMc6qa9fv3dLS62ehuJ1JYG+/vNJG\n5jRT3DUHav5VPz2XXfFB2fLQE694a54Hu4m6CC8Hw4nzLA4BglrzPjyZCwPF\ng46Z\r\n=ydD3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIErQ0VUciS+8SnsiJDEW/9I+6UiJFMjSqpaAl3T5A309AiEAi7UbgB+3QOc+92TbrmBi4Z0XBhFj3TgIy6if3iu6Z6Y="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.1-nightly.20200111_1578726942028_0.10381255153561741"},"_hasShrinkwrap":false},"0.17.1-nightly.20200112":{"name":"brs","version":"0.17.1-nightly.20200112","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.1-nightly.20200112","dist":{"shasum":"37f48a222b87b436f97879621114864e4d139629","integrity":"sha512-vjsb4Ev2twJT87ggCnrq6wGFv8/YVyepjsEATdoDlu+B4y0eeANMCd+Fop1ymJqnCVXYyMESZVaMBBVG3FxsJg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.1-nightly.20200112.tgz","fileCount":156,"unpackedSize":989584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeGserCRA9TVsSAnZWagAA88kQAJefpUYEVB6H4X1dxXsD\nWNfEAOOryNk7hWLNzBPPEcvHazZTTOxY3Be6jML32CCiwAzyln3u5LpHAYd5\n8MSknYz6rNUF+o4GgrzISjL4gNt8mexl2Mc/pXDzGgRPKILcqhifdTzweduL\nJo8sPvwKBHMEiHLZVCKxVmAbenuwiI3tKeuiczzVvR+fILe0IYrhJ3CZezGP\nn3+sELZut5gvY5veurRFDHSWAKYgCNlZL7I4KYBistzMFTiPzOCImuAv84/I\nLG7lXGeLVQrdr67SCRoXQfHUqkq12mq4Tu096wwSEzB9RnYdUkLf1nq1XgC6\nefcDc314sERU2B8lnkaOuaDgu414zd/sg8LgzezFy/t0s0+erL4XjkTttJn3\nglunh+shoJq0EUagW5EgBJEgqW1iiDImJc+KiSGY8wKeoX08hXDBCLE4zZ22\ni7xDjifCrMM1mfAUZXqA56egbqjr6S4sVUGmg2zhkwuTofaz7uKMx0Z88zK8\nw4oKCv8F/pSTDenLzXT9HE/urULuABrS7kYgdfrhLheQMocVanrovLm9yWs8\nUcp9c0R46aF/uacbTCni9KmVzR7KW1paJquPkxge0sP7ekFjM7+EVOgEpgaP\ndlwWINro29sphry7QHBWKY8L7kEApq2Ldv7p6xcneINXri0UbyaSs9Hjw4sI\nNcTL\r\n=2xD6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD01rPIQSsnijJoiqPQyQqgm5hzAKLE4loajQ9aJvAgVgIhAJarIlZU5xpJMb6Z0QpnGBT78n+Z9qbmt60hsTTYZWGu"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.1-nightly.20200112_1578813354458_0.9773332446965872"},"_hasShrinkwrap":false},"0.17.1-nightly.20200113":{"name":"brs","version":"0.17.1-nightly.20200113","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.1-nightly.20200113","dist":{"shasum":"6b86d2fa361cc7da4d910f5ce6c1374df2326093","integrity":"sha512-IXJJ+p07/zfdYGghc6D2jarABc9wceVr5Ivx1B1dhQBE9+lMBAn0VYLpBVKYDa+YSk3uZdL1VYcl5TLzswMkqA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.1-nightly.20200113.tgz","fileCount":156,"unpackedSize":989584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHBktCRA9TVsSAnZWagAA8fwP/AlV3BQN5iPS3cgBG8+M\nmns0MEVs8B97z3OMQsqGwOu8mlCHki7FLC1NEi1hjmAkrt6MuCM5954l2lly\nG27e7RrZDGbQEgpCZvje2vkXRpFDM2xl/C7PgmA+154kM4Mj+6PYnovRS/pO\njnz4CzZBKHwDKiRcK9KaiLQ1eQbh/rmdryqkGxQwZm02MF9ERcYHSYkRVV8I\nt0eNXAwTFlG4I533NKOCK2mSyV0yTMjppoxDN1u/n66yUucTGvMhYUTkN7dR\n6t20amwK2anV6kz+8cCz4vU9WnisKksFy6MrGBEM9oj+a12VH3sgQcuwhs0a\nAcnqGOLORpKBD9NCQi8feh5gH6LVWIjiF62Pq4OIm2nEfcmiP8hmx4c/RwMh\nEY0szJidx/JonCCRizB/zNIUaC5Ih4KDrKb8YygZsS9MMY6UfN4DR1z19vyE\noTQHZrvl8PrA/RYhRKQy99Y1Kt0WVtb0Fo9pQo+o8VY/2Zz53hwUva7wMrfw\nxlNREiKr3Ve8Q6kDDwxEphh6FRhWUzW7wvDMYkeZZLdYz+46kO6MBlpWJu4v\nTcOv8BsMRmT9b9n/1Qtbf73d8+wZu+C6U3vrY5xH4/vqGQLav2vfax0XXh/f\nlJvYi3n+9Mh0vsUuZuKPaYCnU73YW+8DilM9FM5W/3newC2Xd1WCMaDt6Deo\nu4gs\r\n=BZGF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF/ocSjn3TdrAgZ8+ukjo+2NjwaFG8H0XLQbZaJT6X70AiEAyim+FOlDIj3A8j++Izbu5QNv2QXX2OsCDbUGR3PXi5s="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.1-nightly.20200113_1578899756684_0.2394098189418583"},"_hasShrinkwrap":false},"0.17.1-nightly.20200114":{"name":"brs","version":"0.17.1-nightly.20200114","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.1-nightly.20200114","dist":{"shasum":"dc5ba07d2b96cf5322391020d59d66083df69a68","integrity":"sha512-L+2hBpyFXDBfh8WczYNtpLMUxMmMp+g8Ht/gMv7DDcKY5Sjcr2jUUkXjvNVgCBF0tUbnyxgcz0Bajshjn5J78g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.1-nightly.20200114.tgz","fileCount":156,"unpackedSize":989584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHWr0CRA9TVsSAnZWagAAI7cP/i33KOhSt4X2u6lemZti\nE3MC3w5+sHeofyxjKmf0DYNA2odp9C5spbaeGM3MSlu8Lsjv2AIp4ZLC4t9F\n+J/rSGERoWodszfaOxa85n04jymGpVqoT99splkbI5cBI6oc5SWu+WYM4CXr\nmTzQiUDt/nroBL73Rdbu3C8znCfNBt6qz19aHaKNb4gUMm7gkw8/zl9lSUpH\nWgzeFRHKLAbD5qS+d9SpGvWK8yGikqZyFOXyJJwTsekaeN55laU+ikB8tW2n\n/nYC3xRIxx//dZr8ShRtj2QD+pYUSezsW3EcDsQkZ1uxdAqBcI54PQtj+zBk\nzPGu6dRytkR6YpklSoUcRXJwX7camMkFiF+ROQYhSpSt0W1cBW2398SoTiW4\n8b0kU8TH11+QABIZSOvrCibqktSXMtIsut12x31UZ4TqXTdX+h1iLZXeCSs0\nyPW689TzAEicVfc6dD6p09MIXvqPieubi2quezyBkhM0lC0kGkibHtZZwq7S\n+dHfGrDfpOhN5qWpffQQJ6qTOkzuPTxaqvE08fOxT1YztUo5h9MRwkXX9/yO\no7xNdNzW66Yg4L+xWlm6Ot3dk0RWQJ5rkVBgGvn+q1fNs2PREWBlUdZExjVJ\nt3urPhOUf2xFCZRrTOJQeFYUgrgrmbg5ADT9adzSF+/dvKq3xy5p/0ocrEIi\nojy6\r\n=ErRo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFIcyww3jh12+2KwPXYhNASOw+gQ6HiC+nk8arvlT8dzAiEA1hNoaZ+lATFTcC05E8dwRvTcOhGdGmJ7DeknrsWgdzk="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.1-nightly.20200114_1578986228140_0.3102477991427157"},"_hasShrinkwrap":false},"0.17.1-nightly.20200115":{"name":"brs","version":"0.17.1-nightly.20200115","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.1-nightly.20200115","dist":{"shasum":"72b91a8e21b85983d8cd9107790331ea1860d9f4","integrity":"sha512-Qi2Wy7c4DVJPpQwrad5T+s3X5LxS5fue2BiHC9lSvDgGabuKBxJxIDKUzYzuhyA/MhfrmqoGhFrJY35k0sCjew==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.1-nightly.20200115.tgz","fileCount":156,"unpackedSize":989584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHryXCRA9TVsSAnZWagAAsoYP/1rTsw/rszjU+33eFGGw\ntaOtaxmonmr1VjN0HENIg16qEnE9VBD18SpmX76db5PUm39ThtW9CRT9/OlX\nL2PnKjszAyQWfMuAVIHlj6IO+JPI8UmaVD3DBfeNy1LxnqF0DdIDrqdUpR0H\nxOWAbEi7q4EIeKgD/pbOh00uVv7R9ksp5mUprVxvaWKulAmg3U0O1gPcfWEs\nmN9GJxs8s9ObNEmpcvzySpC6cG4OJGQU+r2PzfVK1w5s3swJmvr/HsCj3IFG\neSFGBWsjy09vxNnXrGPVkJBBq0aumJEOyrUwFYFZZlOcQp+crHuJ26epMZtB\nnWB1IRSLZAwQ18F0/Ia/3hII91zDmI432/Hf9GB3Rqx1IDgP8RtLq+YP0F/P\nzHL/Hcd4elcvv0+nkkXB+cCRCv0wUqmNrZwTexDYWUgSiJdj5Rn/QwuloY7t\nsWaU55cBdcjUZDer+3LCZJR0hmBKZHzwHePzJKG5BR3VTTYfJ2eiajiTmhKD\nGc309pLStgkMJlLTrLR3FpJYlgkWoMJNYt+45lmlfPgB/seTp8yKLalbG9gr\nnqiYRJ3GkLssAFYPnu7DVAucHpzOFZlLlhj3JqYlaR3JhS39TA+aazn+Pe04\n8ed2tuT/NU5yHMZBzpwFNqNw+RNLtrdeEsJ4dwe4QnUoqwBnp1lnDjHLIIpL\n2zBX\r\n=V6U9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBoyPt7MxaztmwxPUkkkUIjmpx4dNMswSeyKQgZ6tBS+AiEA8kK0LPxWSLttRIdjHz/HRUsvcHFKPcvwSX6xyIouj30="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.1-nightly.20200115_1579072662499_0.25783473383562905"},"_hasShrinkwrap":false},"0.17.1-nightly.20200116":{"name":"brs","version":"0.17.1-nightly.20200116","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.1-nightly.20200116","dist":{"shasum":"9a51b2557c51e8de4ce9c6f1b31cb8af8c8cd709","integrity":"sha512-Ns4APVF5YSKyqVPTv0jxZyNzshGSBujGlA21dmM9oo7j/FALTq8TFWg3dHh4BPKjzYy7U/ddhwX3LA/J7fQ17g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.1-nightly.20200116.tgz","fileCount":156,"unpackedSize":989584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIA2qCRA9TVsSAnZWagAA/LUP/2/zgs3EGXhJNucLN6E2\nfepDkxP5YqOgkGHQh2iphVOxaeg/WCPoOWayjJl7nu2wU8rOcyTy31zvstES\nyRQ9cMcL+hPdTPIbtde3YQ0MQCdP+BJonZn7OCW22zxoitrCwwM2LpBP+cZl\nwypfY/VbSa5CMd9JUsIUGpMzv5a9FZoQbrqff8rdfgcnbAZduOuU3Vg8O55/\nxu4JMruvV1rWkm8j7Oo0bD0hA1DY663zeAnewJM7Ko17f6eByM1iPuRVxxLU\ncnGDDhnh4pyEoil01C5EdtY3lPCn5oyMYKCBnN957nX1JlyXH3q00XDdYCjI\nq7tS6p0eMVPzDycLRF7My5yix5DVUTRj+0FuhcFfWM1mIIS5eCoWqlHqYHjy\nsN9xJo0JysN7GFgL1s9PV181RD1qQt2vKFTCueiZIFbtBZkfySMX1t4kbLCG\nQhDWSHw82oN4r8Bzem9fO7JqcrOTHwRaPhBsumd8hVINzIPW5jnuPmcQlqKx\n/ziW8AtE09CRzSQHBQWFPdf8bYokegpAG7duCNkQW3tCAXzc8BocObKDgHaH\nCNQAI1lqeW7eny13wP4hJ7OneFFu00YyMvxdXwcArQBUZN42gYcXe3Q0hDGp\nad9/CazcOCnK+E4aepNeTnwTn9sALt3yY2yufsdetm1dDsRAaIi9MuhHfIda\nO0vi\r\n=XHnw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHYI32nNJo6fTC2lPkyu3J3RPOCoKTVwdE3Je/HJMckJAiEAwBAUmPi0AAg3F85gPWUg0l1NbL3H1t/oe7LEyoHMy5c="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.1-nightly.20200116_1579158953995_0.1337595004159673"},"_hasShrinkwrap":false},"0.17.1-nightly.20200117":{"name":"brs","version":"0.17.1-nightly.20200117","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.1-nightly.20200117","dist":{"shasum":"869a841ce31843df65e950da0d47ac7b1786b74c","integrity":"sha512-C68dvH5RuWliq++qLePJNb45EePaepQw+FNNVTyPRmADKcwUO10w5xwDq8uXQmVc9RKiWx8I1DszP4qS3Nzvqg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.1-nightly.20200117.tgz","fileCount":156,"unpackedSize":989584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIV8jCRA9TVsSAnZWagAAgxAP/3LSDH9KV+IkA3Y2AK7O\nfQFnxRzGUB8DfQQYCtEV9i4KScjSNDkd9ZeHnnCCqxkfOrlC6qGzYze1AuMn\n71770GCHdURlypDktbXnm+O2DcA5F4/4xLBSeL62DjDJk7C6KGV7smKbaGEr\nmimiMWG1FxymZerEB9HPY9TY5pCEo9/IViX3T2ny4He3LEfthMAsh4BsYgor\nwNr8zTXBSqptLHaPk3Nwl/DRMZRdO4A6nnsUiXL+CwncvGjjI3n7ADw7YUOM\nLTMxi4ItpHKS2eeZNbOac0k7wYTTwDH85zzjpFffpibU2li2vXrOCYL+xFeK\nTngTermj6UbYbtmYohdG8UnXdqJOPiJ0+j32p/GCGO/CNayMTkQeMRBqitHU\nqaeNd7wkk+WW8qwA2io0IqSfJ5bLFvCT44QG4cbNACNQEzBxbjRCC9pwfDS7\nAKzM3QLyV+P/g+7gQ4lGi2XnR7xZhGGawYlBnwai2kTNy0vlSojZmogNp+HE\nbeVGftWuxlvw6r4D34nHzBuQ5Cz7XbipUCg4ldBUR8+XiMPzrrFxwjRdlWq6\naPXhEFmh9qturDuV66LIbR495eJ1/hok81KaHQywHxY7R9t3YTP1DJNdV7Pq\nT9KKlL3lHMPcfMgvNN+2aKuul8K44rAQrvNZ3hVOpAJqi11qnGkinVjOlCfd\nOPuo\r\n=XMaB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDMAVcCvHnWB8DDklTlIUyYujF10Nw+bvRhYTz199hewIgCfINWoq6W9EnW0+aVecu3PvyF5/+amTRetPq8PgODf8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.1-nightly.20200117_1579245346668_0.03490253457034598"},"_hasShrinkwrap":false},"0.17.2":{"name":"brs","version":"0.17.2","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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) 2018, Sean Barag\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@0.17.2","dist":{"shasum":"dc2eff1589144254654f366e0fe147e23986b03d","integrity":"sha512-6oDRoFjY3oC/1z3t0+6gc6TwrcLc/LlwmZSGQB6HfPWTN9lxEUTjUiz5Yo5csqbPi0tQkuC9VyLcRidBzXVVjA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.2.tgz","fileCount":154,"unpackedSize":989203,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIj2vCRA9TVsSAnZWagAAJ+0QAJdm/+/OjIe2prXKMexr\n/aQ06tocsynyVLV+haxfk19j658yKSqkljT78Z61PztU3nHYcj/u/m/1zfLc\nZKDCoRnWWXb/NFJVvNkX4HVVfJqhImYlrLojkNRm+FH+0z0x81wUQfo8MBm8\nPflQwi5DnPy0zL/GG0f0/UXklKqSdGcVryQupPkY3LTw8VbL3lz2ut2ivZT9\nXtkM+6Gk4itJdEKqpRs4EdKelJONbuTMgGXeZCOeIAJdi9sI95QNUIkC10U6\nB634AtESocOlCDBel1tAUgoEntcbOQrlb4cxM6naAz0QPTyJ0Vt5UsrhSWVt\nTwQCgfC6lHJ2ax0dYS+ojcDfQVGiWoIzKZJvo31L8Klo62Ly5zFMJPumPOAv\n0iUpJaOvOmdj7s8BjAuHK844KwwRvnTOOwadlosembURt3vAVStGOk4EEILw\nmUNCBUALOXaRBqZBjjl1CN4Sr+ykisucFNpOnEcl8AamxOhesUtb9yBQXsKK\nVc8bqbs5KZN6MMVKBsbFm2HI9K71lSvULyQMj/1xpDhII/fMJO3zeBs/GHUz\n4JTWp9NftH97gjeOFTfEjtg/nes0uqTZLoh9r46huve44r2FGgk/xebWzjAE\nMrTEqtRtuW7vK+za4JjJPBGp9hwCuR+MiKgwS0r5ugfNOwkgY+MeJdx3Qu2n\n+sl8\r\n=awsP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGTH8y/VIBvLVi2XH2jDg9Wn6MJGWY1bJcF5kyv/uPGSAiB8oExpnaU1zbZ4Nih3G2dvGr9bgeEZ2DTRjTUbd+o3nw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.2_1579302319288_0.865023312029269"},"_hasShrinkwrap":false},"0.17.2-nightly.20200118":{"name":"brs","version":"0.17.2-nightly.20200118","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.2-nightly.20200118","dist":{"shasum":"0294d83ca1862f4ef45b8b94366e3a5998814c1a","integrity":"sha512-AE00EkVjfkVPE+sqeL1PHeGuUpdNN40dG74LF/JxGH51vrhMjjEBuUZlT/qeUSsSgoUDtjhqJpH7/7yaIFEg3Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.2-nightly.20200118.tgz","fileCount":154,"unpackedSize":989220,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIrCYCRA9TVsSAnZWagAAXt0QAIbj3ButUJhkS8Rasxwr\neDoH8oOtmz5wdP1y+aq8rIvp9bbD3pLD1XwfJCgCfTTFM2HHeItulR+FcXiQ\njYjjcApJpNWcHMDvxsXFvq1UCrhYsePamyK6dkEZ+mJMqOA/LB2n8GVPldGW\nvXBvlm3GJFub/NMmuZ630vIjLHWrqicNOhvpbOgrz6T0AOh6DXGPILHw5EIb\nphEpN21R8QLT1iY+0nCI+alIEiSrmyR4qnRLhk6vLT1w5Ys7XYGToiOnr6Mz\ndkxKuHr6+7IQON2VzO0NDY72phTDrVuh9mVb6YG2xMhsEIqG2qdZnTYrDFtR\n+QmDAILaN1LULgVE1pDtaueDcv2BpWnyN5iRhnMVogLHaizvi/TiwLxoO6zq\nyF43cgdqumifHqxQIFzRiBRLkumSPPHgM8UXVnDmCd9KAbR3B/mKqhgJFyba\nwEz8GfbBAuH+6hOSpifdO0Co3tQYTznyWHNLf8LZPPH12vSAxWnCmvKTcTYB\nzLB4i5ih289juzebFJ7UBgx2GHVwTMuhnyXLW6mVF0d6MOIJUI3hnEyy8ENr\nxC1xAdXN7VzejtOAMHpYeSmaDWH+w2YrLBwhpefIJx7Hbt6IvQitMcVi+F/S\n+6P8LhuSbF5R+MDs8E7Y0gT+DFB04540N4YGg1kdfFCS7JmuDoqH/JeEVC91\nIPJN\r\n=YieG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICG5OZEHJ3XSj5HAfrlRLR8X3A8WWY5I/9sWcuSkYXglAiAY8w7fBTOsKY3vHoKTp3BpyzE3ZAFLQNlZWdPgTAGogw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.2-nightly.20200118_1579331736088_0.2153302056023929"},"_hasShrinkwrap":false},"0.17.2-nightly.20200119":{"name":"brs","version":"0.17.2-nightly.20200119","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.2-nightly.20200119","dist":{"shasum":"df7abcc934c03cefddab46a217051c6534a62104","integrity":"sha512-ohdDFwNdP4dv26dA92bG88C4ztTX4axX13j32gmtC2DjGuG5llI4tCdN9FBPED0v7JvJHUiZg6I9GobcnuxmbA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.2-nightly.20200119.tgz","fileCount":154,"unpackedSize":989220,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJAIdCRA9TVsSAnZWagAA6VYP/28pWUDmECNWtBZQNajw\n3Ns9ShYL4D808zEYgu0s+O28BNqUdab58CFOimV16KV9ojPEqFdilCvn92Ec\nuCgoBHLQ8M2RFiGbYF37sKygQyMhsmAOGd6YvG6z8QOvVC+ArKBHbpAJS/K6\n/VkF13o/ESdiUBWZqYfbIMcnPDS+TFvWUUTDym4SjTftv5oegypRpYYGSvZN\nXp3MUYdwwK+vOBciyiPXOp+ikYsIBtHBpBly2LIRCvvLpkTIbsLebzDIUIMT\n7CTaChj7r19LSTLvt+jWNI7+klipYrqB0gJcdB5DpW+6DRo4aV3Sj+fRoG/0\nJqzV9lNqyy6Fiq+//4vDxCPJxDoiVPQb+J/c21GF5WgOIYC9pY03Mov5SW6L\nuDJStSXVyF0dw3t/LytLQ3i++Yo4E/KWMpzKR3Fhv9o0DET0QeKiB7Ee6y5G\nZzmT0i2bXVN/+9gOvMIQpzcOBO9KE0P1nm887j3QLxz+uyvqV+cBGrtpJwON\nQEhT+2tIRmU92ZSNW0QvdJepXG7kx7JV9ACZnA2Hl3CGhG5frHQPvvA89pqR\nCKj4qd6OeXBZQAtJViYTjj/wUfknYisfoGR0do6xBVHssYa7wdB+zuaFlasz\n8f26IV6zpp51WwbOXU/t3XNgJJYDECgTAf+C1EIv10caUyanULLLrLDc0b5r\nOy4q\r\n=GVP6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5v+EDimFgYRcGpNJxqZbThpDkNG32I0Y6U+CDWJ6AhwIhALO6vs/6Ymz4qXf0EnAj3twVPUOwjXNGT8hIlGkr7ovN"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.2-nightly.20200119_1579418140237_0.6233854213561201"},"_hasShrinkwrap":false},"0.17.2-nightly.20200120":{"name":"brs","version":"0.17.2-nightly.20200120","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.2-nightly.20200120","dist":{"shasum":"00fba7f9f778b2aabc80ac5fb54f5f270917f6e8","integrity":"sha512-xbHDIaNbHHuc+bzUMYfj0+TYUn8x2SwtIffUFpR4Epr98vdxKFBthaVXTmAGfXzyvk0RrQ4wFBL9Qd6e+US+eg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.2-nightly.20200120.tgz","fileCount":154,"unpackedSize":989220,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJVOlCRA9TVsSAnZWagAANfoP/3r7hoFxf8xXEHgd025/\nazKVuDEOmGT4aLyVNuvhwpo85uSOEPYgtwZ8+R9D9KOC2iF6Lj7DHat7tin5\nCdZp4a34KpOEbalXiM22Ie7ThIx3Txeib0oD6Jf39QoJrgbF6M1uj2cnJY2J\nCsmZEKyGPulbThD37vh++cOFLRD3/Ho504e7AH2BO2rO73V3BkICkiUERWCT\n/S9Z/LvOYCG677aGKVGtFA2NSW3j/JBW3P+/Sho7jjSj02gF1Q/Bnx4w1KqH\n8N5IQL7PTWIs+lv7r/zmNov2tZ1Qt5xFqkh8Vc5O4zwypR/VVSKnQ2qbJnYk\nF9cWIR4rkWlY/rtrjdfZad9EttlfQKGIBtec49xZQpwf36wxFVAlqsKThUpA\nMPtbfAEVhlmKWsJe0e3en6bq/ed69/uWQBQXc2dS6+dohL6KN3NFs30WTvp2\npYlHcKQoIWNwlYUMZ5Mg/HOeeFk+HuXVR3V93A1PTaxteYmzQ/GAyK0LRdc3\nTHGkigL9+/G9WOqICqXsN4EJw2ijJaeZ1sNai3OKRwwvM0WVeoUscyfWI7EH\nlW6gk0gti1tsfnGu1WH9rtoQLrqSZkvc8WTZ7fnGw9cXzXdnnfZByktVyziB\nMVu/U+V82RHqJWjtgpr7+XiC57HSto3TlA8fNGmeRBe9yOzSzKM8jZPt0rx2\nIcJZ\r\n=KTfY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC4FA38/p6Woc6UOU8KO8sL72loqKuo9i6u+tyAKKkdQAiEAoTSZfhxkQXX0D9y0TDKlsqlb0lWsZrHSBoqSfsWF/dc="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.2-nightly.20200120_1579504548703_0.39350734791702724"},"_hasShrinkwrap":false},"0.17.2-nightly.20200121":{"name":"brs","version":"0.17.2-nightly.20200121","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.2-nightly.20200121","dist":{"shasum":"0747d46140ae5739e1797b910af8fec96ae1a477","integrity":"sha512-44eeQFUyzhq15CT7Mkyr+XbdoJOlYZhA8MO255xV/qkEH39u03uRsjZTsI5zlE7aH+jP1HClVE7wGoLuS8CxNg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.2-nightly.20200121.tgz","fileCount":154,"unpackedSize":989220,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJqUkCRA9TVsSAnZWagAA1ckP/RiDoQKo+3dS9e7oMS9v\nZ57xZhMARYN9YfPef52wB4b5bGH7R5MVOkvr0a3wjUWO1msJxTe4P1RzHIq/\nfxflODwq+ZV2A6m42jHMyIjDx7h3fAObvVKxrr3l2RFruWCqabNTC/I/DSnm\n3nzxDSKSt/XU6SZkTNy8aBygDlsAIWfNhpWkpTZIxAkUCViiut9SYoSCplMV\nH/h6Kqrb86I8AhIXvdlZSiALA4RlF1RRM40byMf6mKBFTjaddgHWZjxoQoTz\nM9amKTyyQjfVhBRLWPNN2puMJoRH26tjHu96+uA7dF94GMpQH3LsKS2GspgD\nkSBnpkr/87Z1bQ64g9DFF5uyw7cs5S/iYOFJ5oShcKKi1B13lJ0zMzwcOC4b\nfoNDz8b2ea+EtGo+G6dQES8vl83zd5hiedy6hKX1UzgE68Ud28tkVZmiXcyS\nQRu0UG8IG09LLtGFo5UOUo0zbmKTQMR3bQbvQ3mP/cpYB6vSuOXOhpbuOHPs\nH3sRkWpdze3JW4CkOsqS25yvcISLPSoCDp++klwXn8Cv63mYDh8iO9GGcPH/\nNhcrzVMfcDWlYYpkT+2kA3W0Y7j+hZAOS6pfKn0o2zSqOOt3VMGMfN1J/F1W\nXguKtDgEfDKRgQ9QgFQ3qwWpKQq6O3o5bjMQPKpyb94atIVqQmPSs0bkupVR\n+k30\r\n=cUpA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCRn7QK8/XqxhW2lZfVkPBe+ZrW+QmfTcTZBkugT9bbTwIhAI9BNZTkXAWHyrbeEV9J48EuD3tX+IxrBIcWhR1Y2SaI"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.2-nightly.20200121_1579590947518_0.46151415118226646"},"_hasShrinkwrap":false},"0.17.3":{"name":"brs","version":"0.17.3","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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) 2018, Sean Barag\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@0.17.3","dist":{"shasum":"a26d2ebf6819f629e5b5e88190b95d23169b9b22","integrity":"sha512-vtPc9p5XiN5rbx7tKi+ko/otdwJ2xQKbPfQpNiY2iSgOnbGxrABfMBOIOHE9QvDikK80FSaWxfiLThMDlOmnOw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.3.tgz","fileCount":154,"unpackedSize":990776,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJ4y6CRA9TVsSAnZWagAAXlYP/2Nv1G0Xmq+d+Xg3gGoA\n9ah/R2vHn6jdtxixB2QB7kZ0qMamQ9T7EqU1TMQ3sLjdD+LLsxkj/6eRy8Oz\nZ+scNx5Fex+aPJx8LHed8GXu9T2FdmoGNiq3GB61MPOvl7P1iyxpVSSx+JFW\nLYephc7tAoUCidAEOoSdCDZkpz1rYfblWbleGWLeKE/UXllBJngAH2/CFH/x\n8CGVNLocgPRdXF0FLj/b4OP6cQiwjOvavo5QIApocyxu0mMSGbzQ0jaG79Kq\nyDkTGVy4A0mHw7GPtI6S3ucDrDdCMU+fk4zrYwcysiVZ3QqxJMIlOxrD2WrE\nAt+G5saDLlrYnJ+fKvPMmgh56J3ab0c/5ghlovMd/dRbp+aQCvfYTfU20eJB\nusQLUmjy0M0MLGYquAiaRA8vyly6+C2WfG4Nc/HJHW0t26YOUsJLniGQmRDp\ndBomrfE3H4RRhOdG4q86+Z43bxoLj5aPIbLM0vKd09rv90r/iMyC7E8Yn9PS\nPBuisDsh8q7IzQByPItMWBmmyor4yJiXZXp1f04FikwRADNwMIK/Ip+SlQ8P\n337Uf24GOVXI38gdpKHjRhpmeHHOp/Yu/HmWCC6xgIYVG821PEsVfJ3T7U7X\nfYOkBvYDgMCdmjWt4mLSgepFVazWWiiVt+bo7+COEOO306Mzeda40Du0xuEH\nBZC9\r\n=jcEh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE3DCE+0VbfRyZA2MnU2cJGYClalrTuLMcQEHnd9qzqbAiALmIc7ScafPPRQXeH8aGGZkB67ccI5EqPlhIQrZgoKpg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.3_1579650234125_0.8278792506329922"},"_hasShrinkwrap":false},"0.17.2-nightly.20200122":{"name":"brs","version":"0.17.2-nightly.20200122","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.2-nightly.20200122","dist":{"shasum":"7fde745aa667e1e42951a196e0dfd609a3bcdbee","integrity":"sha512-veGA0fc2A50rYSPLGXzu9KySRVl/TFtxEH7YTFetueO5yJNXKqtNjtQ1eLfL73O1aF+rXPhwnF3eXrbLlOJulw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.2-nightly.20200122.tgz","fileCount":154,"unpackedSize":990793,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJ/ajCRA9TVsSAnZWagAAfJ8QAJudcWZVktq33MKjyTjS\nLJdo18irukGYMRiYwrcD4li+xZKruLOKY6voDzdKNANstMfCL1wWnTfSoHhV\ne11NFoqm6WRS2PUQhKbp6JQPK+mvjnvcO2i71NiT3RlMSe+ppNV7KQ2plfRE\nVVLzDjPghOiM/dV5QUHl5H3wv9aQnK5xB8s4kJ3WW5+n3trEqht1xXGFsANF\nvmTb0VEE5pn2siY4slRcadviOZZkSCeG1U6OogARrKTAA8AXzFCLKQYqfChe\nZVy/iiCSa0dwj+S9PrlNKLidHXZcOYnpbQ8KbLnW+jfsYGllUpoqhjkwNpoj\nLnMqHidUqLGK3eWO//AY+0IV1eOiv1t3qOGOf93eK++NXRr6yuhHCcOBMW6l\nXmzb0A9UUcHuenWBa/u1lMM5mqywmUwxTy8cFZS59DIC3mbkzO4tN7s39yM0\n8iQvrNg8e6pmcUD4HM7KtHfbzXZYaSpzVnUzxh5x8ZIYgvEa0wYgJ3zUQo1o\nUWtHCZAiSijlOTV0VlirjYe0GzsRNtWAqtSCM0o6XHaI0CON57Lwh/bwNatx\n0QKxTTLlyMLRjvdAUH2l9maeKM4Hp7ZWFYjxaZRfR4isfJTNCP6jU/cSTaTb\nFFjYjuVViGm4RWRUrR5io9ihM55i0ADcunC4kA5AYTmViChoHL1p7wo8TATJ\n5FWz\r\n=xdKA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBnjUPr0xJAX5hdEVWvyKAbSTb/vF09oevdIAzbEegVQIhAJyqEu1CBtAzuwlSmMsBAPMI6TUNQ2tnKGA89bdMzevs"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.2-nightly.20200122_1579677347035_0.049209769521147084"},"_hasShrinkwrap":false},"0.17.3-nightly.20200123":{"name":"brs","version":"0.17.3-nightly.20200123","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.3-nightly.20200123","dist":{"shasum":"e07e25b1ab4aee11749c7ce065814a31986aec3c","integrity":"sha512-lb4J90Kw3t6uJ2z4fa8LYUmyK3kOS0ofZuRH5L5wD2pho+jOrzLN4xdJA4O8df3UKYDDZhOwvNj8T44H02k3xg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.3-nightly.20200123.tgz","fileCount":154,"unpackedSize":990793,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKUg2CRA9TVsSAnZWagAApxkP/A6N7O4OOWVbv2Na75li\nQfctDCPTCmFoaX5sYC6dbE8lg5qq0sVAfHa7SvLGhOFL1wIYO4C0pc8BX4/P\nsWLGALbCygBgv3NJM5Oc+0mncyr9tXrBXGDQZr//1CERlMT/HvI3s9PGDz4h\nASKVj8eoKHOv993bd1Hltnwhq4byYf3+sQUstgoq8dEf2qDoj2MySEEC1b4E\n8QWWjv0II6gd6WDGfyuQspbr7aqxdQ1cV95e2pDpBnRJedB/t89fn2TKQai6\nvAAY+5QswzdzejN7itOSkNBw8KmKhZHokhX9m8PV3Y2Zi5t5nBgXpGKOsp2P\ncdsXf8jMjV0UNjzv/kAAjRRKwaOvk2AVOhtNlL4AOzozLkbZLS9MFC3Dfu+v\nh933BEUkins4Q6saCf2tHzYG0VS0RcQ/qIGAib2bTJPiOlZ4E+VponZsCykx\n+9Ymxol8NO4FqY+C24BWEr2Egg9z19bHRtE7N/16xCMoZzJRldXitRuyczIi\n93NyRbs1a9K5reTEcRdMrT5MUtvDeopzuW9ww8kCVBfAuaEjBfSa4J6tsS/0\ndwljM1pVPrv8Uc5k84FIiYPFp9/ZAJ1DA/K271Rtzw5xeicI3SdT6RPq8U6K\nmdAovfiJeFNIu/fX/u0m0qno81QeaA4cWTeBPxjLVZnuGrlNsP2ab5P5sXWk\niveZ\r\n=Oz1K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBR06Po2A6RR2EKfZ6vZfDzYWk3nMZZru7YkovcUdyfzAiAKyyWQSA129WRWu24VbbvWIJ/xQRC03Em1XhV3n7d2Xw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.3-nightly.20200123_1579763765465_0.9760578209839792"},"_hasShrinkwrap":false},"0.17.4":{"name":"brs","version":"0.17.4","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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) 2018, Sean Barag\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@0.17.4","dist":{"shasum":"148b6ef6a8c176ad68a14cb9549fa1577fc45d66","integrity":"sha512-hASFOV+rQglgwbN05Nu3Q6hO/pvt/RpJtug47tjum67WCvRIAHXeCgg4cy9lDdFP5yEbAu8Tz48jeSO53RU0hQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.4.tgz","fileCount":154,"unpackedSize":991039,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKkB5CRA9TVsSAnZWagAAX0QQAJUOMej6BFIQvFPjcrEo\n/TwrcX/T6qESVzQvKVkzF/lTCD8wHkc6orKdqiVnMY9cltaw9EQUbRuYOtk2\npWi60RVsAbfYsa5dPLuqFs/h15saHfuNi9PqynAw6ruzQ1KKjH9eL/KJhsjk\n1HPPvD94Zadllfm/OThIW8mvtBQ+fvk/1VOJI/QO4YgH70eP1uoB0dHFA/Zc\n9ovOXm4XPlrbYHQOwOcyCLS2fi1Xk9ruaLekbZK44xuMmTLy3OooUjYRbZdO\npUGGEkP59CUgCGWLg0yZ0o9Frc8G2l7v6rucK+9WfyHijdJ3gSJ8grbOYo3r\nPhy1hCWoQ3OtBCC8SD2cBydy5haeUX257UjZhhJn1RJgcEYcduohfzoASgPU\nd/4s53cGlT7zAzMitEGPB4iHoc8/3/qr1crR+wTKwZdZ8EesfZ7pDyOtnCPk\nI/9fhT7yVYuRl66ID1R6NyHRzeKhyNY1oD7DskBzYfS3v4KBPhAZ3YR9tY+g\n15QXgXYXPDuNtZNtbkZptlWf/wyFqfmqZfIuvGF4kJja4NLPss0cbOBSVoHc\nVv+R/HzaxD15WhidyuBwaQG2n1RPEUz8duXEOPX9FDmsfqA+5Oln3FqPcD2q\nn/TMAQ0JxmoyY705uLUx/rEZOy7azdcgfOoaLEhXbxVTMFneR4VoMk73Sz3E\nZjpj\r\n=PlQm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG0DsXmCfmBPalm3viIR54xRggSoaBSMnnAljcJW25FLAiEAjoM9ZwxP/F16R2nnne1lQDQ6LNCBbU4b3Ik24JaTMlU="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.4_1579827321199_0.8199306147677032"},"_hasShrinkwrap":false},"0.17.3-nightly.20200124":{"name":"brs","version":"0.17.3-nightly.20200124","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.3-nightly.20200124","dist":{"shasum":"f13d33a252795fd3fa4d0abde4b22825922d75ba","integrity":"sha512-Ab8DpuHvQVgIUlECsa1lRVTPZRQ0IHdPu+Apvb1gmWpY8elV61eYWWwIMOH8Zk5+ZeBFlHP/UTphLEmedRK34A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.3-nightly.20200124.tgz","fileCount":154,"unpackedSize":991056,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKpmlCRA9TVsSAnZWagAAf9cP/2QIumRIgOmLQLtlJHa9\nnceZsKJFv92/y3yjrWpTbLLxUlpbiFRsm3wg11tsvFF8wybf9pn8uWCqwJjI\nVqlTCPJqlqt/KFgFYkHN7uUoAlvyqvk21W+3FNufaDbKfYdEdRmdPnR61+i/\njSBUUN/jh6SnEFHMW8QCVVESgBzCWMagsuWQHR8vq6lMdKFCVJvNL/JZehCU\nZ8qSjS8yRS0UfH6Gv1OWYNAscUIOMs3mru75N2rlOdAsy0rPdGzIaxjtr0UN\naicWdl5is0J6+qudhoL/+6bSVxoOvn+eB8ITGikW6O5TcGlJ/LitOQATYrnY\nImwv23IveJP7gZBPZNY0co/58nXulWoSfEiqLY5yt7pkFQDB1mvkZVEUVzuZ\nmHFbaK4YEptss8xEPR/h1YIQXjPzmhbnRDRiFkOiApFcCPS7hzKTF0nJ01Wz\nWtJB9TyLx2y+XLr5Hn/w4HRNJX8OTfys80YACl6QcaiB4PHsnCUf/GcmA68s\n9IW1g/AMcfh7c6mbwXFSx8Mj+6oJODRPX/JORZqCHEosFVkbf5cmRPbYSrx+\nEtuVO54yeBH449lvYmqlkrMsvy5b4F2A+n+TBKEB1lVNlojlcBccxzayXR3E\nV0iK/D9IBBL5dLiWXN8ssIJ5Y3dc0gTSz3IL168XFTb3zThB1SlDVDbvXwTk\nM1Ff\r\n=RP5F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC3UHg9uAv0bFF4oYN2PPM4XQOYpRXt4xGGk/kxBrdPjAiEA/62nXaW7u39otwfUfu6cbXPz/J0aA/8v491gnNaHKpY="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.3-nightly.20200124_1579850148502_0.06836138124162772"},"_hasShrinkwrap":false},"0.17.3-nightly.20200125":{"name":"brs","version":"0.17.3-nightly.20200125","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.3-nightly.20200125","dist":{"shasum":"27dfad667760c9ad6822591474fc804c67db3875","integrity":"sha512-2MCRTocIBAACITArWfvMfLyh0axGaJmov2tjdiGJ1BlSWAWUoa/XiyG7YNgB2SK4gxxqH5K0Y87G+uYkxN1wnA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.3-nightly.20200125.tgz","fileCount":154,"unpackedSize":991056,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeK+slCRA9TVsSAnZWagAAT28P/jCYp2eq8/JfyIeoPEO6\nbi1WrVlohhIxS4yRk17qkpBEoDoHe39YnNrSdln6FZwjDkSRxU6GMHKIzSjC\n9bOEA7eEkxEhfC1qYQc/b9R7fkcZP1Y06d/K/BU66K/9IbNkWkiPB9nQkTCp\nrcHFSvQ3TnepyYVNw79+vX/bD+TevvZuBJLgMRUZ4XHGa3+TRIyP8Ap0hUVa\nDIkPxjWDy/afmQVQ9CExYtwIYAvV2YwQcuynG4gNPGtk9yHAX2qVFSe++/LA\njzcgG8wh/Cv6AgAnKLHvzcdhcRwbcqBEA0aaJ9ZizWKnibJK37LyxsRxiRs7\nnaGkc0+jzBNaUL2PgInUrKDlDSNgIMiLrjOo/Qu5qfWGtsBYmsarQ0iF7FI1\n54eJv9v82NKkKIxAaSqOlvf8jnQey5DeNDlw4exm/8T4a8P/viUA/wgZM/mK\ndbQK6chinO4ixyx+rbZHJpwGdf9l8hrfoVZFhLdLvOUEDs/f04ATuN7AaWg5\nM+V+pBrzQ4EtNFDMbgIbePMAg76qUvcpBdaBoyPSlHd7ihP9rfc3DrFCNAck\nOB34U+gKJmiIfLb4RYSUeOPgh4epNezSrwnBCmi9pIZXg5PgWMuNrZOcd4kh\n8delkBVw6w/ev6sv71wyBxD0xjMrw9/GeKk+TaSOuj1i0TtcDDcWWfHpPkDT\nRKLV\r\n=+CO2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGHma82J+OW3z0NXC2fpXOzx3PknsSwX/Dtyxf0Sqj4DAiEAsRlaCJwYW66758vJRGoISVujMjEBIHPWFkXPYMaIzr4="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.3-nightly.20200125_1579936548475_0.5059195735856674"},"_hasShrinkwrap":false},"0.17.3-nightly.20200126":{"name":"brs","version":"0.17.3-nightly.20200126","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.3-nightly.20200126","dist":{"shasum":"4251c45f08fa5386f75edba93f12209efaf39195","integrity":"sha512-e6WPXPYPaZ60sYqRkRgsQD/yc8IGcICDfa2IbbeMiHBd2co77cgBUvALt6Sdz5C9VNv4Ss3QXgx/6FopjbyHSw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.3-nightly.20200126.tgz","fileCount":154,"unpackedSize":991056,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeLTyjCRA9TVsSAnZWagAAgcgP/36hO37T5zQZijTSvqJH\nJH6LAnv1LzP84PkiGQXz0Big/KlqIHBtMB7gzSX6MYuHM82R5SAKunDfWjRO\nijgXy8hIIFhOjjqy+pG94k8t8oW7+lItSJoRZaTiPAut0JAOHBR6gUJiY0qa\nm6gGjhdpcPxkES8LaBdU89Z58PkmbRb9ml6ogxff3xF5BHvc5GHrZhKyoihA\nP2m8E/j/ZtJiszRzhxpliMYdFclNVTXVFTt3nQAHLC/hJwbGWjBMXLpA+wDG\ntHZ6gnbV7qMvAAbfE/sIiMd2goJb8Uv3UGOZ4BFFKDKw89CFrIQwDNEVq6vL\n6IKvfMrHlEUr7wcdTmP0Ovei6K3Z5gW9UA0ccLrJsjwuBdGsuCVKGC68mP4j\nrCg14vsgsqHfoeVFUFpKgb5cbGM4g6AJjReJ/5acJUORO3M6YQ5I2EZqtsTe\n9vu+8s+13EIMNJGpB+4PHZzLALkBAASpKoiN+fbEF7Xb/1xi0tlOC/o/aIwI\ngywea9eGLocbebxHrZ9ZckIVcHe67Qir8GjFrsqw1x86ZSlQbnkupl4zGvTR\nedck1ey2coMubaRxgyhlpufGQR0cBNR7SfTtgeppcEmSNDAqP/lX7kKW4FZr\n751MzrVWMsDqA8DXNGZO5iEpWCJZIo8WhIhx3KTz+ewbR2YSrfV445yegP70\n7i4N\r\n=t83X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEAES0aghOtSOXfE8OhktTKUfBfOh5BtY1pmajH46de/AiBjdpvAl7em0r/q6lSF0fsPOvNrIuxSsbaIY5cxWqCXIw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.3-nightly.20200126_1580022946571_0.33998850711092454"},"_hasShrinkwrap":false},"0.17.3-nightly.20200127":{"name":"brs","version":"0.17.3-nightly.20200127","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.3-nightly.20200127","dist":{"shasum":"1e060df1a17022cbcb725e24f563304eaf8dca36","integrity":"sha512-5IAyZQSccrKUAa/KTsa4cTwCDrCL/o+kQ0sEfxlMr8kgnC1ZsmSvH8wU2EBi7pAgEwN8DnmPpOglXW6w/LrWRA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.3-nightly.20200127.tgz","fileCount":154,"unpackedSize":991056,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeLo4lCRA9TVsSAnZWagAARJkP/1DmELEXIPlcGNbmCANH\nyQMu7eKWZKoZOg3gHKAwvj2feDdZ5i2tmfx1tKPrgBCF8GZhXPtEo2VXjwJA\nwY8cemIdt/0Pc95Jwyo8rk4wOxEXO3jtz7i3jYSgeC5xg7/T97v6frdlWPd3\nz0PLaaDsakasm1YBL9hwGpQTOj2m/d9dbCpYC242Nf5l/440sJFIvijNyya0\n61r3QqiFnKiVym7p1JXl6rtpDwsoHo/Jrg/qTL0JbzXZqIeKpgNnb4Z8fCu0\nUNQAIb95dVgA0KlhQ7YLUDW02pRoOivJKGDG9c/MT5d3VcQ8xUIDYYAL/IKj\n0KSkXdjyR8XobjwDgZP5MLMU7l7xZtjcMxLmjHY5exqReO4mh73MH8nlCFYn\nOtMUZOG1eo7OwOpWFA+Ta4cYlO2+ovLrhU1XBGiMAnc6St1y2ze1h/yHSqae\nyUcJBtHHOm8F41JLKHk7kCAdQx7qi10SPCkj6c1LcSUBDk0nI3LB618Z0wiy\nt2sRxc9r7MIrKY4gdn14QNkioPJRutYMuv7xrIAmlKv8BmO2C9GfenRgqy3d\nNYT9zv6nadU7uxihQwd2HjEpZoluESK00Xk/hFmHM/pdaWFxG3yWxuzQbbbX\nopC2VjhkEuv+Yx+8dSoslnbc2aR8zM3HbD9sHm34cHHcZAVZ2gHyRSWGlmb7\nCXXm\r\n=AyxS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAi9qpOCMi6LPv1No+FLFICqVVpVoUpV8YQgGedRbVVJAiAfJZ1sgkksUIjEg19uR0V3COLUzggs1pJkcgvuYgTxvw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.3-nightly.20200127_1580109348495_0.7926933521809838"},"_hasShrinkwrap":false},"0.17.5":{"name":"brs","version":"0.17.5","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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) 2018, Sean Barag\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@0.17.5","dist":{"shasum":"8c61f609183098cae5fdf069c30e1c85cdb9aa1c","integrity":"sha512-bAUGTt1lUWsos4iK/FkggCoJH8Z3zemcnqFjgZDAVE78A4nQRhdVzw/NpP2PSEokjL8+sphSeAHZEgDnj52XYw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.5.tgz","fileCount":154,"unpackedSize":991897,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeL0pCCRA9TVsSAnZWagAA0PkP/jwuMPs0hyXtkN7XAw+N\nuuQ047heNEJ+uBab3+V7sCfeCwYP/U77MjYU6qlwJHo37ZOetK+GL+KKjSnd\nY0j5xgfsuxHkQD2vr2hvW20cM3ffQZ5oyPt7bs++0mqjshryC7f51ltGpBda\nRet1KTgydFDAhgHbBcY9sCpWnPW55zm1HG7KU88tnAyHNC7IcPC5GE5U7wvL\nlXU51EgHD3Lj5mYaXYXx1vH6q7sFM4PeEjxtvIkUM66a4PFd9DaR2tFxsiw9\nd0TAhbW1uo9H7QV2nx8/9tjqNGxvuYkB/h/6KVkMgyPPCIPPgQMGZdBiZBdJ\nSif3Vfblm98WICFPumWJg9wcusH60XiBzhgv2hm3bZpthb8ESvxAuyx/aLbq\nzdNwPBIIjdl7TEMzN/uGvq5D8OmSRBHndh2iAujb6XRueUXanfsHGNc6ugiR\nt/fsbB84ZViseCuahaj2Vb+YRYThOpmozHmvyIEDASYmsAZ+kkRnQmRdRf3w\n1JmsGP0RWxGB3i4boPMV9lhmmq2/u5Jx8y0QtVB0U0/gkBH5q3EW0nKafnGX\n33LYyfhx2sHV44rZd0pyEmmeAYHoU34X1vVTG8fPSNOSy/LayhUEND1doLfm\njFhLU2AeDAugtZjN6r+EUZ9xxwMf4G1YaLqf2Oh6lc/SGF90EfSkDbxgZpaO\n61dV\r\n=VYlY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZyVrbt3b814d675juhhOf0aJpIQz3r3QKMXpgP11o5gIhALFICGW5zAoxHrfZ8mUmzUUbcS/Lk0ptqvSrzG59SA+F"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.5_1580157505535_0.6383524036544683"},"_hasShrinkwrap":false},"0.17.5-nightly.20200128":{"name":"brs","version":"0.17.5-nightly.20200128","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.5-nightly.20200128","dist":{"shasum":"318d55a66beb085bdc093853c98d317ad65fd033","integrity":"sha512-kYV4xKh7943XwL+94H33Z+NlLbJysociXIx8M0Qxfecjh9XUOxqFHLiNDEwg3ELKqcQslAPSoybkyPQFHwc4/w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.5-nightly.20200128.tgz","fileCount":154,"unpackedSize":991914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeL9+xCRA9TVsSAnZWagAAVMMQAIm3B5dyL87uvjdO3z+r\nDe+U27sCeq+KXjz5MSJShQ5U6ALz9Glv0SGSaEUuv0IsaXxCmBlG0JO7m8qt\ntTMcKHc+C/zTOnXic7S3CCZu3zzUPLGcWaA8wtd9MaF9lFxmSN8PsPdqRTJu\nKTr+xxbYvKDTE6F0gvXhxyu1TKA0UpEWR1ZsyOh3Yqi15VXT5ZTfB5AfFRP9\ninls55Wa94hG9c6ktyy1EJv6gDuIJndnhczThJPzPxlVgs8CMK7ICvXN7wqz\neTnb7wi4ypEXtr1sNs5Hzx+ajCenurAa1aCVluL74+YQI6aTA6IAaNXxj9Wa\n7fsEVw5araLhVfjhKZCfN0OdzXGXiJXXjNsg//+z25yZOp1/1VMrOX2Bnp3h\nxoPestZ2wtz2ZWvRot8YccVmnb7BdjxYFkriAGmkwTem2JB07AuZYz888TiY\nlzs20Jes5etthDNhHTBiLldFeonUZseGK9uSFWeuwjzoGWXfM/LAFBp1DCdP\nMYyGiVM3VtLygz1wDhOyc1KznlsZin1yDKUGJHFUGtkUykH9vQDfYAKSNSZJ\nfwX5sbtxzXS03el8Nv0Q4hJFGDZhY5KDLdmFMUEq58RprRKRNswflFn1bIpi\nEwhYLX/5/8y6u0jP7G5cMAS0COqs2ESydH8BVcOXTy61hUEoGrNxPEMYUrUV\nNt3f\r\n=n9BY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDA9oNq+brlvucEA9sa1TJM9B7BU9wuVUNPjEo4liSS+wIgTSiJyIjlpMk967rGe9iRSpqY36MxqbBDPIOASccc5Qc="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.5-nightly.20200128_1580195761049_0.9433878570702843"},"_hasShrinkwrap":false},"0.17.5-nightly.20200129":{"name":"brs","version":"0.17.5-nightly.20200129","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.17.5-nightly.20200129","dist":{"shasum":"0310dc739460705bab213e3deb11d37a63b9bba8","integrity":"sha512-6qXYIVfgN21yi14gF4NhSDD1xgZc0b0HL5KOCuT57d1aif4XNS+isulSm85O04qw5TTtdbhw6Dt71JgpDoza0Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.5-nightly.20200129.tgz","fileCount":154,"unpackedSize":991914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMTE+CRA9TVsSAnZWagAAjf8P/jSutiZAvkC4QEqyyO6P\n5L8mJUkASg//0IaKwVjGski/Ii702Bj2ZPGnasvmYPk4aaS5H7qQUV2BQgyS\n9HPqBbknU4uIkzoxF9ppaBrR2zBw7oWtAHDCH+8r5rJuTmO3idn6BOCjXtJu\n3/PUFskn/IuHdQwqNAzd1qrhGnNcZqu9EmKtWS9V1B6CICdH57vbGedF9jng\ngvrJZNgTgjJojkKVW2H1VfAjIa/jjSkNiz0h3w77LuoMCOoTju3rapLYjmKq\nuLtUSJXO834QXIB1iO3SbL1rDR/tbuPLevb9ll5QqQnOCzpzqDwSWtLmC7Qy\nMLWP3/Vvid5XD4M0p6y2idE8ZrXjbax5JHyw3d4SNMGGgjnizQKRDYaIbo4t\n81s2xdIs4FXRHyaid1hBdK56xRmdcQ5XnoPlPppNcABz9kQta2WBU320Ocu8\nZu32hpLDboGX9kyixw79gF8WHZVlVRBemq3zImTi4wg9VZBUwMoPjJC2jFQU\nccs7tu1cn5QWLbLd4oHX7ynmOpW9AagkhOB9gRSwmeNUJ8MYKmqNpyVdLBVC\nrZV0DPcSmcynOU7xnKoayRoL0Za4qkmG0TDuGCfVegqsDBH3afN/DXuHYzdC\n7AkPGJTPIPTJe6Il94vBNAPqSBP329VsbTO/EyFkEaBlJJo462V6b39lcy25\noPCa\r\n=Ujnc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbNCpY/ZQdHf+mcm1uWV8asTRiFsbjKpFh1dYjjK0fhgIhAJjKh+8tWzk7kjMfeNxk6liYNqUzn1GoXFWFk29Qr4Ms"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.5-nightly.20200129_1580282173961_0.30848735066970123"},"_hasShrinkwrap":false},"0.17.6":{"name":"brs","version":"0.17.6","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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) 2018, Sean Barag\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@0.17.6","dist":{"shasum":"d1f2b7118daee3414452a3eb50fad49b7d2a7cb3","integrity":"sha512-2D9y8+RPk68XDwe7dos3uaZvSjHseP/mLCya5ECk4nJ+NjOWjWhzTBT1AAEaCgDAm9KaT7wurP8xo4f+7kzkMg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.17.6.tgz","fileCount":156,"unpackedSize":994294,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMb4dCRA9TVsSAnZWagAAXdkP/iSE+tFnRyFSSLCfe8ad\nyyeKM4VHj2mHfc/TVlTYFqEzQEV4WpTQWzbOw6bia+WQr7PBsFZaS8hIAYQu\nrCiFun0dOJJbHp8R+xgIq9DOwZojT1qiXsKxlcILs574K2x8zGM18cXNM1Rq\n55aRpgnyql+UhGhqE6Amkx5FVSud7HtQZ7MQ+DGiaa/BVFL3NMK7qd69nKgI\nAu9va9pT4PTS1o0YIMg9LmnA4SxCwIgOJ4yLjH41mA0mV//Z1Ne3niP6X/fl\nN21ubJgEz/ecgc9EetPbw78jNfh7CIvUCuRLEKC8sq5nKnGTTHsMHJRQlIdB\nGs449o3ulqLG88jiwuT2+TLmhAWah8Gn/tL12OP7+f+r92jYju/OIBnBOphk\neVeXXO1OFq8m6EWsPPmwulAndE7Mp/KWGwdz5m/osxvj/7LXHG7S4cConHbs\n76P51wIwkBxR9BfELndGZ8Hg/yLceiMlYktt/njwqJu2rFu+JmX5AOXbQGGG\nSfzdYIsvG3kJgt/EHi9mH0yVK5bAPgnhJfQ67ThQZHBoJGblueN3XW4FtTzL\njxOTl4KGbVBqSiZFWNm09JfnAfBqcj479LXZdzWnH4snSTpVVNBEZi6G70Or\nML1L0RZaemttZ77ZMIXHpFz99blEVTxBNQIhSvRD4MGwIO49QxtjBG4YCzeA\n3qbn\r\n=2oAq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAOq0UCGH7DLoHRTTt9pDAKfdHMu5CMCy52scC+F01dpAiBFPXQdcEW6rnXLf7uJmMvieDkwwezsRl/857bbCHO09w=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.17.6_1580318236034_0.8447385320636394"},"_hasShrinkwrap":false,"deprecated":"Deprecated to maintain semver compliance.  Use brs@^0.18.0"},"0.18.0":{"name":"brs","version":"0.18.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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) 2018, Sean Barag\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@0.18.0","dist":{"shasum":"f5ce319c66857b91c14f725c73f991260c37ad9d","integrity":"sha512-H9AdwcyT/t7gMVQmtSljB+bYGeOTnEdrftU7ZzvO5gY02WKGBd9+Msrm2pzQ81f2IOMDl64BqA84HlMcFT6KiA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.0.tgz","fileCount":156,"unpackedSize":994294,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMcApCRA9TVsSAnZWagAAQ3IQAJRNmTawNgghvlowaTZ+\nv98gtW/j7naBH+5tm80CxoeKOhJABp+tzq4uStKqpPKSB1Ecn9LoYIMC1c57\nxw9Vkoa0NFFVyQKsfThm6OA1WvdxgwitRlZMrydJ3WsSva2UH7gR8ZOtF8r5\nn6pbVO3afXU9D9rJYzzsZ6MgH30r6nDaLXH32I7OKZ+s/QmcY0lrEzxMRyQJ\nsdtQqHxqea59I61v4E86acQpf0hMnuF1Ab4aRgHfWkhuP+kEJbqlMpkqGTQ4\n2evLOBRaa4/iFx/a4EcH3PqRl9eZUg/N8QrHVIYX4Btg9xykdZENmTnmBeAW\nA/xY0ToUZ5ayV9FG8rrE7GKQ5NX+j+gbgptcAscjkXk5JzRtV3pCtmf2sfX6\nB9zztuLkWI3xUuvYB8AIjx87U/pqFQDa9x68LW9YjFEoedkDclXDmgMToeng\nCdh1fh8Axa2Z9Avdy2dunzQCHO67kzTAjzOEmOJiZMCc/+uXK1QSLEIBYP8I\neGdgg9TOJn3z9c2d/WdFAPWSKBBbslleIKuOybuf/DFzhpc0nM7YHAO+7m+Q\nI/rxN3HsJpUiXzfMqqnSIuwVdmQLpBBZHAyQ4uxszXN28B1uAuBse8tvw12G\nd6AyAkj1PpTj5nueR+V7IcaRD1Mn+gK/gaRlvjBGMIHDcZ+Rp/jO8+8xzWQ/\nU4Eh\r\n=bmIa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFqGrQXcZTfchjJLtjpp7jcWGvnMJOh/fc+9puusopxAAiBQpyYrCMqLLo7MiTSEDYENB1yMBDInXXH5rhz9YH0QDQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.0_1580318761403_0.2669718647722765"},"_hasShrinkwrap":false},"0.18.0-nightly.20200130":{"name":"brs","version":"0.18.0-nightly.20200130","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.0-nightly.20200130","dist":{"shasum":"8f3b52f99650e16f7e7df52cef2ac06ffdfc6ddf","integrity":"sha512-AuAiOK24SL2q9RnE4AlY/39S+79v6DGLj2pFWQpOCnBXQb5u3J5vyrg/qSFgrbL0aPSwChrHC0z4A+Goxq+tng==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.0-nightly.20200130.tgz","fileCount":156,"unpackedSize":994311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMoKZCRA9TVsSAnZWagAAIJgP/1anzbxD8Dy60x5v6LFU\nGYskYsD7ZittpPJLlP1jt0muniUA6Xi9dKTR8K1VqGGkEHeczg3O7ml6oUX7\nw8FrxvCwkGsxMIt4VhU4llJkdkPWj9kqvJEgioK1I1PvhKr+bSz3cUiRmxJ2\niWd1/C6mo0c1/EyXAkiYOGk/lMSaC3FkZIdYfwm+gTeGk6L5aVJOAHL8ImPf\nQAdCxJGux1HoNEvN45P1m1/yWXNcWujFnsnG3oXkteN1i4E5x9fKfSsShBtx\n0h87YMkiwdhoZq5Dhk9LGISU+1vhbfnh/MGpX3bdXSeL3FpdmccPu/UCO2pV\n39vLZ8eiayBsKpXy3jA2lomC9gfY+RJ8mkxyHQYngjKcraJI3A206xoqXD21\nuQdV5LnFfAGntpfWeWfpK295bOl6fQehmwEAcgf7hbuoXWdE+AxOwZnOG6Ab\nT7SslbbgqMwoCVKO39YGhildMzlVF8mGeQoEd9+XVUqjjQgnpOO5hA3nhy60\nDJxfuFWeJjRsrYYV2OILTJB5AvfqPjg4Pa7t+Baqql0mcihT26G7/JHDR6gT\nlinh6UIK4FQ3Iut2jhutY/lhPkIq3afJATqu7+kAQfbeHy1P7FUPWMNVeCrZ\nvHahOTTOwI8ERP22nemgwxLO2F/j7lxxNklpGS0TlrTUY9KBA0UnkYuiv4hR\nGDWd\r\n=fC2s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFA0muvP7ou3/f+hwdC+ADeY7uki13tyapaLLZWL/vyMAiEAqkOLEfkUush8WxUglxYByMhu+4/bRRToMuXj1r0Kfm4="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.0-nightly.20200130_1580368536993_0.03752401820074658"},"_hasShrinkwrap":false},"0.18.0-nightly.20200131":{"name":"brs","version":"0.18.0-nightly.20200131","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.0-nightly.20200131","dist":{"shasum":"68ffbb7b681780ab8a15a9ba9de7ec818ba827fb","integrity":"sha512-cq98QQo3juVWeINtx5PacqEZ/oguiXqp585Qv4j7tyZAQp1D52nsqMWwlrxDlZz8HQQ1v2y3xP6npPGwPA5HbA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.0-nightly.20200131.tgz","fileCount":156,"unpackedSize":994311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeM9Q3CRA9TVsSAnZWagAAbd4P/3BqVZZB0eaAqKNuJ33G\nUF+HTma1eZ5r/9IJG03Ts7bNpVaENJhofk8Q6/L6EbbCkhJw+B6p2IE/PsdS\nS9ZrGgWWAQIaSZJ94wbX20/TSPE9/ImSuqIDS2NbLxmpSQ45sL+aCzi5BBks\n5vqSK7f/BdzyB6UWM//AlUvbuDSkLLCrrMkUFG4fWYDeKb51HkNvb1HK5sLX\n9qIUFZsHaHuvz4TH5K+1Wr0duKpqnEwl7HpLQp5PIbARuFpHooSGutSnJdq/\nHqJdTUIWNxYubChjk/sPBlqd/X64iecq5TLEuCNVy6ANCYP0zK02tyivGvaW\nZ9NJMjW4tXrPJapnTcNBiYLKkOqoIP1tmNFGoQOABgy8S+/ap4diSq+6fmS3\nQDPBUAh9vsqLdSD7MrUoBRc456anoA90rmsiwlSisQKF6y0a+cquUvEpv0/M\nwWezHZc0vuH23Ycf254Ulq6ZMOTve1Rkl61JomLfA4bALBUMcKXSDUHAfOUT\nz0HI7HRft5zrr/9euENW5cSs/BjnHURsUdjqOqLSBWezNoNzs/6A8FpcVT2I\nfDlHBWVkdHd0nMCkxDue/G2crsthv+yWCl5Q5lrnQeu17z9fPe+IHEnTLadM\nQaVOjG59TawqOcXX5En2XWudauavXzGBfA/ao/NTx9LrbsuNYhJaSXV8RhYD\nL1IR\r\n=095Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDH44cmr1Rv1k6qwCu6LWf0SapPb0sQYfL+eEUvf6DOYQIhAP2uzOmz2FgonxOVUGhKLGu/CYyRpRi7LFfwEPGuZnbq"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.0-nightly.20200131_1580454966973_0.06591074447193379"},"_hasShrinkwrap":false},"0.18.0-nightly.20200201":{"name":"brs","version":"0.18.0-nightly.20200201","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.0-nightly.20200201","dist":{"shasum":"eb63d2a4279f163392907c4352e1674ca0f1f767","integrity":"sha512-YeCaSRaei3/gm1336dr6P9kv+e2h7VOhB6rW1LK2xOLf9T+kD2rRWRE/d8oGpp82oOeXFvQ2yOmJ7caPbHwLFA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.0-nightly.20200201.tgz","fileCount":156,"unpackedSize":994311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeNSWdCRA9TVsSAnZWagAAFZ4P/R95YEbG+S3CJQPAUJ+Y\nwxoVdH4zUqI/hi+XTzbBAhSPqr6gpju40+kLxPXCK9SbKZvlK+4YXHN0tgmK\nxRDFaYO8t/4Pm55/QTCMPdMXvjE8tplYY+FxNXb1gy4p+0Fu2mxrTEAkJTe6\nHRYQ7R+9CXrhx20rpFq4b1SDcfPTmVW/XMg7c6lK+JWjFitosuA37PbRbBi6\nlsDXAw5IYhnxzLhHG2OU5ZHDHKGjE168UFWca3H/DYhanR7JVz0ddNjhFsiE\nyCyDvtgLHPf7UKHkl9Xp0HL5bh/l/7jDIcGUROIr3DXxBR4pQPK/bNeihC6J\nef7QWEdGtaxZ12QnWQfC3u+TiR7W2bsoMBxTEwCZTKup6D/A6eZ4lvtweIRr\nJkO4Kzqi531Hzt52N1rIbXkId580U68BnEVzdzH9Y1fOi9Q73L/sLHn65dF7\nJvLZeVMsWbjis8Dip2w0Omjed3rTmelPln04Y0loP4OJQPe+rDpAC+mKvndk\nKoIQDtvi+6vQ0/6Kyb6qIIeG84zUY78yT5SilD9YpAzvZk1tI2SrAPd5t1Vs\nnkmHaw1ePohETd7e1F/E2IZSSGysAgxP3nGL0CjITvnhWuVSVaOpPdO20yjB\nfA31ETPHcNX2Vx6WviYtBTsCPKGnEGEsAywRYYm37PRCanVRxwerXau8KHm6\nGK5E\r\n=oUTR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDR0bTINUml/qlOZfYlfYb5Db8P6zy6UUSuF6pAz9J9bwIgax50R34nF/aE+dScy+szV8lTM0cz9GUH1+lAWdcJznw="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.0-nightly.20200201_1580541341062_0.9230574056246017"},"_hasShrinkwrap":false},"0.18.0-nightly.20200202":{"name":"brs","version":"0.18.0-nightly.20200202","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.0-nightly.20200202","dist":{"shasum":"44836d92c57836b4a271a08aebe5dd0e994f97bd","integrity":"sha512-4g4sDmAYZJWDZCIfFPYISvN0X+Uoe3bEMoEpMXJaINEH7COCfdEdycQQTXQvf8kAl/PzlQXYVw/1J9QC+O2yCg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.0-nightly.20200202.tgz","fileCount":156,"unpackedSize":994311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeNncuCRA9TVsSAnZWagAA3XAP/0AgMlGoI+u1rmFEI/XY\nbTvdfHJ5/a6KNIypvppFwTufjHvTVkDNMbpnr8QgCyvneY7IdCrkC2zw0xru\nWNNlRN41nMQ9o6eSdYobUoHheB7Q8dO+W3A5PazenYQVJsmjMH9bNSDDSnJy\n0BPo0+u+nf+GxBy3S1O5UQJ2DmH0httJByXaLhjgkUiD3NVJCRkFv4Ahpuxg\nRGjuL5dW/dPscOinWLlusj6zWXwpaP0OHzSj/dUOym1PqcH88GxiFWieqWqM\nDwRV2nQgVuB6OrpYTAjgJP4ml0LJ9u8/Lpuerj+gA+D+hhI1xc2U/0OOFMQa\nbXNUd/911tq1MxbowSvfb4P+WGXCxkL6Nz9WXh+0e57PzJrgybWvTMCCa78Y\nN/xb3Tqvk+I4uzHtdiFNfX+m5TPgRvnYNKChj7bkt/Ph+AIQwpSZ6FwF4p3M\n0MnLYvoCTIcJaniVwD28/GEYSCJOjwliTT8GPMqj2yW8OvIWXT4u8wvLHM1B\nzURkpLH3Rw1e9Q6Nuv+EOV2f/E1cd56vokfdQ7BriOmbHI57uf1qux5kTbqY\nI2MfxtGVCrQ+RWIulqjw6GvBfVxBnbLxVnnHnRmPWOAXLsK8MdA3EpwU7Z8F\nKbEy7rmlrQDUU1/L2Z3t/hO5+sZpYOdZ/QOJqxZvyVc0qG7OF7aIe3z7wpG9\nnlWy\r\n=SqKz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGGUx3/ATkv8sb6cB2q5RRAXHOCur9VNHJHCM/dK6KkOAiArGNVr5MyS4ez0iACN4DZhpsRKi4uS1Z1S7Knm2kIHgg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.0-nightly.20200202_1580627758252_0.3588619971040279"},"_hasShrinkwrap":false},"0.18.0-nightly.20200203":{"name":"brs","version":"0.18.0-nightly.20200203","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.0-nightly.20200203","dist":{"shasum":"6d0f3690aac5bb6fd2a6f4be616a15f1dc3c0757","integrity":"sha512-95ZACyL9J8mT0ECqElAe2lU1cfOog+nkNU+DHXfjsEBKDSFVNE5RHpDJvK4Z6geu90Ksa0c+NiooTUCwXt5yIQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.0-nightly.20200203.tgz","fileCount":156,"unpackedSize":994311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeN8jQCRA9TVsSAnZWagAAL4UP/RSTMw7W/IJiLG/G+/FZ\nfJgDRO9WC++06wE+DaswvV201zoalalNpLI5k0I21nN4zxW0K+i+TvxEk3i0\nqpKWPMIj4nWKfQJWTFg1L/S9Q3tlmOhyK8Ii/mc/FzVFpHwS+PkryCihvKq2\nivlieM/OVn7nR1NySTCJTFqMULyfjNp/RHQ5GTRRoLvkDonh9eHUVuAUoK4g\n9AkeL0I4k9S78CxfPGzzUUm20tShTyG3FFt4u1GIjljCeNyM0gu+NwL6i+KF\nZ+Sh83nlSMtuYzGX144OfIwwF+SJu35fHypVz4mBX0kHJI6pvTM2hQc4KxXO\nCbUXd4+xd5ANy96bii1E0WnwfLkrQvByp1Gj2DyqhVqVb8xDjThWmszsDojf\nTt5ayZTJv3HTd2HF4bEwPnbUC3pEv0kieyLVTH1/d5+JHptQtocppJOeYcSg\nNEiwzKR9T+r1+rlHQLyUUv9o7vZldEd98luJsITin1JQDARuf457qSjYATVF\noyH+wAU1ddeqsVqSnttVgLGDFwF4ZGS6wF+uFDTOwVX1dILJIQwsnfYhlS0O\nxw4Ol26dzxWhgBAa9ZwLm7WcQGHi+jKj24ALxzYx9QoxJnAIyhDJ2T9pSWkW\nbAPAGWrTML39YDN3rWpuWQx94CeSJ7aUTe+BFSfbyMKVX3l7KDfWPR02+fv9\noh01\r\n=U+Cn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtSxZDoeGvdhoMKsC+yqNqn+NEP4JZIfErSzFAGrRbUQIgJWLD+yTwM4Cj9ml091MjmX9QvHw1ecKTZZavcHi9G30="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.0-nightly.20200203_1580714192286_0.3208048318878063"},"_hasShrinkwrap":false},"0.18.0-nightly.20200204":{"name":"brs","version":"0.18.0-nightly.20200204","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.0-nightly.20200204","dist":{"shasum":"76b4642d990c1453e2251751f3c23552d998d89d","integrity":"sha512-1o3W9CM54KapdnaRAGp3ywgh3bl3D9hWf3y5M0AGjFddtufhuwScPYErDsTB6oC7yYKH2XHABClxSfkMbwm8Fw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.0-nightly.20200204.tgz","fileCount":156,"unpackedSize":994311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeORo0CRA9TVsSAnZWagAAbdcP/1P1xwaYuPWjdCwMVgV5\nNsFzpcN2QpZRMjYhDzjqlWaK1WR30vbAsgDdUzTO/RxLpHsKnQ8AP5yTOV29\nqmzx/5e6ul1OteafqasjyHc76FSqbhr0wjSziKc36ezi49zCqPzQc2u3iois\nZRm+5zSVfP9sBhNCJ7JJ7l/GEwBPjZ4DfwPPewv+Jz6C/nqEi7j/bxv14k2k\nUZRD3iYRr9GtA6E4MDYvE5WP6mXF4OxMZxaPA62qir7Ck8OMBg1xbn/L+Avd\ngpWbOyp/TU6Hcdk8EkIYMgpuJrwrgbB4RDoYzLdHYQtcwHbNAFLuR2dstA5e\nfIzQwoAKdcvzXmwk9uq0VrmFD6H03weDqvMwvsPM422pEzZ57+eHtdWawke3\n24Vdmo1vBIEwVqyBPcIq+rs2H5laqcwkmuWRF3tS1979biZQ5plIFn+EQbLm\n9X08bmmGRWsMyWBeHdwvXvz1ByN8DvXbvccUqKzKE94C8Y0T8kzlRG50OQZD\nKw7x8uWoqmcaQKwphw0J4jmwS44Zx5vzZJe4YCpuJ/+grWXb8C1t5mclQxmn\nSmXh2bGXYe+Je8UiMPqY1lL3YTGde23bhysXnMhgu5fK2ZXIfJHOcICnc+M5\naqNtek4a0w7TH0tUlX5k0zOId96twezqvy6djHIuoJn9fhjptr9EUamvyoue\nsg5P\r\n=WuPw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRJ9fm+6a0kV5PJSz5aJkDVqz6bTlbLa7BQVmKt6UB+gIhAMee2cwhTpc/hw5cCfNBUuos2Bc9Idxi7SgvDEwaOf+s"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.0-nightly.20200204_1580800563529_0.37312769089083053"},"_hasShrinkwrap":false},"0.18.0-nightly.20200205":{"name":"brs","version":"0.18.0-nightly.20200205","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.0-nightly.20200205","dist":{"shasum":"ddbc870a912e9401b89c8b312c6d4adb4e2ee217","integrity":"sha512-wHgRjUgEGBg7OF5GMGRSw6gs7kc7nl9STcVP5gXWgkaukeqy+Jmn2V0KYgNZRwOprOcpnFDoStONQ02KrukuWQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.0-nightly.20200205.tgz","fileCount":156,"unpackedSize":994311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOmulCRA9TVsSAnZWagAAtzEP+gIsFCjdOl2B2KwVWs3A\nuZf/XIvtXIJM9a41VDRzDALbHvEpzdCdm8Dsnh+n741m6WsYY95HfP1fQau0\nVx+OrEPJg/SQDangnbwjeu0vQ+s7rL4vvF/Gn2WMbtR1v6tcMVx4buJXtlh0\nkp9D0aOwhFJUeG4+6eJeRfiGepKRMmus0KqccWR9sevkh4sQwHbsmjwXdrxh\nM9QTwaCro914WPMcputbaMrw7WaRewKxdnnLDhLCJ0l8mCyJvm0dicIFvUod\npvMReOJxfLMOZNLp9kTac2b37kvvk9zpIC/ERZZWiBIfIElPQPt+SxK1TjbG\n1qvEnDutrH15KFMy3s69pLCGWfkgcLp3Btd8Bad3QvPVcSZuWgsxLu9owkYY\nzXpZDCdEs44YaalrbI5r3ZoUuNGVbTXEFhyLRVysEJczr6gr44OCeu0t3Abs\nhMYxRs1u67FXxmqfx0jTy2GaTdWwWMzZiqDYvo1AoYIHqcuh2qNYDNqrUtYO\nM2u+0vLf3cZXtXJFVhwiT1RzlvptWaoXJSEK1lTnBWn7rxBNTKPMAYxL4rhr\nsSG454GIHaHuA9pj1sM2mO3Dwa0VVAhXG7zb8fRO+pX69VCHhwXpA1Jb0Few\nCCRLmSFCvciGvcyHMwCGSqhrz+gs5ernY/Q9yqE2uDppVfgcSOdqZ2afbp0W\nuhib\r\n=y37m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICTU50MadqL6gN0SVRs+YU2UrJ7d7EyWJefeXJZpgdj3AiEAhFXlcPudOQYxiwpIu1NfMWroSh3e2NceIq8cREECCH8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.0-nightly.20200205_1580886949234_0.9303613280055762"},"_hasShrinkwrap":false},"0.18.0-nightly.20200206":{"name":"brs","version":"0.18.0-nightly.20200206","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.0-nightly.20200206","dist":{"shasum":"dae0b8003dbc11007bd41a329480dcc69e1b499d","integrity":"sha512-rBA/0yWPzQf0cgGPi1VgWs0JZ1X7bKAt9BBSQ8pcIM+Tgy85yd1m4EAkUmzsyFO2537o/C0HsKBh910IWlSXYQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.0-nightly.20200206.tgz","fileCount":156,"unpackedSize":994311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeO707CRA9TVsSAnZWagAAK1UP/iI6k5bdxUaNQeNOhfiV\nUfcaEhDR41SSMtsfrYnp5I1xiuprWq4zb6IfjsHNVExk3xOkCV4vWDs+s6+q\nhWZEiKk1Isf+5Ige+eN1aWKa6DkQIsiwPewkjRiiWaWIOCa0YOPkzhzWkQA6\n8oA9VbY5s8ct8OPMZm/3TevuCscoVyE9Mv1AG09fHZ+Ta2wr3B5dfa8+5QF3\nXszldOWKgqTFYznlYQCWm6qXbeeQR8dTlBUZ5bcsCodNGprbqih2JHgzEPT4\nGFswm3fE+acV69DcG3EyunEXFbsSYn7nKyrd8S9mYNeByN3lHPcOdPpW17nQ\nowyFLUFX/klvfGaCI7Rx3vR43FfeZKCVuCPbxBUTExmgtnchV21oHc58VO6R\nmV/Rd0tNWGdggATPe+1ChmTFT1bFbK9IReBtbhlLutjlptsl8zIdSyqB5FuA\nIqanD6WpblkQDX9Iv1Cuo9Mf90OcbaAmEGMbOtX0V0l5AxrspLoRI/gGG0d6\namc6uR8I6iCw7RAQBqi6+mk6+8f3octJOOHEnWoB63Zt128SqDxFqgUn8eT0\nJg49n9TVV6gYzMyCfnJdnq2s+Y3Rld8w0YdtCQeEz8G6Dz3CKgwSoCqrAsOP\nD5QEjoB+bA8hKlqcvaGJHjGjgf8XeSOHUy4PQ9UYJX51/nkdYJ0F2Vy6RhXu\nNpnQ\r\n=eS1I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEYhL6dCu+Xop3M9l6zvHa6c1WTX5G7kudRs53W3NBMIAiAmyh9G3x5+LAUDdEtNzLR7j6DLqgN8FoJYu1OJ8Myixg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.0-nightly.20200206_1580973371337_0.6977884956069673"},"_hasShrinkwrap":false},"0.18.0-nightly.20200207":{"name":"brs","version":"0.18.0-nightly.20200207","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.0-nightly.20200207","dist":{"shasum":"caace40d1c4c6a418bf2c1e70dc99eed4ed6c430","integrity":"sha512-6b7DXRqHqBkyUDxsQXq3lv2K4HbMllquIRUjvhOLRlkWvzt5bJycKq5mFrVgUTzh5v+E+WQunOE9I9UF7ZJUwg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.0-nightly.20200207.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJePQykCRA9TVsSAnZWagAAVnwP/0P2B0Hpkd47GifF5/u9\n0X/994kyhFU7Eiy5gsXjN09KbBG+F2hghXC00W78kJ30bxtLv7xRtmS5OJGT\n/GbDQig29z76yBofndk6vxKbXi4Z7PLKpO5SjL/yvlAGLTuIJefoE5V/bHH8\nvIzwtXD90CKJN5oi3yZ0uzJounMrQGx78l+HfH/8/UFjjdEysTMOYEZm94u1\nx1Zd/sAtAL/Axkin9XTNmHddNcC1iycIN7yBQtLzCf94FENckHjvaFUbmLGw\n+24XGAt/6upvsoDzne5ht5Eym+PaKmRJL9EO2crz8n3EbevqEAJxpaHER+kF\n4i2aS5DTQkgLxKcN4Rq7bH0rNnDoQKZugzzOEoFrE3RzKX0idS2wF3zN9YII\nurqa7Q7TMriUaZrn+lqw/9x5MBXLQ4gpag/1hqAQgEEH5xJSqyNKiz2ZvJdN\nOOQ9EBN5a0VJEzzrqd52NoaVXTdS6AOGpPQoyX8aJqJSN/YtKO4Q1zHMhSuV\nHzHAsHHIMXLVWc7KvVCPbMbETtBcEWBnbX1q+q2g+i0FCng5vbjASjDEUXzC\nDVr85H3YHFsZSTxP6vWQYzrOfmnqe/WXZxLlvc6S0wXWZTScK3I7+MuYd3/V\ntaSPV31byhrLtYbaVA3eSflLewe//q7KO5Jtd7OYf+TQXaLlg7ZfDgmgfI37\nkdgF\r\n=4Gcr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHVxssymSYiZQMEnvz0sbTQDFpYadpd5/dsUA6vK6MjIAiEAzN4h4/jKo9yrrx9ydAZXjKiU27neUwjQhybyeHuY+v0="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.0-nightly.20200207_1581059235926_0.4760969542289897"},"_hasShrinkwrap":false},"0.18.0-nightly.20200208":{"name":"brs","version":"0.18.0-nightly.20200208","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.0-nightly.20200208","dist":{"shasum":"ed30190ee37c4a348ab9dcff1e77fce1e96ecf53","integrity":"sha512-ro3R1OmeBZaynvNODzHjq+Sqr7o4xr587n1tj+ZCj7MZwF+yb5J7UcXrVbGBz45oZTIgzzT9Klf11Hx2nJOkaw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.0-nightly.20200208.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJePl4SCRA9TVsSAnZWagAASgwP/3Eq8AiHb+6kWHy59xq9\n32lbTneMF5WINZB1K3aZlnzsVGzKMAgnFdTEbbO06Wud3uR1GodHI+AMw0Tp\n96ShGNaL5G98wB00xABN4MulAiJI2dgl7NFmyVIoYg6GU1b6Er0+1H1rpme0\nU8CewoipNLEQDimy/sVx/JCUiHRzxurAk0rg1o2vFBwpCJqUAPkFp6yJSvfI\nq/XA5fCNMqcDQjfHyFlR9BJ/NvCxnhXT7zTy2BrbZWIVY/G/QOmG45OSN3st\nAsWoiitL/r60FM4XFadfVMIn9a7wXzSyZ0iFbSdmCbvKNDK5hH/eJ0sMAR/P\n505VlLjXp3ctldfvIDH23dPIUlympDfUNlE26Fh64AOAiXwUfYwKYKpjPS3U\nU9LtnFbQOj5cRVE/xSpVyCrYzL/w4EEvKK0SiU17ejX3vKIjKKyFLVb8yu5U\n6qgSgS3w2rbqM8y62D0vDzZfgWCqjbDeiLuoFVJi2uuU/71JQvHTru13o2/W\nS/h5BiKC5OAI3zDq+bUChE/nSxI1I1DXJZI+fNjXg2ylq4eN6PVcfQS8y5q0\nsj6Y0mspW2ePW8nZKN8pA6t6BbRD1s6+o6mh2mtil6VC2DhMR7LO0WngOduy\nyT5ACyK7OZyRbgrkYP71ZhA9xQrPCR77Hvw5BghgBS6vyDjw6QfM6zTLfHpq\n7HwT\r\n=P2w6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHfkmL8b31IdHEqUbl74vCuuzcjDckpQe/bZc1lVWfDHAiAO4XzQSKRc5aHc128zXdYf1P4ZvCu0bkKyREvUvM+Qgg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.0-nightly.20200208_1581145618145_0.9727222194685265"},"_hasShrinkwrap":false},"0.18.0-nightly.20200209":{"name":"brs","version":"0.18.0-nightly.20200209","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.0-nightly.20200209","dist":{"shasum":"05573eb51b2d764a0e2297e12512dd513271cfac","integrity":"sha512-2sKHcEKuBYBB6X55rw3upNFk8+tNbQPnKiDKfYAIduCzGYHJ7g6Wjh86vN12ydTleglYKUsu3jXIzkAiZ+J1LQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.0-nightly.20200209.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeP6+ECRA9TVsSAnZWagAAX6UP/iPF1l9k9kOPU3c12gOI\nB9pX6QNRnqE2CL2X6QovCJVOiiFYN0A6KhxnJayUmj9wCzKHjveP4BQcAJ08\nqGgdRGKJdKr/TkI8jmQyfqfx4OF4ZzugMApsaioAliVYSYV5s/PfBVMiH/W3\nnMniDVFH/ZRvrOZ3yGUXObFhkjGSCQ/TL0TZh9XhU71xQ5+blJAAZIeseN4+\nz1rnfUhksx1rXzlj6U3wYdYHT4/fFjEh276x6EM0y4d+NIOegKxcPDVIv0UB\nAFQFIQbjMRrJOPE4BzmjPHbuLf1ddsyCn8k5FTD6cOVAkp7YQNknrUtCaDIZ\n+QMVi44HDkvXnZlTpQ/6WeRuDMjXEF0FfcrjoN9Po+rAyRTR2yKj+yKgdLwW\n9BYQHqOP76dfnCwClVchjirfDyfCFX9VuQsF88yQv1/FjttlWV3qF+GtkxPn\ndkRioYgAzC1FgUVfdmvb/9phz97qAm8g4Jw2w+IvaQGDjaoCB9uRGpB5LZ9P\n3NiHnGnqXMisngZX0hK8fZK7JPtqiJnN0o5+pOoxgdOvmJh/i+8m59Sh+o7I\nrgJxP0rJfK51rwrSX5+lwY4Boy8CD2iEvXVImNcjCjREHmBua+GHpI1OLx2s\ns+0ss0F5UNU3gJLMyuy9Qi9J8XA9v43BnNP3VWeUpH42JeD3TJmrHGTpLWTk\nGTmw\r\n=aSdC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAVbSG1cQuwJ4nC1Cl1ot/jIdAN2kLD0xnz7obLls2pYAiEAkOA81SfUqJRvjMppZfCIUrwCyhKJo4/Xj9j49VpXmNM="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.0-nightly.20200209_1581232003832_0.5367649714119427"},"_hasShrinkwrap":false},"0.18.0-nightly.20200210":{"name":"brs","version":"0.18.0-nightly.20200210","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.0-nightly.20200210","dist":{"shasum":"ca31d3a7550efdd0234d6bbf0d882de3050692d2","integrity":"sha512-JrgKOtcdYZ/b5JglD6VJpzmmNa1cPrKMssY3RpYOAqxu1QVEssg8WdG7hMDk6TG2rZttcTKNG7XKmGPLxje1Dw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.0-nightly.20200210.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQQEXCRA9TVsSAnZWagAA/QQP/0Y4OLFHepq/kQbIh6wu\nj2Efcqw+iSrATugNUizy3+TaYzMqobIwZqhHmyGicIaiVSuN3MByj09pIfSm\nmR5xlmY0P2y+69OX4GiqApCsXsCNrmxI03CzuczGufsudK7IsIpaqcXyZ6Fd\nDSMmRGI7x/Q+GcszU1wNGf65bHgh5eGhIwRJScH3Q2Dm+dnXP9C1gHgYs2En\nTEFJHcQsbTwJAHTAF/iQ+crVvZQZlw3o1nFpmbSiG066R0O/AdkgpuGBhows\nC5NwWIE1kKgeNjLMSLyQxmv2Szv32x9t0s+BtVR/GspVPfUY4hktwQ+bC5WZ\n4CvNhjgOJ/8GIgQ9OVOCKq1n6q6msG8kQRDXmKbSyQ2rf7MIwXYjY6MTH8dQ\negUcGvcMKt9KG15BlzZ9p3r7l5zypAWDGtCSK6IL3VpZSKGbpwT5oGezaavs\nfiUyU2MgdN1BdlkQR9xd3QGVk5rUNrl+/wpOXEys3KEvgaMEWb+ryHFFJgfF\nMemNCVEc6v95DuL3QbZErsbHOCUp8YO+nH+uAp7yRwuh8el22AB2w2JRpWXL\nn89WoVLqGQH/Y1scACOYUaz1cOcdMzOWOClf2Sd3o5LE/0wbwT27wcvnUs3Y\nzev4FUePSt4+WR6KO9VwjuZ7BmWPwWHfPeBOJ85+3koyAXg026qKIWRJEhds\njuCm\r\n=bcU+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIELAdxyMrwJioCMJL5WPsAMv67UYTv0bjXKMcNWyD3FDAiAQ8RDXrPL91+PV4mG4FDl0jiWliUxBKdo4uS5ZBWZglQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.0-nightly.20200210_1581318423360_0.46667596436762104"},"_hasShrinkwrap":false},"0.18.0-nightly.20200211":{"name":"brs","version":"0.18.0-nightly.20200211","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.0-nightly.20200211","dist":{"shasum":"6ab23911e245531c3e26ddc99d1e3ab6a5386e2e","integrity":"sha512-wNBWcg7eLlQ1M9qJav+Yma+usbUmpthDXXSEQs6rgNfEnaE5DyKTwipf7xGksM12wWsBu/YBQoPGsrJHYT94eA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.0-nightly.20200211.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQlKCCRA9TVsSAnZWagAAL1gP/inXwD8bTx+hImWzwfUw\nSZ5scqt5cIG0Mg7ObQtyaPSr6tJDiVHgZqfZ9WyRTmeRle+YlMhkADQQK0wM\nfH6feB16nFzanbVLKtp/VYBiXdARUZMpSJi1h55B49nlvul5zcD2scN0C/xI\ncsmb+gmlWNJexcYyiiktJKQO9XuahMaoUHRX/z91SlsfC636whzJTNIuXG6H\ndnFWXfxmMz3uGXMUbyL/ikt7xBEvhMC78um8AIeL5YAPWhS77sFg40is/FWe\nWjgtcsxUmw8dmygY4k2+vNJqU/oGzb0NLZL258bXKIUNKchGTpT1Z4n3Hiww\nN07XG/ot2xbz/8rxnBzhWC0VwHxU6jb3AJaxSRCHJ9NJ9bde660fkeOlIRaQ\ndNYlPfpasVPm6y/R/dO499lrDXySFpdi1+KL1PbgaefOVp4d/qTCplHJA+px\nD0d9fEpoTsQVwstzoBBkVDhI/CBBVO569X5lk1OJqazsjQz8Oxz5gJjcKLix\nutAnps6aD1m3me2t9irk/Rwt549vxzD9H9j7ASyL9J3Hg8ejKsLRK2hMbgfr\nWRhfYqzTpalX9Md4TWLbLqq48SM5r8aOAIjgGKdWa2Zk+BngFaxbjGbEHwTp\n55vNzayRnPFV9GI/bVVE72XcD9Eq+e+VCo80MqvzgO1if8kA7cq5cEN32u0S\n7SPe\r\n=rML7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDoqSjNm9lBfbL23ZuuK/oN0C/xIoUc10pPfkvBiRPGUwIgOEFpV/JMs5FEnZyJ48ZvdokADD4hEhxeBfhP46iAQS0="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.0-nightly.20200211_1581404801768_0.454227687448828"},"_hasShrinkwrap":false},"0.18.0-nightly.20200212":{"name":"brs","version":"0.18.0-nightly.20200212","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.0-nightly.20200212","dist":{"shasum":"979182f8eeb8942fd91e8cc0447f56ebc81a2d71","integrity":"sha512-5KwPWOzoq9StkcJRR7UdmEY4j2SG7VZQ37m8W76DpM6x61Qq0f7WyfmSrhnGYg5D+wJUi4VhE2Z8GhgOpOyUWw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.0-nightly.20200212.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQ6RVCRA9TVsSAnZWagAAnv0P/isoDS/B23+hEehIZzMO\n+q2ZNPNpqiNa5WD6Xr2QmgO3S44qr0K2j8knpzogJkthXF7MReEP+PIvriiO\n9sDtVGH/p9xwhzEwMs6bmCjDDloX1Cp7Kfof+AUmpF3PMaK2VH/7T0Y67Bc5\nGipBzfpRCpBPLb5fHbPgjmudG5eRRAXrc0ZlJTa/7EZdORcr2rfV4ZbL0bHJ\npMk+h7zoKR/1/MvQ9xwa5PfQP90zKsIkYFtiYtGM+Djcr0K+BLacnFqP8YfD\nf8I7Eh+eS7VhXf6PzSWXzike/VZDdYeepdDpOiZ8g7V4cHR+Ug6wgpPL8+ja\nhYKbqHrFmvNenioh3Cyeoz/tIzc4QgTQkyrL+0oTA9TwurqNIihwDaFT7tpj\nS0uIZ8yHtHkumhPBJbwQxxEgQ/+UDC6RlfrHspsNKksmvmrGKAgsP+ukxyMa\ndeEQ6lbQkCiGnf6liALBWySB7MNbKyE77I7o/QKoZvE9o94H6nTtYSrqnIhG\n4HApRi6SKOh/hZHDd1XEqSNkiBbdhNMwZHi4soSRPyLnMCiO6ZVx87Lb3j+g\nE3gavAv2Z9R6OgvCow489KQfNcQbDCyTEqxjIC89/XFlizbWwF7LxjfH5qy2\n07b99OpQWzLONS0Imsi8mBYmROwE4HV8DalmiiyVRCzguLJLu4z9Jkz5SJOt\nlz9D\r\n=zmM9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdBN81tcZJp2cfbJ7uOdYAOm8XbfrD0lPJIf/GPxpMywIhANQjSYKsnk3BYJdJ3pVWlEerZhWpTl4fy0xTSCg5xPvg"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.0-nightly.20200212_1581491285233_0.3547126346938918"},"_hasShrinkwrap":false},"0.18.0-nightly.20200213":{"name":"brs","version":"0.18.0-nightly.20200213","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.0-nightly.20200213","dist":{"shasum":"0992cc03d42471f5cb0f5d1620776acb27ce6e42","integrity":"sha512-nv1Jzrd8FxqOlUIosOiRVN/WkYZA4TK7UbOXMP4mgRNrSLKGaCcj4iGv04CkQiuxtLmlZnmW8W5P93bmj8KcZg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.0-nightly.20200213.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRPWQCRA9TVsSAnZWagAA9NYP/2CcWnfrtzvSMXiXPimC\n/Ey8aTsZVJJDdYOpzJ22yWttb3ySD+kv7x2v4XVGZDMxy2v+iPZ+dQA1jMMH\npQCeIPaKsJRc2K7LVl8ovwCIcmL9rfq8gOEdsqewp21EdW5wL1d3EpR1GxI5\n0N6bPuFCX7JBGPno2p3+RyHma0EJbTgVyoTYY929d9z2p2xgkVPny2D6fOWe\ngpoO1PpOOg+XWHYWdgi9da5JDGR8M5BUlbRkjVCDWncsJZWW89WW4IBfuITh\ne5cJf5H+jE/aLE9PNdV6X1SCiR28l3PA/8v/7OsNuvoA93CyGdQ2zXOSYKbc\nHU0cEQW6G7yPxX00peMjaPkmsWhgEwMKHQpAAo/bVKMuAncj3MQUwEPBGY6f\nHP/ehC1wBOrvFgpn45NikRc4Q22n7uJ6A6FV0yx6GfJX+zLduL80DhIdFS/b\nrH1bTVlcyxOHf7zgZskt91xFpUh/eNH+OZbQcZntiDvsEDVMgS4UlEarpxpR\nM0Ra2RcevqXRhLUjKv9vv/P2IsWbRZ5LvfCpPIX0776aM0p3TvIDmhrp1fgg\n98uLiJ2xQZllQqlMJ1rRosb2xjNllA7LflZVEqcwQhoB2OC1t/Ihl+XBVr2/\nWEMWFdz4VQ3gLA9LSjn1xURjDJh2uRZItPrpYKevhOn5pcfCvRxIsqN3p2Fy\nwKqS\r\n=gox8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1hrbOVpxiZj+PIMFn4ISNgwZBhUYQ/SHp5wrJf/gDzwIgfGG7NS4tbruk0W/Yy0syCQB+L2QDOAAj9ghFYXoDvs4="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.0-nightly.20200213_1581577615553_0.4546699759662245"},"_hasShrinkwrap":false},"0.18.0-nightly.20200214":{"name":"brs","version":"0.18.0-nightly.20200214","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.0-nightly.20200214","dist":{"shasum":"2450b215982da68f08da7306cdbb7a89a8b8e5a4","integrity":"sha512-aYL4dVaBnPRdVlT55Mesa61glDNkdbCMUWWcum3hoFJ+jwlzU6cniX1ezwYg4CCByVp821om7pxeWLW0YwArUw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.0-nightly.20200214.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRkcwCRA9TVsSAnZWagAAN7cP/iZvWad60ILG/MlSHWBe\n6/cd/ko0GLDgXj9WwVRu+o6ItPfcUXoRXD5gIPTKClExMaOSox34tfjwVYxj\n70A0bQov9a+FVwTSm0rXzFqyu9b/rlHRmk5uI5Z5os3/xZm6USKI/a/DMtA5\nCqM2NQucLfpQMEU+xSItKfRSZV6BxASQdMI1fnCBS14ZdTYfdyAjNB6URYwa\nn0lIkb68dkVrv5icSyJUkPVRXREjD+5ejpF+v+rssAiI9DIDP2NFj/+Gg+rO\nNJcbWCHjfOjvCxQw5xbvI+aRfMugleffjgoGcXHxnQNOeDarbrvAjtVyNk/J\noO8Pn2vhf1SQc1Fii1f4/yfHy3d1AOYm0Kjx/ArAx3kVakb4O0DHtH6q+9yj\njM1Nmuv4S5xt+SmjEKgaNST0yiwvRQ+5rlrf/1UqSxykeHSQQ907H4JMftsX\n2R6QtEMWjgwFOqD1vBSFxRnSfDuIXMlVxpV4A59WuGyx8NbgMOMLqLEwbY91\nbbQyBCftsPD7QiQM7uemZgQonTizhCBLtKegYq2s6ql8sIt1NGSnst97MtXx\n4ia/6k1I2Bot316+mDZfUXKyr1+mlqtDF/BP/+aPH6au+tPD5vCyYn4qvGWp\nxVsdzeU0Kwh6OmieMwZqqzDNC61ng9PznAn8S8vFve56Y1xWVbAKO/D787PT\n7c/Q\r\n=GRIP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFgPW5Idah18dvceferB15PsEU2INLJKdhhA4dRRMHNrAiAgGdyqV2IVyCyIoqRAk9HO6Ymg4d5qyUwhyqvyHjuUHw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.0-nightly.20200214_1581664048304_0.019902987669060845"},"_hasShrinkwrap":false},"0.18.0-nightly.20200215":{"name":"brs","version":"0.18.0-nightly.20200215","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.0-nightly.20200215","dist":{"shasum":"4e7f792fc6d77958cee0bfda1699ff981989c263","integrity":"sha512-Bo64PhO00VVRN9IE0CtpHjxMg7rG7w8A/XFUFngQFpJtl+EyIYPjv2GViqt6noP6NTUJKmo0j2GHUBn+nHiJCg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.0-nightly.20200215.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeR5iiCRA9TVsSAnZWagAALtQP/33XHHPZDkXM8TWtfzVi\nP9C1Hi78TzQYTTojBsXYnBAq6MNtrSux9AJwAX+wqlN6osnkvRwS38RqwEuq\n+n4bjH7lZhLMdX8Iurgxp1c1xoJ0J3ER9o3T6W5vCXYvCdXoUdfooaUjBx2M\nU4kfX6D7cDuWamhCnfEiUgTDJyNGuTUlWvYI16LkflGe5U8XGXBezKm47giw\nN+Xmn3iEs1ZGIrLSjd+p1ojU01Mdmr1fbNJD/C+miN2HLNzJXymLm8GJzjJJ\nVQ/96uMCeLxrlFzEo9BIT7r/x7NXToZrd17q2BDt3dM6PG+ZW6GTp2vYuUFp\n1J6KWZNRg3lB/s5dMVC3qTrPQwQkx7fakd6IDUar23UbDGfvrGspfGmXfsVT\nHWXl+/uw1KNCz9EE9JwgEJVJvYKyCK+XmwKB/QqKy31kcHWF18gHJgQLoRka\n4iMw0Aasoq116pFLl54P78FvjKHscfPFdbg2dyv9dty4vlDxacWSqnSQllhM\nzm+PO1cOSnBDKXxNp4/+zpvh79qYJoHOnMxEsR/84xmLDb35ETXh7ye1T5U/\nrND1m54LCrNhoj79ZarLsGGKtCD8GMmdNw50cIHdB3ITpIf6nwvYq0Qyn2ZS\np6JuFm1U5xzV0C+/UfC+gDRHGoOJxTuGIugJEjLCKl1GvEIoDKrq2a/SLQd8\nj4Om\r\n=w5yA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9dVfFn36uJp3Hc45nbTNJdvTHxvamsyRsCWcuf7Yq6AIhAMMycl/M6dcS4DIjim1Ym0JPBngvOLKUuRPrQVSNnTv9"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.0-nightly.20200215_1581750433475_0.6799223097602332"},"_hasShrinkwrap":false},"0.18.0-nightly.20200216":{"name":"brs","version":"0.18.0-nightly.20200216","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.0-nightly.20200216","dist":{"shasum":"c031e6c3b8463d247e616f06668d7fac16957f7a","integrity":"sha512-3qnXV5CeIJwrTC+sirvtaJd+y9IAXmKwQ5oaxMqp7xBbD1bSXXF8Egq1XeQith2RKp8ORb23nGRT56uknpg6qA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.0-nightly.20200216.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeSOoMCRA9TVsSAnZWagAAZ6sP/10siU/tgjePBCfR1FnB\n6u4RGYQJeaBP9GYbsy2oRaCNN3K6W0FM0lp2/ujaWqxgmurDz3PhU5KpIK+1\nLsghH4vjC9NWhoXQRnplqxgnufybalWFRwoEIG6pL2JsStKZdRycFAVotnFQ\nSNo30NJ4kZIz23roMS9s4xAhfBW28r7MqA9tjKtS958jExxMmcRO9w8dWQEG\nIDllaAeMZ2QItJYs7KCmuqMxR2LtLU8Wsywd7VWV4dT1KsqJLHQ0pt3emakD\nlEv/lI7pS2+jJVjVD8RSxPeIBbTVh9rBuOdAuu2qkmTZ+JTcbKpKz9Z2ienI\nhNpEmAqbREQOVC9BmCpvCQM/sSfiEvEvzmMP1HFNsofCMO5602f2AL+kyvZN\nzoaF0dR9O6fMI/oVGuRNxKx2Fy+SkmjuMU7UO0W3TW9FYbVjinWXD4N3I1Ig\nRlDpEuuAB8O/dnA501CHVb8JBYKSPjI/Bu6bb7ox01TadQN5f3w06fWzNLkO\n2EJmyFuk5rZIjl+bGdCH/Cz0GSygpKH3FWQg/2NQW1hd2JuFtZHbIx0pGEov\nwbuTEGlA6Tq9rqf9tEM9btN9WmWs1ibXp4ixLqEFtJ2S4lWI3+URHwXG8Lqv\n1CE5qhqF4Mm1mTYGJH6aU2YOVhipm1Tm4jtVREng4FG9SQUltw8kyl4smZQ5\nb/5/\r\n=pXKw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBQ0RSBiC+R+ClXv3F3KyrU7jVgDH4PeBkuvfySGTawRAiBGKD9BzxxEWQZOjdjSAYvXyXrKN7kz0Hi9Xd6U3YBY4Q=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.0-nightly.20200216_1581836811794_0.6598056150843208"},"_hasShrinkwrap":false},"0.18.0-nightly.20200217":{"name":"brs","version":"0.18.0-nightly.20200217","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.0-nightly.20200217","dist":{"shasum":"e1934e6121bf43f3f381a00297d86d1857b6695e","integrity":"sha512-ZOCChf8fc84z0y3QIa/Nok6+wIQ1/AKPpLIRoE2uhjWfRRAkO7H7HtDwzSegV8jSQ3AIoMQ1Xx3xOGxXO72qXg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.0-nightly.20200217.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeSjubCRA9TVsSAnZWagAA1kEP/0Fz9c1dPXWogRU9+CEH\nzurKHTy5UdG0j/3Elq6dZiJzp3MJexcFH+cgQowThDedfIm3/4/a1TnRqZAs\nf/hkEdLtj+unoL+ev9mb39giw/owkyWxBrNhsxhC7A2cSJ3UjN4qk1L1GKtL\nwSIgrr1WGgFeuUcjTm27IBorYv8H13HuO3OfZfheezUVwbjCODvqfLcfsiMB\nE3eeHDOLkxAKvIHKt/KVImc2hterNzSTLzEO+JaWMaAl/vNEmfdJPs31ELco\ncRl4Rk+hyIYyDdDyFwv/RPA6RPovjBnJ3dcECEDVhytm4TQH5hPnIsKu/KWn\nbt2PuaBTMkFVuEUcxy+94FEhBy7XB+403FqIsGJ0xGPy3J2EGFZNO0+o5yLl\nIowcfTmd5xJhUGkfV0kS+aRcI2EQ6qm6Lg5x34vz64q3qI2KGUZOB9n6awL1\nJhFO46gty4XRvVNLjqyQpbU0AXH7JLy4sb9rAj+cgFc1LTIYpMMlPOb3ApBI\njwzJg1oziCAtwpeC2s8/y8K80bKYqnAHsL/+X0/cF/N21BLCCeGFUTILHs5a\nIefwunphiqTI48jK4/sPdTA3HTPp+vZ/dFfcyVr67RVyySkG0bh1AP1W05Cy\nB6oy8r8wLjhNwunTMLWQe3zkYcWiiyT/Vb1aVUgA8tDd8tHF/yMl+xY+0GoZ\n1SzH\r\n=xwN5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF6jAG72oFuC5sUGWbUk3GZ9hA8IQYjgG2xVt8DpBaAmAiBFrZixmxZnTWv4oV8j6Mys/26b8feO9rJAjrL/5F0Wow=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.0-nightly.20200217_1581923226617_0.9704676159021306"},"_hasShrinkwrap":false},"0.18.0-nightly.20200218":{"name":"brs","version":"0.18.0-nightly.20200218","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.0-nightly.20200218","dist":{"shasum":"0ef608863ed2197f93e31dfae6f70f1f48c36214","integrity":"sha512-UWqTo9+Zn6WbqC6Cjf0acRKSgnZw+3JlHZ8XAzqwljPr2kwXEjlb1ht1kfjPnA9LbGwW1+a43/kEmQfXjYY10w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.0-nightly.20200218.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeS401CRA9TVsSAnZWagAAL/gP/2AN0J2ZfcNWPTSETLQu\ntpqDJZxNpdBqXMmEaQiW8aHUE3tQqTVtwByBPyBzMjV+eAV00y7eNax5Jsg5\nR7bX9G6uDv9kv2oKLzHjis7kjee+p98JjcB2pxyeHE912pcPMEFY73faDZBC\npU1jZLaW/kzS2Hnm9XZ7TT2dwOShsqygsBLhuFUxPn7dr5EgkgIMBT2A1HSW\neYo2cpnVlurhSozhWE9l0sNVKqGXRfrhL4xCnjmvv2l5SujIC3e14FoqyiOS\nf1KiSSs2CCPqY1XM2hS4bATSLs4hOSJzSG4DpGCIAQJraviLuW+Oxw61xFBv\nn5F4ocBuhv/jGK2Z5Z/cP6oPTAlOOPM7t/aHOUhu/8fTVu+/Z8GPQ/UZaL9h\nBppf3oDRb08Uv4CAMNBRmN1zqtz1yHOBweBOQ83hjSvN780pfstPsYkSfQuH\nmgsfdl0A2JKbDrRllP5SCcj2JxWYU0hKkueo0reRmN7e+j8xVtf9t4jzLxa8\n1Dbl9h1fIQtdi+YIrToRgZsNVCQJHRCSAf3Krnrfr+eFQIdcUnLd/XvkfXxy\n4ixNtyVCHBn0+ZI/4Yokx58/a5YDb05/eDJkIH03Op8ynsD4Q4vYpg0MznDQ\nGAC31xQ3zDjayIRDN/czk03JRpS8yX6LhQcacF8xG/DicHHXoEyrn7K8S4e5\na/cV\r\n=20oY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJr+eHYJ+pu3IIS7joCPXRPDDMMsdztFsHWlYvKpP10QIgOQ/Bd+FvkKF451TcMzXqEEbF9pEVsVJyNEp0BGM1sjE="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.0-nightly.20200218_1582009652581_0.33797885625050106"},"_hasShrinkwrap":false},"0.18.0-nightly.20200219":{"name":"brs","version":"0.18.0-nightly.20200219","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.0-nightly.20200219","dist":{"shasum":"5e92e68bf845825b30818f268da56127f285334e","integrity":"sha512-Wvvb/121TquNeya8APULr3N+FcOiBArE7l2N9sfVS8FpnrqJIRRXOzfrbvTmwh/uuO81srURWu1sdSeR+R0jtw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.0-nightly.20200219.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTN6KCRA9TVsSAnZWagAAMcQP/io98ICI9g0bsIKXld8B\n4vSlmH1Clij7Jq+XNJNvuOmGsVt8v7sXGWop+3dtreLda2FYOlB+lwDpB9ij\nIwaeYKnCVsTGjWhBqyuuYrJ3NZ1ugLtFOy13JmXSZDlfrD83OMEQQZn/DS0i\nDILoy6Xb5FLeq3wOqmsRQ9+AzKRjlDq41lZDskwCmsgEeoNzEYHN+yFnIUim\nOcmX6fpBpoaoxzzJ4vYTB8Ka3MasVHKWFiQjSSx5kSCPdZxqolP7+SiunKhc\n9yXeqp6A1zLcSawHjr2zPJA6ojmeDVDyTR8WqkEjYtyGNBhXAmR0lX5MDs7K\nbzTT1wS65yzsfLY2zVJSHpjZS57iKS41el69nB217YMQAnYGv9INXMC/HqUf\n9RVgbv/4sIff48luysdS3WMIdGSHjqb3LY4c0iid1wNpk7cGbIbLfkeshqV1\nJHD5LHF05kCXV+DnMPeF8nwTNt3WthGSo9gCuycLB4UlbKHgY+568cvG6Gzx\nZhC2W8t0RDRxhfk0i3TI06Ke3BogP1D3ADhAU7pPSxTV/YQ7jqtxX/YPSnKx\nX0qqg68PXS+fEcUBOCSK8lGT/TvlFBisvagX0R2lcoDfWEnzN5TBufHTuiFD\npSqW05Mey3HRCyx/9bLLDZFLm4KOBjQ400Sevad4fyeAb7iJQ9Dwd9hS+xX4\nPr2z\r\n=5GWQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCqFpaPhFdS2Q9JtRaNppHqtryeMXBh8UejtGQLsSSO2QIhAK+TMnnq81kf7sReRxkyKPi4+s/vfDrncA5xIrvhkqzP"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.0-nightly.20200219_1582096009753_0.40754369538056867"},"_hasShrinkwrap":false},"0.18.1":{"name":"brs","version":"0.18.1","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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) 2018, Sean Barag\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@0.18.1","dist":{"shasum":"62af267df9bcd9083a7a55c4cd7078865d2b1996","integrity":"sha512-oqylfTYUNfQqMFUd/wOOLu8E2yRKkOocvvssJj8ZwjRjYtKDygnITZpf0UCV5wywiBTrnPFJ43tpCSzQ4HijBw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.1.tgz","fileCount":156,"unpackedSize":995100,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTXRMCRA9TVsSAnZWagAAXPQP/iwrdc6SLEzeYvFtNHjU\nHCQ+jrzNCQZHTRx8jlS2iZB2Xnw3SLjvea87wmcycFg1vXAEexm6GxVcUjBB\nhpEE77lnn8moHpNARPEMwHsxe9kh9wkLqkQUQWXKvlb0wS0dlH04jrJAI8lQ\nheQHHylq51DeyiPzJOXiNvSYoEMwdX89b+i4XYTMwt5JzCMQXwLl/R3Ct9DV\nc24tq85tjWwfF/7tgX3bMjQb+rvliBeZdsRGf72StJs9JxpTqj49n7Dxn+5S\nTH+bJ8f3Q9foUCP2sTCVRksvMvHutjioLFFfpp9NKBYyb7A4yOYI5Kn8EpKJ\nUbJZvsgZgOPbGC90DxvMlDDHWMi+pYwXH9uIG0NGALSs1IsLlms9Jq8dkiBq\nA71yLN7Jry9BXaUosfo+65DETzkklPJwtUjmZbsfs4i2mX2UlRTfyVJc+hVZ\n2PPSMHwreV88VCHKGfb5IeJ8OlpOs2FntTU4m07bJkG+23LB+uyZz2ZjPmke\nppvdO2VUTxr2JSWOevi2Bzr/dM6k49xMuUepYM4HLkAwIHNi+639j+8Tz1ib\nXYV1iifgS1rVtv1UvYrqqrMPH3RDs4dIKRIHHlvXITgmRJh2IHOmSsZ9xcHi\nAWsDULDVgZoIc9ojVNwJDUYU3R9kVNyzTjBrKO/AHuHKlX1CW1gEsuPHdP5P\nvyh6\r\n=mFf5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGY+/zMMqcHniY485vyv6z8WYhWx0DhKy1VokCrFlnoWAiBNt5P5fqtimDdIyBCV9oyqFsan8iyLClGr+gQ8BFmM+w=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.1_1582134347414_0.4242339426580264"},"_hasShrinkwrap":false},"0.18.1-nightly.20200220":{"name":"brs","version":"0.18.1-nightly.20200220","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.1-nightly.20200220","dist":{"shasum":"1b6c5c3cba866a0c3ce63a271e5fd8c7a15a1f2f","integrity":"sha512-AMoPdYJCgNqYRVGOgZfMl8rL4zM8vSHaGVo621Zmoi+qCwFSX/lMh2Wr0jETbsxZuop9yjgvWBdT2ppS0B0TEg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.1-nightly.20200220.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTjAQCRA9TVsSAnZWagAAnhcP/RhnjHp+9Rt193a4F0bv\nkQkUb+PSk5o0MfY6c1ciDxKn2LatPFtRT48+oC6Y3zdTUUfjRwbW1nwFleI0\n+f7cWaqElSBkB0Abu8yvbxJ/6uoyFiyFuX/t0C6svccoRYLPmR/dF9QaygtR\natvpELLW5ffi5edqwga6gAkPScboMSh4hMDgilxzRl3RPTmYeawDTpGGW7nw\nu6qucjFlDJElswUtPrZj+gM1fIjmKaoTN+wI67BK9RSd4NHUmLs79W3Q/a+B\nk9nnpQ7E3rZDGZE7qYsuJ7HxxAUSIPPlb7HAPIedlw+xykzHvifjLRJ/evVh\nCQT479Zyv0/0QRgOnUf38mtwQ8mcVHz/zD1rm4uiY9qTrMH0eyASdKBn29+L\nx3yrmVWuvdRxKqo/Onc1pu9kQSoTl3OnKXDZRtQDAOJeN6e/HiZmUeApdqVN\nLkV6DpNYp4rF7S3wwIJ8Q5ydyAZNnDa6Bf+UzDlUfH1tHdkje/1Ik2nLss4D\n6UPPEveILlGWtZUqPCEv+Fs1sULAKJedQADWDZRxMQ763xpDBmcdpGyf3kWo\nDMaUzUz22iNMTOVVqudE3CplAB8qys3DbnOVuDUd1hQY6loPg0g1pPJFnogA\nqP6IxXJgnXnyfoAEBtwdGFoijpDO+YC527Le7cX9qtHSoOSddU0Eo3NYQi7s\nMGON\r\n=kJ2q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqYBQrV8MGozveJ+AnnObG0cWoj7BpwQM6w6TR8EnysQIhAN7QaaE4DOe67uYYdNElBZi+LviVsRmhjwipWCgrISNz"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.1-nightly.20200220_1582182416106_0.7901343824361478"},"_hasShrinkwrap":false},"0.18.1-nightly.20200221":{"name":"brs","version":"0.18.1-nightly.20200221","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.1-nightly.20200221","dist":{"shasum":"e1e0a176046971e19b421b368b1410fc6935cb2b","integrity":"sha512-Knf0gnEMO8C6F3zc6OlG2cSY3zdvDOB6XtGBbLUDMzzM/ruaNVVNcsdjauPPJ+TM10d7mASSB2G8axu6w1mV8w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.1-nightly.20200221.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeT4GbCRA9TVsSAnZWagAAEOYP/j7Nu/qWhg9+0w5jkTcN\nwGxW/ma/0AEg2SZ4sXoRBremAdkFN0dcl6K9MSB3GRMmmGWCPp+KbTxoXQ0v\n0f56bnjw2D+Kc/3phdT6YaEsKrQ+2BuJxuDonFgOFxpFaSOVq6u9hpz4D6L2\ndWYsAn1ebzg3Mvm6bBggVQzOmSUTmjHxIS1RNsCoo7SGvNhlj3ciZSJME/V0\nrdKK+ENSNZ7uVl+6g+pXYFwKRxDjCnxjmfq7MAMmi1LDisIF9karJ8iHoyfc\nRCu2y8VFRxfSiegkF6WJFpQgDjyZ1M5IjlAzRTE8RcfCBILH/qw2Uq7Nc1vI\n878IKgnQqGGu9RdKQ2pu+vBNgHrulu789YRyvn4uaePavDvw9wliImQEmKpb\nPeVK8/8fHiPJNprICQDgP4yXUmiJ1OXzqBOOTRo2GrE3r1SJwaWJgFIG3af3\nUbMbw5GHAKniFPzJYbtIWBweNP9E7Jf2rA+BeCfLiQo0nsthUf3CJ6JH9EHd\nmWjD7uAbF9L08QytAjKlMe724lzkSKW2UMieL9CgE+0mv4mCiCco0WMwL+bf\nugAxeX7IGR3T0DE/HCrOWrIwiiciqJifIutnmYCEm6GPp61P5t03UQeNR3Wy\njerQJMWH3CCZO1q0keQJ1WyPdCDP1v3DV9FSc79AEzv1lgodugWeqWWnfSjz\n19Kd\r\n=osI9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICiYUkbMdDfWFFdhsbCu5B4khxMFMNljW1s0iA7rsY63AiEAr0yRLOuPLvSjKq52N+xwYPo2CulMuiSvyP4QAyvkKsg="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.1-nightly.20200221_1582268826416_0.3511670881506279"},"_hasShrinkwrap":false},"0.18.1-nightly.20200222":{"name":"brs","version":"0.18.1-nightly.20200222","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.1-nightly.20200222","dist":{"shasum":"776c7727f135870d9e821cd287b194b5387fb33e","integrity":"sha512-fO2Bn/ZtkfSye7YJySl7yR/SXx/GnXPOqbBSW0DOzbwcsga9dJc6xWovmKevEKmc0tvTX6WunoEAZrV/oMz3cg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.1-nightly.20200222.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUNMgCRA9TVsSAnZWagAAGQoP/1B5oX6WNXmGfvrNBs7E\nsKP6tG6VzUX/QT3wyHbPJO+9NqwxBe/KF6zCVy368e9RkJGO/opK3fLcnh6F\n2GHgs1uuscO6HVH7u8WbTDStemvlpdYfkE7CdSUBIqGXbbupx7PjrumfFFM1\ndWfgD83prej9BzNxaookNDGVlpM21K50PHQEU3kKHzh4eXmuDkFX6MZOG10p\nDbiVOMcEUbDmdfB0n+hVlLjFO98EYM+FXCVzG2EMuCFROEKDH4Tu753GciGS\niJOEYCl88teedc+ihTK3jRrxiKiblMKvJmfmUxNnA7Vtdm2KttyxE/JFjexg\n0eI6UtsrBOU1xJpeWBjPMtzuraAF8cxxhNmqeJENDmaiJBvBc4eY0MQVU3oF\nPwb9ZT+4KhOpUfOa0zW7G52uG/VkxQrpmhFs+b9X006OVtDsf4z3jLD2vmJJ\nsrEPvkTFdIJKafbq5jqhuLi8cpqAaaNBPTh8syNhCMrH2i9bC5zjOqW9glzf\nWUyqRdEfCmCGOXp0F7iJVu9Qrm4F4MzP28QtjpEEN4yYW4UtU0NgN2z/31Wl\nKBR6vs1jG5JhycFx/epXG4QXzbuVPZwRHseVfLk2F7giO060BFyxFnBlK5cX\n9XMOC0QxossiqFHyz8rJ94o9h4fd6mY753w2A7h3uc/uqJJuu8F7/ADnuXj5\n/ldf\r\n=Zlj1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJL3r1OBvYsUAVDpDU/TlBywu3oXkwBPij+VSVXXCM2wIge+kMrqRO/cVAcHobbOWyb3tXBti8wOPM61bkpLXbIW4="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.1-nightly.20200222_1582355231954_0.1238586694806465"},"_hasShrinkwrap":false},"0.18.1-nightly.20200223":{"name":"brs","version":"0.18.1-nightly.20200223","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.1-nightly.20200223","dist":{"shasum":"9d6733d6b83690b768b0db2a58035b57fda9305b","integrity":"sha512-Q0xxPzXV+9CPMazmed+85esWcHfDnvWp/UfDPNVVqN0CrsQEcUMWPOuAV2eY9YPIQAvpO/BL9MRx+qHtUyq6YQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.1-nightly.20200223.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUiSTCRA9TVsSAnZWagAAIKYP/Rz1kbD5mBnEjfJTav0C\nmfuuDxWPDwpJ0d23Ai8nwTQ2I89+BNIzw2uD52eycXQb6dxZmuMp9XbHLSaX\nA0BMVQiFM9GxpB2JEiMeC42r56yZ40aap5OLVWxBBZ2ZOYd2YQzbgmkvwzNC\nFAGdSWJ2ABWaF43AU5+UUN45xKP2FDv1/ZeEt9UyaLHXriC/ksi7xTSRJnaQ\nYqbUquhjSn8Ny7YI2BmvBI9Yt4SAAjZ+FlrkAshsBUm0EPS9hUJyZE6FOp3v\nUHxlXN56jtNZdPTNVgbPMgcvHMWqNbtvrHu09yCDpvx5/RDpmSda3IpLKk0v\nLEqsm9wHCWItSAdJMizR0g1ztMLvuD0h/Oknaf1suDiBVctInnURvWpZiaQh\nzi4NA/pZO+qUB+oIB+bmlSmF9P2oHF92k0fKw8jWqzhNlCb2BLtD3makx0E+\n4Vn/n/eWzTCLm0KrVHvDq57FCdZeTZ19MhB4Nxel2a/rWnfWM2OExuAehp3s\niCaEYSyh0af/lctTxrnY6/P2fUzeSJZsWmfKUpdkL7Txw6q2eisHOXbzwcC1\nowL6Evt//8Zdu9m70dpnajLYyJoN9kMph4+k/U0NzuLOxvp3DYIxdiuXzzhh\nejISZvGFv/UZRSbLDWpqX27uTwmVRQ2TPxaMDRq09rBnDcnE+GwuT3jqz/jc\nIoND\r\n=SoMy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBPma9rUpAupGbYiRX6I8/up43eKHDAxoeugeOlfOA9VAiAWmL/hB0MAw+OxiplBy8JTDNMZEF2T+QKn/pP9cscpsQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.1-nightly.20200223_1582441618897_0.9978366317610223"},"_hasShrinkwrap":false},"0.18.1-nightly.20200224":{"name":"brs","version":"0.18.1-nightly.20200224","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.1-nightly.20200224","dist":{"shasum":"ab77ac231d0f5dc2792174224042e62e6815ec7a","integrity":"sha512-2JqpSS189Adc0rl5ezDoHGiXv6m2f08JnlHBrHfLrXnHdKfTQP5G9FLHFGVrb9jbckHLI5vslqCKDjf80fw8Gw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.1-nightly.20200224.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeU3YlCRA9TVsSAnZWagAAWR8QAJHInrxNO4X0v7660oRn\nI3uEJfbNryHZB3qYRZ+R2oMAvI5VzIQ+CXW/6E8CUVQLPOeoxAcHCr6wxeEM\nngF8FW6t2wlVQRcyIFOTGa8n0Ty9n7ovNem7k1YgMng4UBTovp3BYsqVV5iM\nMHbSdjCadmscLsONB5j+4zTuK2VrRE51JMstUazgChILi5SR5YnDRACgvS24\n+ZtIiqN8nZj8wyHCaRxlLBUyuNvPUBxk5YYfkjbGBnUO8XJXF73C0HyFygou\nlfslgaJIgNrNf9xnG73GgYjbWeI0zps/eF79cUTpOKwyAJQzRs+z1V3sis4b\n3YOArNXLr/bHRO2INN+UGT0vgw5RzAAv30PwRV44rcPIfNOnSB8ivGdWZ5QW\nwdJbSZ847URTFLsPl+45wa7rKjOteTdjqZ0x7k9rN7I1SHxERZHmkb8rGLL0\nJxzYYrLntEQjc6xlSgCa3QMEAyTz82py3TLUVgU95zE+fnAoI3FCLWM+akbD\nABaj8HXfJVWcG9RYD6rcOS5OuxjGzLGsKQ2gdE1zn8YQWmYEmhl8s3nBtg6t\nemu5uaIvF9UUjlFdma2Wg5xK726qiRLCaACNnm2aE0pNvcqucz3Oanjwlc3S\n00VdFEFeWPKA9j0Yhrm21FM45//Qdy0ra5U0iCE0iuKasbaPYX0mSkP0imnp\n9494\r\n=Ffup\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5/n+KKyIR+GRCpDSuL089IYX16ottPEmofWHVAMQk4gIgahrO07ONsmk1E0GeC2VeUR4wvG4r7sUNCR1uOdgfMSY="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.1-nightly.20200224_1582528036942_0.10320186689191058"},"_hasShrinkwrap":false},"0.18.1-nightly.20200225":{"name":"brs","version":"0.18.1-nightly.20200225","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.1-nightly.20200225","dist":{"shasum":"5da6bc8f764d4df201f0e6c6328491bad3b57b12","integrity":"sha512-43p5unoHr7rhVzvG3iRTnZ3OwrSoXj+8xPK551Rn+R3p0BcKA1SRrjtGi0fD5icKuAcZijopS5RjrCl+7Jkpcg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.1-nightly.20200225.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVMeLCRA9TVsSAnZWagAA8EoQAJ71nmS9dT3c0//24lmM\ndW6Z6j5guX1Ap0IktFfBoIxLTzNDDk/MHdQMKmXnsBc2XFdKybp+vGP7OtS+\npNkcADsDHgAxFs5dImxliSHLJDyeQqFqi71EuaDMYI3wPBYtFs1gVKF+hatG\nhfueYx9tL7X5Hmd6Uu9WK/DupwyjTWb8FtNPszvhbz0TeKgTaIEc4fLEsenp\nN/tHsNYx+/6zi3Ngfv6vZ0CH2qfFl73HQUSPmRzsUIb5M7kt3do80i90xVcm\n3R52zjJuRsYq7a969gyqJNVuN0jUgDlH/nSvu5RKB2F21j51IjpzJ2Hl+qy3\nWJbx5hGla65x0s3R8xfeN9hYjLFi3LBk6V32VnbH5FKdhLtbcSsXa36qwJFX\ni+ZLRwa4Vsstg2bUCfiCh6yEyf56hN7wAlcUq61Y8Ms9LxLzv7wHJy87jNUX\nwAf97SGlO+1KqA+yvZicxcSshfFVF0neIONC9nmQi1kkmmVf4AN+6wCsPUSW\nOkxPMOCmru0+pPFXSmOfbsGrU/vOnKgm7bWii54zupVn9klK0YluWZzdWp3p\nS62k7RuM0eU/BeEogexmcFm6CE0hbeQmUXghNaBb/R1gaVMQ1MmDSsgu+avu\n2XAMunTN9hfc/+WHRGO5cf14oiypNu8lduudoQhvu/26ELqed9SPc2pIzQsD\n8yM+\r\n=V6w7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEEqyAgDoREG0gjLNrIgC7soVXOaImK+fj7RCZxAfIHgIgLtezZfI6qabSsUWNngDXpPwNvhvUm6r2JCjO0hdwN2Y="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.1-nightly.20200225_1582614410699_0.0789075804401893"},"_hasShrinkwrap":false},"0.18.1-nightly.20200226":{"name":"brs","version":"0.18.1-nightly.20200226","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.1-nightly.20200226","dist":{"shasum":"6e6edd06175ae67afff71bf06e9e52c1e9f21b17","integrity":"sha512-XYD0v/CGyuSe1gBQ3qJ1srQViRApcd9AP75ON2tKV9Zjo+3RuxK4aGsi9Tf3iX68VqOcH/KMk5rZwPPXn590Zw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.1-nightly.20200226.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVhlBCRA9TVsSAnZWagAAQYYP/3n5XsGZHbpAPotHDewz\nIRC+dzddld72yN/syVVTOpr7oIRAbDLKovsimtdQ8AAdg5+PfhG7aOB/DBeE\nFVs32ZXV45BmOjoSVDGXJe5p0r0sS4eZJu209FX7TsSbnswqJqqCb+HkIkay\nclsuR9t6wWiW+jG2GyU6SMFed5mItv+MOBhyEbTMTP/i/QSQoqM9kvpDfUSm\n/uV4a28V4g8bFQ9S+t/ZkWHTWDtTQLRCF473DYuCTJQzd6JjQoJ32hu1cwUC\nFZjDd/6hWH7XebAvwQtFsE3U0fD6TaErsmuWxABks7pDp4EXwCm04vh/vOAl\nDje4LfG7Jg+VZGAlYcr4VaTnbSppnLjzL80Evdo6qPDhmMzmkoFemsd5nXVA\ncTMgtG/U4kS4zm80S+PR9oAl6BWiHgjM2kADDM6S6YBsdYj13mnBSTw2kdCM\n/6CJxGnxrJUSVGnigKyFD8UMy2P/J/D1pZhveIpXh6fmizOm60noPnxHh4QE\n/rBPLCZdGPvdoNMFWv1019qR/YGemtHSkAL5q6BP989fMj1rZVOBMZ3kEF2v\nCVU+msIyDY0f4kgB/224PGXyrfx6ot/g73wEXZzivA3k7BU7h4PbqTR6s4Ds\nFT9TEN8e8vgc/cowQ0UcGtBSsr0iBL/3TDFYD0v+1InehX9AxllnCkEZVAWj\nEL/j\r\n=wUO9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB1dOQf+0e+6ZbyfFxXn1iaskcwnye/BAs1/xW69SWmUAiBmAXxV9Q21ssxFuqX/NPDbXd2B50PpgV4H9/mgYw+OPg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.1-nightly.20200226_1582700865023_0.5879566077917253"},"_hasShrinkwrap":false},"0.18.1-nightly.20200227":{"name":"brs","version":"0.18.1-nightly.20200227","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.1-nightly.20200227","dist":{"shasum":"39d161bb008162f4481105be28dc9efe545d32b4","integrity":"sha512-bKoPdM+v8YjMQGycP1MaHlU/ZjbUgYtk84biV4XRetv4UOdTis2WFmLde3WlD30bc8Rh3pWsCUhb39NVTApLdQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.1-nightly.20200227.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeV2qRCRA9TVsSAnZWagAApFYP/2apIuJdjOxgwW2vfNl3\nNUmqQBJ43gVezBNph88mGhPQIjkC7Vn91HexfvdUjjnURYrZOmE9ci4fEauT\neZNZI7NqtZ5Sb2XYTQ89kQvfM6F4YYVr1BNQ+rKFtlpIfaievoyHNWd5pAx6\nMGJzn47tS6k363Dixogwb2VPWCqYMjYarUOoEvdwFI3a7pENtCJSqvcOTAP5\n67vREWvNYpSw4Ja940PjhimwJ5II7j3U0VKfqssPrXYKgO1wqDfXgrnzHiTg\n7kvRuyLtQa2lb6LNAGKRsDqrV9/2Nqi+gc6AcQaJObWT/mOP3W8de3htclBi\n1r5YIihpiCO/EID2vSBZNdU7VqFd+tO7N0V4eTDdkN7EgzhK6X7D+6UQ4eQg\n23Nq8csjSodMEXJ+Isz5ROfooQwyx0dmeUKzt+55wd592h/COjEY/11dmLi3\nyAJFWoFrtFnymDpHLJigFXVTnqp1GXtKYTlLriaZqFCe+6LFRz/dlA+CoaM7\nhysk0OG0QtUAp7at3/WtjTJj2NcBRoJGHQpGYL7fBVAl/FhZcdYGiamnMuyk\nFfvI6Op5dCy5Dzb1pB1RMPshu9bn6msLVR8yOUIBBMbRU7tzl5CUDhtCi2W+\nuMUb4ikOS2J3DFMjRUwL42B6b6i1BGhPd7vCjarXyGMrdKqiL9oyZV6WCSuh\nSPdE\r\n=1sHf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4Pfyq3gedq58okDqXMPSBB8srfGZyDDagjsS/JIFkHgIhAONbgwNwdDRkJnEE83zN3fdJZnMRaXPce7tCOMH3nR8t"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.1-nightly.20200227_1582787216962_0.7738060183891351"},"_hasShrinkwrap":false},"0.18.1-nightly.20200228":{"name":"brs","version":"0.18.1-nightly.20200228","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.1-nightly.20200228","dist":{"shasum":"2a366ca08f509f30c147393814b50a4cc4e8623b","integrity":"sha512-F8kTr9RkH9YN6OZTtVczi5uvQbMFDmFsJrqHzEoED2cmKMBmBssobBFo2MQrSAj9pe0lPkweYO7dGrDnOkbm3A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.1-nightly.20200228.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeWLxUCRA9TVsSAnZWagAAWBkP/3B8vd+hrTNoZzpUzk90\n09938XjTZPKR19p0dtiHVuIV25Xj5tjN2WJnOC0+0MKKyL+Ju3xKknxJszvt\npz4Z29WIMHwHY6y0IirWv3d09itF+LIgfzAHLlSRCCWKFSFq9H7rKhnPfmd4\nyo9uNTmzV3ELcRe3Zb02Wv6JBvv7D40Oc8AbzXLXb7JsmQnxYANWHmC4m9Wh\nyN22BKbZ8028bxhDj6KnZYXSX0iQOoXg1By7x6LKntoRQzmSyiZPoTR2TUo8\najTF3yS+aFqbT045txi3tV3q+sbDbAmu5ximl2t0LR1d2WHW/78wRfHIraed\nGczskvy33JzhBQpPDEGctWgHElhKcKypyHfLkWIyyay37MVStkjGBeiZl9ts\nCexrfHV9tD8rvjWGkL08aXN3e6u74rnE/jGetCQ0+l9SKtsV2df40PCy76To\n0mNAwD8CDq6GlLeoH35MLbS2GEIJ4sEOzOySq5vIEIpb0VczQx+gXkqYG1KQ\n/wAr2tF7JBBaks6ApzfC3T6MPiGJBOIEDGZI0Ke6KlX/HzT3+E9tOIzsdySA\nUyEdTc83CMqJgqfBPUTd5mZn/V6YQzEE3MZsyY2T+cwWT9CgXL1F+3O8dolF\n1qb1oO4+RNSMYJ/JL/aHT8u/CwTPyRd+abcTl9Oz0pGBNM5Jt4LCiBrFllro\nghDi\r\n=KPZL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB/s1p2XCKOnJTHUm6U5QCPGoMp5UtZCGRUI+xe/7SneAiBNcbg42H2zHqrlmbfuBO++swLaogdrFDA2o/icQu+aMA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.1-nightly.20200228_1582873683435_0.148963273045279"},"_hasShrinkwrap":false},"0.18.1-nightly.20200229":{"name":"brs","version":"0.18.1-nightly.20200229","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.1-nightly.20200229","dist":{"shasum":"341ceb95267619223dfa6d5a166d25d49ce4f420","integrity":"sha512-EP4BjB6HsYbC929Im2fmBMlDyoOGayeTHlqFi3M52Ls2eFX5JGjdgd7F3WHg/8qbnHjYbKl+OJEWxBuwYM90hg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.1-nightly.20200229.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeWg2wCRA9TVsSAnZWagAA+NIP/R/PZyNFd+vg6N++kZnW\nc3fqlLvwKz1Dbqd+qAz3WvyluzHI9wzeSwU/qW2N7Mc1qo0/hLSpuyScUrYb\nUg2+s1p8/f8OjwYP+LMkfVIw9N4plCXO85H9pTA2Pcwzru3t+m6jJK93zRIe\nfa7BvSk9lK3L8JmEZrXJVfaVen0cxGWRKbK4Yk4zp8LI0zj5H10cEoYz+Bls\nsArmbDALUKWIOCYvksjl58QasnC3GO6vX7peXnuqIo9uooh4SnqdpqLqZjCx\nKxx1Qi1qHaIeygItAcYnyL7TfBoUEAykQZqMHTJdZRkuS/O77m3AaAXJYSOF\ncPsFPsdafk4+m1uNy9ZIWS2GLEJEPCBVsbtAkJon6fM++3SQlBVIEq6DPO7v\nGaKmzLG5zrgUGLfX5bSUKW0vdFIeH6KHhelmDWPzya0Wt0XlOK8K3E8ZCkeU\nyJPR5JcT1NRln8jGDW2oyaPvULpmlOEQmSxvZQ/N+nrsRYmEkG3VZhsqvQtG\nP9Qy79EI7DDlaIpSCaCwXzvgyb8lfBwsWGKn0Tdq/p75dbS3yb1pLc0DTkQl\ngl+LoTqjpRl8vzW0ZSXCdx3gW2WeR71ORyU0ctmRQRkpehqHRDEcKCRNj6Rd\nZvC5x6Am05uFO/JlYy8fe2rOsD7hv8JkJh7s695Fh8/4tLqCV3tJHOo88PFJ\nENgX\r\n=QRoB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHOmh7sczdq5ZdGxi+djvYP8J/JEbTmuR448FeB97EKxAiBjJycf3ggnoplr6nN8Wl9Q68HkFGOjglOBzSA+5ZfAeQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.1-nightly.20200229_1582960047484_0.7885950908515638"},"_hasShrinkwrap":false},"0.18.1-nightly.20200301":{"name":"brs","version":"0.18.1-nightly.20200301","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.1-nightly.20200301","dist":{"shasum":"a3d1a5747ecb400a15d3693d6ebe51ecbee4efa5","integrity":"sha512-bvEzsN8yH7p9cc/PTkacFryM6hRdgdHj2il45qotR39Pyr2TSoPf2OGz1MEAxfJGA4zqG4uzSI9/NjhMJo04JA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.1-nightly.20200301.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeW18QCRA9TVsSAnZWagAAsyMP/04kBBTWjpnLlbH9Ag3I\n2rHMcrAHpvaDu9sA6K/5NeG8IQlQiIlCz85/+iCaefV2/yMGaVq4tLxybjow\nonkFLef1pzlJ+eGjJXm39C+MaSOVlgfZ4ElZk98oNGPa1fppys9c4ag83fkr\nr+W4TzSi5gDFXjKRve5c213sOd+3e67Bg8rpCUMm/4q6pepvkLV1YTiTKqSU\nyMPy533MH8S13hC+Y4TeqTzlIpxEKCUnraq5xHllQWfTU+H2YkBo/4dkWr8p\nbkUtDAzTAjvQYlWM7XzEbKq0hL00qhtgDS5wRbCVB9EKA8LXEa1sL/sHQWLJ\nj1d2ql8qbF+43jFXqPJEBtPFxNrwaOv2lhtmElr0mIyZIww0Z9jy/aeBo/ca\nQonhgZxrLV/p3woS6SoCEQ0VoPG+qdhxRKOoiUhPziWD885ZPzj2A84aiVU9\nF+FYGMWnTFCEKTfh0U6sokOcV/0rRGQBpfj+zLOk7li5L/IxKG5cT2vAcQLz\nfjaykeaQIWR/y5ZNh4E7O7tvX2/531jVbKX7oqIJupbeumeXOP86tXgVDAKm\nhXLofpwy5QLjfn9M+UDosyoerN1emZ2s5lvQ6Zx018r6AWSyC1uX+ahUXnon\nIBfUrcV4N2ThFgAn4dbhF6JvCPsoTsp397jgGeLH+nEFMRiSSA/mt24pKnoa\n0WcS\r\n=gDxK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICVUNPvkvelkH1LnwNgJawlz02rsDInl+xNALsme8JgrAiA91Rv+iyqKUaopPHDwhU52GWjWdqSgoxlOk1nKcS5enQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.1-nightly.20200301_1583046416006_0.5489649112627593"},"_hasShrinkwrap":false},"0.18.1-nightly.20200302":{"name":"brs","version":"0.18.1-nightly.20200302","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.1-nightly.20200302","dist":{"shasum":"4a1ed6c2e40bb38f95ae513cdf833253ac2d7e3c","integrity":"sha512-mc0FLVr1aGo7qXh9tf+ozOtRmSnrtarwg23ThNa6W4shesicL4ihnUlZ8Hi76Qwa9r2RZXJV7yrNUD/l7hQ0YQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.1-nightly.20200302.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXLCRCRA9TVsSAnZWagAAG0sP/i9j5gcLzT1/VSfxzi4a\nfkiQDdmweCmqLRLDiCeI8fFj29oWfTigC2oKw2cOW091/GcMzQ5BHxVV9WD2\n+G39aMK71bJIDyiB9otBhY8SQXgiCQVLQZkqW6UgvkUgthcyHak9Di5UuMvF\nIesTi4PwTLARWca4FIy4CuwyiKEm9bEtHZxycrFgLwEP0UdXGzEIJo2TEoKI\nemW8BF+nfHUKPSYIS+pOkvBMKi+UX2i7mvZ06V0a42Exk31gS1jpn77tDyEO\nblCdhHyBCoL8wE8oSWJs+FBkFf0/NyG8mSuuBkGOklt5ziVqAC/4586ZmfHM\n3VcqbgARdGGo8zdBqRqYv2ZI6CwasyNOiz0J4aG27SxN+5cAMRw92E7jBcQn\nYQMmRZaXiwCH6O9i3YfRP1mYaT2oU6YK+lTELBDhTgM7fVmOIX0Nmn8BXfnH\ntKxNHzckXysfr5xrZayvQLMHOzAWGvyv6apZgfpJOOD38XvCycodWiKJNiaF\nYZOAafSzpKBKmJCwjsEF0dYh0cgHcrJ5QgBjkEKYlacqwQiCl7iapJHJGtq5\nZt2cR0JX/VwTOfasu+MreP9wRBhp/sRgJBGZQbRl5+bh6tKGS0anm8CV0vML\nkh9Df7ml4RWro3yLDsh0PF44CRCVoBCUqj0pe0BTpBzyq5dl1Pjr78rqmvp3\nhiQu\r\n=3awk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFCS34glhwEhe5nIo3vXdSk3/5SxIhzlyYnQZOIRjiVxAiAm7JH/ECITBRylf70cF4ecRmbznxSy69gg8JcsXKJQuA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.1-nightly.20200302_1583132816391_0.2955139497252659"},"_hasShrinkwrap":false},"0.18.1-nightly.20200303":{"name":"brs","version":"0.18.1-nightly.20200303","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.1-nightly.20200303","dist":{"shasum":"c1b88460016abb54f81ea35d18dbb7b17767e1ba","integrity":"sha512-FTj2KbljogxSc4rF22NlVMoq6HDyWgz7pUs19U+LT6ANZuD3PyMNAI20WKIQJQ5kPPx5nxG/q7c0yjjJs8Vt8w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.1-nightly.20200303.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXgIkCRA9TVsSAnZWagAAh0YQAJZqQED9+WXCcd/AHWl4\nfTiuE9wJu0nSQ9/jDZ9rpI+bFu3ySoPZZtapwfvwdueNlNddaLoyxpK/qWBb\nOinB69rm+59Pd8L0gb7Pi9d1nywLOsJ9OBrVXjbfT2MuV5c+cRvnW2bsiPA7\nRrZIPLlLuzuqo4uj4DPjIz0RZi0vZ/TM9hMSvJpoqHCakvOuXsFqv11CyWFs\nYvBU2lAvfwY9ZCJ0OIOpZzYy5T6PPBNmSdZ2wSdZ8PWVPgTzIntET3RPG+2o\nEO3led3gV/5nVI838IfHcuXKuwhr8gb2AAljSJhKyiG7hQyw9jz2IqAkuw2i\nPFX4G+hgIn1EO7gULuj56VYxD4GVLMes6+HGM6OF/RHjW0sl+9aexSZRK6NU\nff3s7LBKkaSudvQg9pxWCUliHlK7zSDFCD8SNSYOcYfI8jn6ri9wkpM3JfFb\nkaAxxozHE1Zyh4EvOpSTxl0VamvbFAXFR0Qnr7VJgixqJsW1JgaYZb8YsgVd\naT8SLbTJYjL8oIsI0ZRuaCV1V4Wlck8lEyZluXNyg4j4L7RWgTeC8Z6CTWeX\nJeN5LGfDRnqWIGxepICnUlhgCY93IsoVAAsWzrBbj29juMXT092qelOtSLYw\nf/WqHzIox5NMJ0mkQ1Yte4H7UyOjg1jVHHdMdYpKrfx7fVGIhe7MIgLKxbab\n/HGe\r\n=vRdH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD91OC1h5ukReJ4qPtovP86FjYrdyGWCeXQ1ZdUnt17OwIgTMB25MJ5J9uFEAklswFZ2xguAsI7oNCaYR+oQg7VkkY="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.1-nightly.20200303_1583219236134_0.3902138670856192"},"_hasShrinkwrap":false},"0.18.1-nightly.20200304":{"name":"brs","version":"0.18.1-nightly.20200304","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.1-nightly.20200304","dist":{"shasum":"6678c79931a7f24cd92eb41ffd67a3ef512710b1","integrity":"sha512-61oH0dnY0Uf1OPjkEYDyU8ba8vEMriG0CrUJGNVSgjQ5Mr+ZCzyr2iBfObDgEOZwsUX18peXn9HTpz/8g+NbHA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.1-nightly.20200304.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeX1OYCRA9TVsSAnZWagAAVDwP/2Llmyprxrd32ljut+VG\naVC2eHiMgbOcquioeupNNS8mjmvsLwdALI5WIN53mlSmCvg3atGJGfldV6mR\nT5S18ELkrPx0G1sSu8UZyV00Tp5Gt5rjZwUC/k/ZMJXB5bv7AjCTaYwcT6XK\n3sVVXfQThGfjSAJzr+ykbfZQjRKhmlAzejWimXHCEbxIS9OtjSssGuEW9FoJ\nFMYqvY6X+IG+MQ434tzS3UGeEods+ZCrk+TaXdWYNzdynNzri37odmkqnbzh\nPWAGL44fc8G2j5j6P/Xau9i8WEL6yyHRLTjvNmqPhKln4//fK2ybfGBKV4b5\nEoqgycPsxGUHkY87KaUCyznVn6XmINtowkVjCQw+sW4QLXh7HXByeInD5u3E\nAKASfwON2l7nSHHxNaOkhH+GKi95yawJW8c4taS9Px5sXx4QMxW3Cq5unUxP\nO9VGOaupYeRx4aT+myr4Nm2ICkBVSWiergroU5Zu4q7R4HI+dH2Ab+3UEcrN\ne/pbmMAhOsZ7sDSC05jzHrxB0qi5d1iYEtut480OacUv8GKfq9BrPdadIAQy\nVvPSicJWxK3WG4Q/k2GLZCVZZjZxbwxyZno8ih0phLR63pSoDbWkh1iSlHmw\nPYGVC5chXsjT7BZoGULuMqMvO+oroaW0fynykctioKmjDDT9v0nNjCBiPTsm\n2iMI\r\n=dWvM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHRr71FZRhCmS9fA5vLSKCEJhT++f0rJczz5/7wpA4R+AiBC6c50uUDfkGjM4jq6g140uVeXypjAmZlg5v2zYAe8MQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.1-nightly.20200304_1583305623396_0.5561728837358482"},"_hasShrinkwrap":false},"0.18.1-nightly.20200305":{"name":"brs","version":"0.18.1-nightly.20200305","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.1-nightly.20200305","dist":{"shasum":"a02da42f93e73aff07f12f165ed868482992e100","integrity":"sha512-zJGVQ4wEs3E5bnMrr9pJs57Gtxgj5SpYbVUxPdJtRrE9g+YhTJ3AaOvcdQzIIG1dhEzHjBICoNDNc2JZvtwGNQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.1-nightly.20200305.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYKUsCRA9TVsSAnZWagAAXdoP/0J6TTx1d6e9ZKcBCLFm\npeW+8Lc4ZbOfB9eNwOUf05ZLRXO5J2wUIOfC6F+9CKARGUJQUAQ2KfRYynhu\nztq/bJkdZW0sp9Fxi/+L2/UEGPyp/og2p8MJuAm1mBjbdO9IDGB2J0JAJ+FE\nYM4iXKySU0gW633dDQOG+Xr2GM3SxPdgwk3nO8drFEEsHQILHQQ0jfV7AI//\nwyhq+x2OV+o7DprMyGmm6Pv9dJbWQrbnsNHFMPR/gdehtKbv2lb4TnTomoJe\npvCE1x1XC+O9atrBMoNIX0nnKMpJv7PLcb0Wd7GlNyWWwM0FElt7m9z0S1p+\nRTechABUToKf8JQcwbuRZCJhC9/ZM4FiMChjdlyoHnaZ29I3OSsJbIxLnns+\nj/uEo7W4Qx1LQdkeaKoSIQh/sGsm68xy3r7jN64k25zrhMv4L1VlxlbV3hxL\n2an/6XO60T9gdBcMrGQMUN1XulqyqJ3SzTdwAVNqj27C4e2k+TnX0lKg7xUb\nqm0nqjeeu4WHgyYeHiBYtxG4eYqDg2LptZZa1Onhc0z6HfPe/3CwezRagCyo\nZE1kc1SA1hKyq89xU0WLkMVwZlD67Mly3hFHry0Z502PqjNcuFQrFmwo7zaY\nZ8iruxed77qMq2UVZ3Cp39dnI/jIeJOwQ/UiNHJIOImDrV1y6Zfxd0KSq5Uf\n/Qka\r\n=nGpb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIArAPVrq6H0of8++YC8Gog4bwanBGp0xgO5Ws9frHCL5AiAK/yjecK9N+6n9KQWhYSt+5C1jAAOd9WCLKmObRZ/O0g=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.1-nightly.20200305_1583392043547_0.6150512683748315"},"_hasShrinkwrap":false},"0.18.1-nightly.20200306":{"name":"brs","version":"0.18.1-nightly.20200306","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.1-nightly.20200306","dist":{"shasum":"f7b1770898f253ce61313d11667ce84a669031c9","integrity":"sha512-9EDoCJ4i87lRpi+7CAYzAzOtB64LxPom0Sj/MfNMA4+zFiat3ZOI9Aoc0v3Yc1H9wpbcni1TF0N7RkMJ0IYM3A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.1-nightly.20200306.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYfa4CRA9TVsSAnZWagAA/NUQAJSInez03mevDVF2MuDG\nCoGzGXQ3QAqiov2TmTUcNs6Uh1Aj5C4AsU6Pn2uNFhM3PQeQwvVbeU4j5Y6r\nLUbUf7CvV2J3UL978PWWv4g599R0QFHqj4ksDKv9xlnM81jismdRQaksfIpI\ngOlqBSduLwLQvyCYzGGo2eMfKnDpDU+8TldpAqHZgNZpqgRsqu/V592skRwc\ndahZbenREaYdSo/At0ISvJdiXb5O16AtxX+QC10lA1hKhWW9rxmk53bAHFdA\n/d1nrHekQCcq3tMgJF77+Xqz3O1WtAm64IN8iHXYGi6wpSiW4jUi8tHB+/NZ\ncLZE4pMNfj3g58lz37rSnJrfHL9n/4LrkzstgiCfAz0W37N5Pnb+1tLxZjp3\nPMhZ0QodMPIJ1mnwv5r4eUadCkmz0+qRhaZ3wQtR/kOUik4C3MnP+FG8XzHu\nnOQynD+hmzC6MqW/juUl8g6Jds9jrvVX+YToZYf3N103IArkoH1lidr00a5f\niPHWYI+8FINh6sSPqrtgjyj4IYGia92+rut+I99BmbMb+iJhyq/Bq9k8lPc5\n91Gl+xObVc8omFJCHhDmIV11z6B6sVO2GJYpEE/qsj4Juyi/cMcR3LajSjB+\nSkj33TBxES0p9nY/rxW2KgHbC4bwlW385eaZLCWi9scWdbIHMRY2z+zXiTTh\nPqUf\r\n=N1Ky\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG0X9SUVefqAYSDtbGk1ja7snbnCyCRqfsHER4F+QRFXAiB7fB/aMeA/VhZCQJctQ9Ry2rWpWaCsVJFW7WQF7r64gg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.1-nightly.20200306_1583478456381_0.21809791766062547"},"_hasShrinkwrap":false},"0.18.1-nightly.20200307":{"name":"brs","version":"0.18.1-nightly.20200307","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.1-nightly.20200307","dist":{"shasum":"1e309289b11237ef478e4050435e8442e1b0c3a7","integrity":"sha512-Nn/G95KLYYHM7a+qCczp6IraRdOvTJRKF5J0FtSdv1ficjvZxQhzjx6cLaIKe6Rqd1x6QHu8uTDVADGe3VzP2w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.1-nightly.20200307.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeY0gYCRA9TVsSAnZWagAAetEP/iUBNLsH6UFgO7QT4Fpe\nH4HzdYfMeyYFQfDwzeHCHkQlXqKzPK7cDT8/iocLBHb2t/VSTVjwXA14k9aM\nYNayZmDcuWheaL7tyPSFUjIQxKrd5f0NbjVAxyBUnwBfYWPg1+LVrnCv+XTh\naRxtikowKy0PX5aoPn0A0VktDWIr7zVuSL0x6eiuR+Ssm40qRR03qDGuWzaJ\nplkJ+SL7AL6m4HHQWBO1FtfPXJdb1GYbiUxoDnsRgMQFID4dogCuAf1QNkUT\ned/mW876nJk1mc3fmpnq+Wi57YhdfwaeLBSzpTqwzxt/BMjzsVtata9E3kXx\njilHRvzyolwWz78QkqqD45GlvdWps3UALLbjCVdAy+DrV9SEV65E3iN3vjaM\nZep9Y+uHVDGrd9wJlFMtYnYXDpViJE8Jc5YYPPZlyjSZ0u6ZLw1YnD/Qmanq\n8SVNu7JuErbIlEAYnxECAwL0EvAAtFvMmE9hB/DOSDbZCmV8kuNEXWfyEfVC\n1xx6nN9kVD/TLfpT0URYKKgBZF9JPNu6loasMFJIJ2iAi2MYV/Jd1kWgC/Td\n9omC0nwA6ATFAE3Ib3KWwwOlonAd0ab2rO7GP6hfWu6dy7lLWdfgnIy4u4E2\nhPLEAKab/FDgYezuqIaq+uKczHtAOmBaZT4NYQo6aFiNZ47hU1k/klBQBEOO\nDotE\r\n=DXWe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDd0+brZrhm9hbAt0g5OaBGri23Mm2bzWb2F53Rj49HpgIgPjyYANLWTPVkJ654ayiGn8mZ7cr6GTnuk0jUQRC51a0="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.1-nightly.20200307_1583564823950_0.578740932709648"},"_hasShrinkwrap":false},"0.18.1-nightly.20200308":{"name":"brs","version":"0.18.1-nightly.20200308","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.1-nightly.20200308","dist":{"shasum":"73c2821591483bfcbf5f66f4dd77f5d4ba5b7776","integrity":"sha512-R+b5m8KH1XcBm5gpcZ8zbHUtTpfX+5VspbA3mmvapDoGo2WABdXUuwRioFGslfPoY2utFvjD6x+JXZj4vdgi7g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.1-nightly.20200308.tgz","fileCount":156,"unpackedSize":995117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZJnNCRA9TVsSAnZWagAAnQ8P/iDajYjbX1IqltLsEtCG\nhPc3sWPtTuLZqek+8iljNewq8fJJ+BfNe9uZESWWOPkBD2itPzOibu5UdApY\no9QiQruAWl7w47TPxlfU1SSegHwI1PNg4K0gc40lXiPxHq6Y1f7nbcr2mkZ4\n5yWV4oZlWj2BgFqBdTXcHuDkyz9BY/va6HKdDLpVQ4TZ3txmVmrjiYf96qV3\nEfZMyyt55u5NL7A4G/Mc9tXXvi1I85p62SeBP4s6wANV6Hk+CbiHySvsKGCr\ncASlmIFI0b17K/k/VSwI/oYpkXdOsn5iH+bgVoa3XgJT7OZAi18EsrUC+Kx6\no2/NBdeqTTxczAx2Bk25cSVnqbbvsq/wm1b6+5iQtQgSgUtURXgbp7fqgNmC\nxVFho97nvMGcRXfhP3nPjhv/Q35jpkf2Ck80l1vTsbnzQJ2O5OrGDISdHEX9\nbZ0QKz+eC7qq3hy5fQSvVs8qD9ruDvwaScpfxsmXnseaIiQuMYjNWX/62oB+\nxHqm0ChHClN0NPpGvFjtpLl0bWtc3dUfevqfnV6kxQCWVE+3BjBul1+iBV2Z\nDusw40Wx2l3OrGcBrn/rxCTvFvVwNlXC5+BETmeIRhmyvq92tLeR+f7Ui3Sj\n14oh71JZXA3rMZ3wCVFJd400W9LjwtQolwdQg8OLI+QLe7pNSQrn2vrBokwB\nfXag\r\n=vJmV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCF60yTkO8+QSzomKj/Jo0RU0C6I29LPU1PQ0YVW5BSiQIhAJVZAqDKHxh9YrbpdixRa9+v1M3m9G07yL3WLsrlrATa"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.1-nightly.20200308_1583651277150_0.049136277982357424"},"_hasShrinkwrap":false},"0.18.2":{"name":"brs","version":"0.18.2","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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) 2018, Sean Barag\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@0.18.2","dist":{"shasum":"c849a6488ddde3bdb91e0000918a41796aee0340","integrity":"sha512-GamjBnv1qm/WLir8Nmx5NCdACKsmIvTIbGsiR0Ig6UiMdYNFAjPqRlHi0qxsJnGY+DkUnf5fVRHGEZ92ONxVRw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2.tgz","fileCount":156,"unpackedSize":995079,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZWE/CRA9TVsSAnZWagAAT3EP/1sVjOuqFihV/d3nrlq7\ng5Zx/1LkELMYniQb4566tm681z2x/0SZrjJE1k8xBiUaAZHfNszenUxRglRR\nqyS6rSaVVv2lRYmN7Gisbg/gz9KaVX3+uWo6OaYekfK9IlwhG1lJSKXsCu9q\nJ4Ab00HC67yPFO3J3XP8iyXCu4XcKR+bUNI4gOMpJ/Q2F5lOUmjPyDBBshhu\nMT7d8jjNnSWPsvH9Cp/5YYsyA9KRXLk8Qdc90FZwOYZn6sW8rhnLYVAN59B8\nub9xfft9UVE6WeYXbHM60Kx8O98xkijGSWocKQ/wWgMKMYakhhw70zm99UsC\nr0M7qTV4i1ajPWSy3gONub2hxJ449+98XR1hvqCgPlNoiwrqz8Vp2ELdGkVz\nNET3oj9xy8Zeo61FQJTfLiHHdKgM1/Tpl1ezfiRP7yCUvoYzsUZzjNp6YRai\nsVv2QGNxCWIDIXriPrcf6oEVy3f8n3ioJYmeGMk5GDhkTJ6DesWyiJkRD2rs\nukCK6juwatPE6podbzXg81BzQQdnoDyDl9F5GEIz6dnGSA8ArL2v3ZzEPWBF\nU5ZSVBUE8VWOJAc+Ew8r+J0zx8qQrW4xSeMvdVpBqzaX/IougK4qPT6Ol2e7\nkbZpBUg2Q2du+VkdQa9tIw5xZzCYh8YtFjTtQIqZx/u/3T1ALINfqCnkDvSD\nFLp1\r\n=nLzI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdWJFRrmzemRO6TtWqO92N2d8rgZaMmpWuJBNH84NT9AIhAPTasDtu4fxm9uoGbxiPbeTvfaqI+uSMm/FwaAOe/orQ"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2_1583702334372_0.9134278420304318"},"_hasShrinkwrap":false},"0.18.2-nightly.20200309":{"name":"brs","version":"0.18.2-nightly.20200309","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200309","dist":{"shasum":"c320be8678b0f557c29fe7324e179d8b5da974f5","integrity":"sha512-38CH2dICXi8SF9cffVOi18aSIL2qfMGiEizyMuHXYSnGPXOrYeGNWW05UaH5mTT26VFEZ4aqbvecCmY+GA6Luw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200309.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZesnCRA9TVsSAnZWagAArvkQAJ4sav6nGuH2JlD8rKvI\nHYWXavFfsaR4xgDnVi2LAGT7up9clfej3HTftPuaGll+Dd2E3IozwFvm3bap\neueBTdfpt1CJOzfePImVyPR3XwCzPIuZCPO1Avo2fqoMOuRmftIRY5GBMyY4\n7cDHbIRXNYjPGVY/2b222f4oDX6YzeApohSptjBcmU4kDAby08UwJBW/8KOL\nRXaMm+ENPitlGz+gyl+m89uwEKRLu17R3vNvc+Ap3OX6McV5giJqa34/HTKy\nNnX73dIe9ddAOgVi/P6XzRg40N9q2MtXcXY2pRJ+UC9UjuaWntrsfoOgBJOu\nBv2yE/AOQ61vcJfj3ykMt/B6qgLbBXTRBJAJV833+PN5jCkfHBQJ++qwpYqa\nDSCoDtNDlwQBSVJu5o01Gm4goJ+ai1/xaTHBnKN8jboYSBVbXZVJx9vasawo\nH2ZcHgXa/Cz/TIoPAyHenmZX3YZsEqTqni3sTLVAwgcWhfF62ZrPOD4NEhwf\noTC0SqGd41Om+9FuTHbiFORE5sFG1asLhKNknWzkT77xNpC9N6tv2e5+CKT/\nK8D608U1c8fF8QMtK81tDrk9pnlSMFanN1dF9fD2iDR0arRACJf5jveTRswf\nrdh1ry7NjAmmnFTxkDb1USpnoNGiz3iQpQSXpj8J5kown8mUYt/MY7W6SSkz\nWc8R\r\n=C1ma\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1LZTYvhZT8n/rKZZ4xe4bT04b7hpQ6SpmGlSYgTfs8QIhAK2zDktt0fYrh11NI3XSjetvrjiEV1h9gxzaRv1rhn77"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200309_1583737638824_0.9792362313060945"},"_hasShrinkwrap":false},"0.18.2-nightly.20200310":{"name":"brs","version":"0.18.2-nightly.20200310","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200310","dist":{"shasum":"a32b0169763ae85a205610ef59c5aa015c0423d7","integrity":"sha512-sPHCw1t6oeTEMoIzZP9sF/o5GV7dZLxoUa2GykskFBP2nyjrZXemzzAPJxJR5jh5OgZDD81EbDIEwvBlrtnzGQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200310.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZzyXCRA9TVsSAnZWagAAU2gQAIj2VbEapQHsyOJUDDhQ\nK+JDUGk3UROSF9NmRz0VpDW3grTGfx48mkW9PVo2bMUsLpJXdmRx8MG/A9zv\nXkQIJ56+UVqrRD98x1oBqXknQC0c2tFvKrInVIZubwuS/c4deoKBeSt1zY5F\nT4HmoRNfuQ6DycdAm8SOI1Uw5wyNc4sK9/l3OFcbTmkFP9ID9b2kPag/7d1o\nYVBhvWXPrDxb8lOrJQ95FtnjlyFrC64yrmyiqhuAqqV6do6nCGigMKKQZ84P\nHMPnx+MnmgL0a3UyaDqtshVwnB0HZXWQ9atJ5A//V+lPpMwtqNoNsQ4tX6AI\nboB2HItQ4hdK480d/Q/n05mCZrDzSLIROsxZcfh13oR0jVEpdrA0v1Tgh2aW\ng0pfhFE+N+piZOHL6JyPhlb0qEiTs9UkXruvfB5DiyLChOznfABIdyOCH+Zy\nED48/gDvULz0NKoaJIXo+VT6DfBHExYvVLqTUqOn5vFPz4xHzI/r5TQU4XHH\nt9JfaVNfqr3vhlADn3PpxjajKBls+7mKpB0JsJB8Bq0hYHMsFX90y0PQWe/c\nEoqi+UvkyML5JAyrfl9MZlllklWd68yZSeMJBmwXr5bQZ8qU5UvOun5q/zke\niNWIJaZp7cxPyGwjFD5CLcwIv3TADqBr+FXN7iEZJ6pq1sDGE+WXVA9pt/1c\nYd/B\r\n=2vB8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCnKziuzrp2ZXtpHXVXRrSiFrmmozidBdAE5s4hparxwIgUAUlmG0SG/fAL9Z2xBgpvuAyE7PPh9cf+GFaKwN7ycI="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200310_1583824022741_0.07649690380435836"},"_hasShrinkwrap":false},"0.18.2-nightly.20200311":{"name":"brs","version":"0.18.2-nightly.20200311","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200311","dist":{"shasum":"ae8056189b51424d37a003e9e1bf5c67543c1097","integrity":"sha512-+NP0PLRf8EskA6zkS8d4/5NUmREZwdtolVnpmgaRwya/qjt/wfGgvwTxyPARKyDVPgGXiz3u1a+EadaZmrQlpw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200311.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaI4SCRA9TVsSAnZWagAAT3AP/1K2uGiItwFFo2lXyXMe\noQdN8X6Pu6CCm3EH02iB8Y2luQ09HTALuTjkYhFWXMx1SikSWYe17LLL7JRN\n8cFiTyKVNNBS2dWPK7wKB+a6HZLj/qhpcny/hHARjDwTgTelJiCI6ZA3qrug\nxShc93zJRf3mVwCBB5pJJBnRcTXIUTwBVTm9Gg+fIoky2smRM+OGETQqo5fe\nAwms/lxiuQplPh6GKWTgGABqvDousP1+7HtxuXtqpktmULaM3+8r8EMY6jfw\nSXpIlAZnJfJCXzYb6efazafwzWYR5+36WKmPUvbHbA/ybEqgFcD1kuYmL6YL\nVtt4TbGE3Qzns0d4dlrOCo781AxsEzIQn7pqRyDNHlkOOT0hv2OwACkAkoDm\nQ1jEuw3QMdDj4IeJByaaLdg7QOwcAgvG6n9tOysI89jNxSAvh4GV9q6j3u5K\nrfN6p1wm5XhJEDvFVLcu7ekXi2PX3/y9pGbLZcPJHN+zoEHiAHy6SowLVa5g\n+F6WJRURrtL2y3LGs5jZxF+1mnnSHz8vKy54shazg6IQ6xBl2xzw8eW7m4Ah\nCOPlrKKOwZ3tg7HhmYkk0Lfpe465aoyS8HQCZQGTiD+8ky8eNagP8L8mtjiB\ngWvNfyfr5b43Gr3riSexK7ADL5607RkiYHSTs9ivdargurUIThemQQ8PkjqK\n7XNk\r\n=hQqt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWWsCtcki8X7tgs+eKTDPJ6pctnYfJ4YXcQPo4NvbpBwIgZNjkuYR/z00oGTfJarcE9kIw5G0TDNGWV7lE+QYxbHs="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200311_1583910417974_0.21687021171669274"},"_hasShrinkwrap":false},"0.18.2-nightly.20200312":{"name":"brs","version":"0.18.2-nightly.20200312","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200312","dist":{"shasum":"ae134c4d2a9129811dce87f0c6cb5ffbf2870489","integrity":"sha512-5lwgBvWRdwLOo9hQBrvlSBsenIjrkgGH9sAiAXn1GMckFyxY3GLyWUt7sL3P/UjK0jRu094UOvUs7UDclOZiwg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200312.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJead+zCRA9TVsSAnZWagAAdT0P/00FgvbxPtAD9N95snLI\n0KcUax6iAWQuxw3tJ9tBM3wl3bpNv2vn9qdGI5XkscZH5CJQhcEFoQMP2NnP\nG7MDFc6SPCo1QAAZHsjTsM/4yuuH1Y7IZX04jzcpbLh9cMBZM5oJrBSzSDve\niNNzML2Do//afxXHKbDImA8TbZY/wwcWthvx5yWvDDKzSK7b5SwBbBoM8T6G\n3p9TyHE1lWw1IUpgp90uCM9Dlkgb5kYiMDOZWZEdZCCc/M2kLHY9LALvMHnf\n+rYaZ3gYfv1YP/rQWSVfUOy+cVxFQv6IlAZoQXiwMblhxl6a9PIQC4mLpkTw\ngWWqbD/AqVPEOP8Ei1iS7dZTfsjK4j891sliD9FMFQOHmzbgHOru+/WObCZa\noBKDHGs0MTrcjQMIP3UTcV2Q580/O/XcYxWEMM+7o+X5CVciZ/sCR7+i0uQ7\n+F3AKSlQtEI9Kjc6e5wVAC2nfCPE9IROH6Y1K8y0zu8SbQpcPJEZ+iV+nCBH\nllC2cjIzJinUpdNtV9RWJNonFMbd17URtDnluwQw8m80koSMpSo7hhAmGI2B\nZ3Ct4dS5CBlhFSuVyEdGq5s5RY4+SCfV7H5o0crnY+F8LRE9ZrM1uCoFnRJL\n7zwZYw1KqPJ9VXlQ4cQVA72x49TBuOX+iD2al2jYzNboE9xgyqrZOnReSfMc\nYXYl\r\n=XsWJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhWmr66BFksnE6cz5IzpQcuVTIF8A8BmOx9VvhoCfCBAIgd0QyuCrNO0/JssdNfpn6M8QgrNuLpRhSxE9fgwRo504="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200312_1583996850788_0.9207428235883675"},"_hasShrinkwrap":false},"0.18.2-nightly.20200313":{"name":"brs","version":"0.18.2-nightly.20200313","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200313","dist":{"shasum":"8bd6396320b9ac17164787758ae82260eec59e56","integrity":"sha512-gFiFw6b/VQt8cZqo7eXBqLM/Vx063C7h8hy1cVicm0fh4oIH7Rs8l5G/j40WxpqTASD5zeQa+twxmonu96feNQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200313.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeazEGCRA9TVsSAnZWagAAIagP/13aUVe/6AlWVFqCMem9\nB6Nj6bI5+cydQ0i3YfzfHsYG92quweKFlYr/78WnLaj08Ib76G8x8Gs9VjCj\nAUnnsF4nrF9kjFlNiinJs0zfzEIVlD2vaVCwLFyCnHFMlM0HjEPmMNR+j2oB\nJ9Nz+2sZbx7ndGmZc+TMUC50tjC7ES6i1FhdKalwR0wEPXLbuN85A7p9QbPn\n1erx6PWmsH11fkKClDSLtu82h8U0IBtvsRohtDYXIPpETpxrRqnlw6gf6Zvr\n40ypMpim5WvegrXCsjjOraaiP93ZWSDZQ7Akeldc4Qs3YYxt3QqAMDHEMTTY\nZcVmnAsAmpd5pB6zMose1pr136XCAGC90qZ53MMXPyhYF8g1IcHcZDYMVCBj\nW62H7njtjwZmgE4+XJiuQnPvjOQKRWA0Xa1ANFGXAkTaVlEUx7pQ8vtcq417\n6u+3H1pa4HDXTGy2Hq4cuISFLghqepnI/qrZXERzajAJL7jMv+CT0l8/ybkf\nM5CGYW2MhSJSfclEm4vSrU8h+lTbBEgdBgyenzXlLPKkIRzlUjA2+IwemChD\nga2ctiCLhRxw/4sl/FvtcqCK/TLLukMS8gQG7FTdz79MeQxvmHoqws1zdNCJ\nUPz2BTsvP0QzwWT8nCVoq2+asm5RVO11Wt+2O5oqeugmIy39rfg9BtFuJDtJ\nXbX+\r\n=EeU0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBV+Uvrsi7DLHVwMGyxpRODKQAHjyo32UKhhdvW7ohUSAiEAjmRnu8yrRx75QTBIwIiBVBFQhE4z0SSn21C7a95IxXs="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200313_1584083206153_0.2981491161407839"},"_hasShrinkwrap":false},"0.18.2-nightly.20200314":{"name":"brs","version":"0.18.2-nightly.20200314","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200314","dist":{"shasum":"3c2dcceca236c6f4616efb2848348c49cd049b05","integrity":"sha512-g13wZTehpwqHM3kz+JXRtGavDSzV98sL2dYLKN8T+9CoOS5rwQSd6C4stCdJ7L5zKvOI4DHNUXKDeCSqQ0fKKg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200314.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJebIK7CRA9TVsSAnZWagAAAVQP/Auk3DgrekJ7CCqZLTdG\nFqRV0iKyxvtlWHMkVT1BI3TkMdapeMa6k7+FY8NJq/MuTb9Lc35bMQymDCp8\ngpUJ3DkY4CWw/iBCmmADAZXmBqnJq3MsYatYO7XGxFV8CYWwVCde1UeLRw/m\nXoauh2BBejp2Wiv3h082UHLh/atFczMrYATNOKwioup2xAKORiV6zMEmvB9G\n1Cdi87LblgiXrAHmmDLnEHDeyYooCcy6FoAqF5HJUMVYinXW2Wpd0M2xFW+4\n4V3zZH5KFEHf2twu4PH8zF8Y6jbBTJZP8vfUZbfjVu77lmB8gkf/hsH2ow3z\noT/XVXW0/axOnhRE3FiraYeGWyzH37BwJUAx6yhBQNJHdWhRqck2yFWz8YZJ\nZQQN1cAqYmaJjrIAq4yxmvUB9ihRBxJJ6eMsyWS39tooud23zsNgqWmOJOoU\nS9QFoECUInlb+0RdWTDPODvENc/2bw0swG3lznmt2CEEs1UcBYN2HW4Kgbg+\nS0NA+DVSKFAh3NEcOKv2JAArDUHzg81U3VSresfdNP9i6HHf3g/UD2fmt7FS\nDb+e42tKmRQ9eUoyK+tNWfyXkFIPA4P5YzaTCHw+N8+KI3R712LjHU4XeC1V\nlt0flrZmcf+EuV0NO0JAeULUQSNhHPs79fx5b83A5imqnNczhMDDIN9LGOA5\nZPjV\r\n=XqXi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGlfz2Im/TXsPcG38eD0hN8zSqfzrfpXrwIbx0eV7nniAiEA2aKdJkW3YfIkkjh4EEE7s5kT7z2ypSgoPPhK6NExNLE="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200314_1584169659382_0.6169625697215153"},"_hasShrinkwrap":false},"0.18.2-nightly.20200315":{"name":"brs","version":"0.18.2-nightly.20200315","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200315","dist":{"shasum":"1ca3d8961a8efa1c848e383e691b4ce4611b99bc","integrity":"sha512-UU5AfQbOc+NxgS5zGlEu2DF5qTM/MTwcafyYTo1sJSlWIUADCvVKYY8CfKqy0oeHddFjClwbvjQt0TNm4Pu4vQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200315.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJebdQYCRA9TVsSAnZWagAAjgoP/jHgkzv2RqbGw7xfJLQL\nqm3tln77M2EVhQeymK99bnvhagGp8kdPGMan25dMNFFbVUdpb+raSHwkEZSb\ny4jJdX//GDvAA3yNX3ryRl4ubirxqQbYbgs+S25omLkss8adKDD2wfCT07IE\nBvmoJwZXv369tP1s8mVxQmLzs4iTj/VoUhYwvhkBr3ZWv0JX7GrAzycE6kcj\nwkjfU4l5/Gcishf1yODH49WLkRJ+ujFdVZTKbCydctGCkG2VBg5iWpgLGOmv\nzTyzmeh/wrETdwzbUn0DnAsqX3lkj6foI38cdMkCpTDqNC2zKJawuJ/PIJI5\nN4BF3+id+XXgt5A/enPBfIr/qqQ7tiPXJTO2mLJ14NvE09SR3HHEuTVGJAjH\nzXBmq99hQ65xRXoVzx4Sd4er8dxhyW3K3zHei7d3ehr0qzQaSt7XzXyEBCNV\n0dutUZUXLYk8/m3u1Z7SCecZpImswszVkHQZtaVKkaeqdcRm3stbn/E3J3H1\nNaasjHeCmEAEeEWwLVPRcj/l/bC+aoo2hiDMG/sEeeXczTrrr/0OHwol1Cv9\nziPyOIkPksgWZ8BWaO2qOcd3vjD5brtU2kcjKoejEU0LgyZy+AuALU9SuzVR\nwulns7NgKXzJkcDacEo+tepJaFuvjnCCVRmFfwh7Y+5qgp8/tKLfvlBPu+wj\ng5Ki\r\n=JZRi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2SMs+xAY0jzH8Y2P3ZjWx08B5iMJMukKHluVxnC8/kQIgD3bcPMaDpnTm6VvN6txPhUn9wTrQQpEJSP4lXvh12vA="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200315_1584256024017_0.3546435503039076"},"_hasShrinkwrap":false},"0.18.2-nightly.20200316":{"name":"brs","version":"0.18.2-nightly.20200316","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200316","dist":{"shasum":"bcf7e8e6ae4e4f0783d97d3dc1b49363539fe895","integrity":"sha512-TBuk5SFPYOIyRCuHvHvTJdEaDM4brJ2GwBKeZ6xSFslLj2fldGnOMZvNGPONMyf1y6R4rAFVD4hTkZevZt94Sw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200316.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJebyWmCRA9TVsSAnZWagAAC/EP/jAXVTTLfxWrgnb64qF6\nityXhkITeFR9x9gS5c1nIaZT4vS6KuPE/pt9qssyz7xEFKPTMWr7dLGu6gmh\nbteI2BJjvVzM6ADBvX0hdSgMddXwk596q1cTo43VrcX/yYuGkPqA8Z+Mk3Yo\n3DW4GCfJulFCnS5GNmPetg1EQz6owwFl/L6vw9EYnsA+dY2Y/eOt7po5IoVM\nPBgteA4+MwVjYbKNe5lAVmeH0JKp8S5JJmmNYzNU3stKj9FcwhHYJJF8+0Fw\nbeRditoENkCxIvNdnT1a6LSCN/dCbFxZ/HSTqIiTGNG9xMbFVMWmccZRReP8\nvyg3Gw4ALGHW6fBkkfVO18pZvMkKkYsiSmKK1Frs8nCqMdkmxZNo+eNfc0nN\nIDjeFIz8pNVmqvC/xmbCdXCY7evVfP+qrGcZ/FXJohOPD4rEm7vi7Kqp7Ywn\njs6656XvDMYdiiRpbulBgVQ7qokpyMLzqWOjAfz9CPcMq9j725EFAdSxZSu0\ng+iBZulTb0Rie/M87j0mdSy4B4v1FKf2HKae1NX/d0P4rW3XKRImZWwyeGiX\nIoX+KHUPjyPgHGH+m9e9MFqdtodO2zY7JaMFzhlJRQUkIn/6w6oCnTLptgBT\nthqZ8m73xMAsjoBrNpzfaNVCk8GQT8pQ0cSAKnm0XRcI5Teq3BaX3WDasM1e\nBNqk\r\n=IXZz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID5NcfoiDcs53mj3bdj16FwA1MitCJgApUQAw8aisKCjAiBTqQ2Oll3d9DQ6B5Dtxhhqc/8P78Lb0e5moLhH/rdLlw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200316_1584342438020_0.5839204403374771"},"_hasShrinkwrap":false},"0.18.2-nightly.20200317":{"name":"brs","version":"0.18.2-nightly.20200317","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200317","dist":{"shasum":"bbc6df12c77ed65b69e3b1ca64a2e9e172f69597","integrity":"sha512-ZBM2vnaHiCZOwjQrIgruYUF5SU7a/a9eLuihqOwyHaYLBBrh56FlNWxUrqtue2pRlVz/892UrSShVK9zMpEmBQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200317.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJecHdFCRA9TVsSAnZWagAAatkP/RApv3a4OLbABPHPrEcM\nrwP+4kR+FZeDFJZrAuKH76fHYmX9z/DHe/cnJBWqPFifBq6DXBXj/5r1J+bK\nJUgobcZugI4JE7AVXiJslEXOd321QAMSeeL9e53mOBarUY8KEIlTr0z02ADv\nK3Fe2+CJRwWCWjLZ4tC7PI0t4kLCx3uKc5RH4fe4tePXi/PmtdVlzytq9OMM\nyU/jYQ7Llz7eV1vI04cfrM46eJcYvNB7TTfI3jkfTpBs+A/OxNgQgHZw7uWN\ndIkfdMificx5u96VQEQ/L3HVAt7RC1w0dHjwVFz0HirkCGQ7HN/AzSlW+6+p\nT92akuxrKotFjEM96zSdK0SgFfG0eDtw8uM42Y64eWVtWLeOL93FRRSd1o9m\nxcWpS5zaM0AuVnsorgHiTN55Z8mGv8W29UBxjZEGM/Fi9EnqJ51OQceKyVHN\n3zaZ8wszoJiCirmRm8eDeIBdm9dV5wf52Zvm2sphhUxU3Z9KePgzFW/h2Tfe\nSxSlssYILUn/Q+BCJWdfjl6WcmGgS+fLVnj3J05bSvTDYlHC5wkQKBc1kLy6\netut4sSoTBuR7FlNiYIPP3jTPLLnqSM0L661Z4MTULQQePzPvnXTEe0mGBiE\nNhiGnkKpEAvqz00PhrweDINPHw1AUfs+UC499mQAC9nnzdGYa+cyiSVtXMsP\nzy9k\r\n=qbsx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIENanlpp4POShDJ/1CFxuCXPwXbZCvEFNWRBomh1kVQ3AiA0YFSKTGR7r22X74y3+d27rARzkFm9jHooFUh4reS7jA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200317_1584428869343_0.6155713417820239"},"_hasShrinkwrap":false},"0.18.2-nightly.20200318":{"name":"brs","version":"0.18.2-nightly.20200318","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200318","dist":{"shasum":"6a869e56bfca0878d545bf335f6fe50baf75b3d8","integrity":"sha512-j5SJLvIM0eq8+iUD4y3IEEvBGv8F2NeKRf6IHqX0z+Y37g6sgHYZPk2LmLb+4gbmIzOHDyycWl2cj36Bu4l+jQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200318.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeccjNCRA9TVsSAnZWagAAlNUP/0xBapnEGPrtGMOhBABU\n/nTKLrdda8TGKUJsEtWBEW/hFtKZ4uW0ud1eKmR4KiPYVyyiPfNKJZJW7yZI\nbbYJAsyxZhBCEkr2Q+UKSYCWmlDgcnPT07XAuk/pMlOGDfhP8pJL4zWQ0ipt\n4S9zYL6rvmcsh7QG9YwLWB0uSoVmJgjfznltKhH9L+cjQA0vhALp/7UVhRcN\naH3BsICukBLhWhkcK+AseJ9z8ovWv4ICGKmJShQXeQ8JLFla5QsKpoD0R4ow\nqOy7BcSXYt7iZNY4357Y/CzIID+Eghux2rnUgT6fTni691wscv+Fpnj2WC2P\nWaOQ887M5Lh0HbwcUdOiCR620tKa65xM1JCbFAjw/XFR5VJxmbi3yVjQklJs\npG3LMNtlenbhqZKra/hl+nu9Ln8RzC3CitkT0dv7MBNvgqGFfMh8LSYc/53Z\nEG/wR5n2xNhzORnRNMXHDV+DXsnV6krKETkFeexMhOBx8yBqErlSGlj+myHF\na/d2/WM11TZeWU9BlZ3uY+E3tRM2n1TOHU3OTIZPe6/hcdMTJok/aQG9nWwO\nUsx09sxp5UAbx8lxMERTs3dN8hr+YI/4uDI/WEhNBhBBEsid1Kr8V1Oo0mlh\nN+aTYPSKVTQQErh2jcqTQBQuxinYBKJ+E7PYiN9XL9N51tMcUtKWwOKg4ena\nhFKq\r\n=zWWn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDFfIl2sSbmMNO5v4khWoJxhjfiPXDA6L60ybk/n9smyAIgc/lL1/++jGFFFELGJNo2PeCyEcENKYXVqJK85JmuFsg="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200318_1584515276475_0.05147589733882363"},"_hasShrinkwrap":false},"0.18.2-nightly.20200319":{"name":"brs","version":"0.18.2-nightly.20200319","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200319","dist":{"shasum":"082ffbf00bfb56489227f908a59fd6ccf8d7c8fa","integrity":"sha512-5Rbrl4bbaHGPLBDSGSz9D5V3of5QTBjF2W7lRMaDrS1vJ5j8WvJAT/p3iN1J0TGoGiOLVEMCWi69lBMCIhm3hQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200319.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJecxpdCRA9TVsSAnZWagAA66wP/R6AJOj+3BhLHFSl8XE2\nWFVHaJMusX+jpoz0PzpgFteRnns7P48cgQXwOwl/1Uyd9vgpZf0RpzMoxuSr\nwgHWEJJLf31TZLnxfElQ69GCtUo0f4HuSOyH7BoTbJ22saIz41EM5eJVzQWK\neBqfWkwXjsco+EuFju7BFnCGDQ4ShWbuj/tBxqemlQLWEuwPA6RBdepqVDRA\nk9ZrC8C07dDqTefDle7ognqG7UHIZpKInTcMPdfZhl+KR/RH1GbFZGQ/E3h8\nV+b8WqB05dzUtvv9pGeAv1tYkot9V1XGTOrEdCQyHrUF2aaHiwsqAwg0IwhS\n00K1EdGN20wsfXofrRvWFL2E0TeziMyjcIWpNesX25ChweShiFcu3axWiTge\nihSivtvQIUgvCU05PrNvbB5Akr++2C/Py/YNZ8+ilhocSfrYeerepXuI6R2e\n5ZoHW7q2ZgbtFtopZUuqYXgPwvcZYc3ZAV04afvByzpsRfWAoZlI7JYj3j4i\n7+fb0ZVv406bGPhnUroXm5GMykiFB5EFPhwDlf/QLbrnmGEi3JEC9yU5IDUx\nZ4R+WRZ7x1l5W30atOz/ULZTsMWHsap2ByzTQoBPqTay/5lnVSL7n86xKCiM\nlpfxw/+nnxRASgkGcDH28xakgqsh0X4tnM/8um7yWWvmo6wjwHEnb5nyP/PL\n+91E\r\n=OSBD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2YJUPsg9JRoTkmt+FqgDXzcRh4ckGseW5z5xwnaMlXwIgCmsVBoioanJ/ruoQ+g17BdmhF81p/Ry0pX3EQFWzIfg="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200319_1584601692632_0.3540309399945436"},"_hasShrinkwrap":false},"0.18.2-nightly.20200320":{"name":"brs","version":"0.18.2-nightly.20200320","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200320","dist":{"shasum":"9c890fc4eab75197f208e509ba75a08eeda2f961","integrity":"sha512-ZBrp5+AqzWRri0P67Pvh2tIzuBtSw59mJTJM2+u1whDbHBAx1WQqKY8WHRcMz7FQ53zhti97rdxWtmXiBJp2bg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200320.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedGufCRA9TVsSAnZWagAAcwgP/28FD7Sq19YscsKPWuG8\n1qSfqqtO3jA//yYKN5UBvZcrwTLQlZkcTgpGICZuQ35li11Y54SrdfRfwEWu\nkpg9mar9JT8Lw47oeUYYUAdi7a4dOcEaNL0WNhGcXIIQxSQJ+K0DC1L/2kmP\n+ow+PMmStheiBHNUXz8Dpyj6EqATnBdNv3CT/bLorkBZ9gthKUKoDvdaFmoF\nLlNlq2jyR148IkHV/S0hc8U/eVvRZBzDtQqkwutgW4admdNm7+Z1BTSWK0lZ\nJOV1JtY1EKMNWDJg6OLnGrfgKHuw7AvU3YvoSNbILU14EIARDm790BxIV2/Q\n4swEG7Fmw9QnvdRgXzRhBI0Oavy17OmRMOHIn5c/XtqjoWht76b2+la2XaUR\nkg8eYEIFSLaYOkqdP6v3mIENXDZTCJc/YWwBFsipW3J6rBbysPhJbyMrEpjh\nnue26/PduADyXZcVpKMje67FkPTGMXasXX2YSspzrma1FDYu0AzVqKN9hQCu\nW8VFWbqj72vVywcIc7P0IWlBkbQf/AhgMACAKxImyKOzPm7I7jbz5qySSzue\nm2cMZjgkDRxIsKU0jZbgH0KqAMqYZFNgEBw808WRsRR+ZfeV2xalLu8O7cUS\nBwyqhSWmJxIdFjz4EOgH95ciXcsT7z8/F+P6Uyfk4Vx1iJG7C5JaeL825Waq\n6HkD\r\n=90zl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBDfIWJ1+9Pom85qT/CNhndZi8Kk6Dm3wRBObmsigtGhAiB+DI2FW1+OvsUtEH9MSYtfTA/VyqdUtZtOhijEvTJQ3w=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200320_1584688030307_0.6763807132509903"},"_hasShrinkwrap":false},"0.18.2-nightly.20200321":{"name":"brs","version":"0.18.2-nightly.20200321","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200321","dist":{"shasum":"94d9f3222fb20350224f8fbdb1c721cc66c06584","integrity":"sha512-W6qLKJkKmNhHCKlhUlFsSE5HexNj/PKeLd/Pd62kkgYRC9lrBqCq2nt/VUwvH5UYQL/e733I/3VE8e2Ka+g0fw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200321.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedb0yCRA9TVsSAnZWagAA+hsP+wbiMkrbaNW/dVW/a3Zm\ngKD9R54g2jWTzI7cd7yJkzokv5Tz8KhmHZy4UTWeXzSBO7NgPOQkSazOR6H+\nxW/vvot9wfQ7tVE84j0vLrcNHssLr2rXl3EiaGUk6M7jiEafLr33q4hQ87kE\nGMiSAZE2mtfZtBUX8wS3yIBvHMQNKnViba9wAuggFV+jH7KNz8RFnKnJZCFm\n+lZ9n+YTQZKc3zC+ih27U/gEuzmLe1wwE/7TQ/sOoD9++9jQEdsK7WdjMP1F\nzIUWwIIfmrQUXoCJbGVAkMvqq+34gMUbTe/L7+hAtE2k6tH2nlHFWrVLkp+s\nKMcowv+gwZ9Mu4hjsXAFUEjejaQWG17o0z5e8Piw/yMp7jMNdtDfA3fH8GDA\nWQGaXdKK2alWx96IFQw98gpUqVlLOyHB7UrZvNsD21/R7EZqhfqvFFFm+Jo/\n+WsqguqDZSyjf7dJNkVzfBLTJrjhOLuH5nmo5ZB8MCaRUwZ3srdQ5K8pWPYJ\nHvVDay5YCPjUAnbk3hNfUpg/2C3pZ8GNU9WnUzsYEaMu7mxjuJVhcjg9oVMm\nb11IiBZnIKNN9i4wc2Nf0do1hAE2lQoanmttrPx7TXG1Z2bD3eARpcd8Asfc\nXzUUzZ52s6O8m58kFUnqqMj+e7/UuaDqZtRy1COAyfjRYLvoHiOL5sssympF\nfw5O\r\n=ImMr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxY//ot0UabSdvXOxaI+Dw6OtVN0c3oKZ3fOVtND9p8gIhAL1PCK+qvEu5BtJNkduBFtAC/EZuSUOz8XeVGDpAAw8d"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200321_1584774450017_0.9230608632260444"},"_hasShrinkwrap":false},"0.18.2-nightly.20200322":{"name":"brs","version":"0.18.2-nightly.20200322","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200322","dist":{"shasum":"26ed910d158fc4e07f1423bffb3f97193efc2490","integrity":"sha512-eskrnzxgidh2N4v8oVstP/YPNiKpCLKt3d2afFqZ5CR6BdszKtIbJsomZGioarIfalcH1m4F4Q3/iZflNss67g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200322.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedw6PCRA9TVsSAnZWagAALKsP/1hAy8OSwKXvBtnXdp6Z\nIx81zVCp+gjsDkzElsvn//0Tmm9gnh5ruJdwHnA7sb3wZlTHq1v+G+tg6yO4\npA3lWIWOuTO5fsiJ0kGDKuc2xeYPK67zMi2cOEFnRGLtDgKIi0SNTdmjj2Lk\nUsTnqQssscVm1p2wxEEYI0DQ6WWRUHkksJ1nde+G+ANzs/Lp3qJ+x2Jf2/ip\nLnp8LI6aciBHpECc16CFSJQ0uOFgW40EDvyWlXEx3qqVgzXfnQ4lLdF6k4Lk\nPtn9zPpll9eQ9tCpSHqzW8j+unu/aeyQ8o5RzMn/oBEYkJQe80g20xmp56pF\nJnXYWhuVEBF4UQbUUim5JYexncZtlNDKWDpfrCISVLafte0FLYb6hIuEsc3f\nxoMnx49G4ap5mO0cE6U47Q6C6od7J1km89G1eIOFA2vwQE2zf98XwGalVQiP\no7Gkcb190I3S7ZobfX6TR83HtupfuxR7OpoDqAci4xmOAZ1aPEcbK/HyJAYB\nC2Cp4N1AOKWXhuDf8bCBs4fUYCVyMUfMYVnT16S4xZZ6gy1DKptJsd7yobdz\nynn5KLZynA95x/XOj1twYioo0/LLYRR7nUciAey7XQKElPTqYz8Mca9octEM\nvSyIGDB29a/E0WCUNB9czneKJGSjw5rhlAlsW2OdyqF4Gddl1/BlCrSxH6Kc\n59iQ\r\n=RFxa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAY6+5rT6X8mF1OGnAqGmGlfXy/9FB1ob8RGtzTIfCx8AiEA2XVIkmVNi1cV0sK4wIg4KiWdbzKjY6/VOePd4/qKhYw="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200322_1584860814861_0.95974669294778"},"_hasShrinkwrap":false},"0.18.2-nightly.20200323":{"name":"brs","version":"0.18.2-nightly.20200323","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200323","dist":{"shasum":"299c018098ee5b6590756c8b16a5ae8d05ac5cd4","integrity":"sha512-QiixvUQoFkfazqGQ/gRT+eh/Gt6LYoBqo881SX30HRjJRZ5FUW6NwzQP8O+a1N7wSUDhKrdlnY7A3tgs9DzZ3g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200323.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeeGAYCRA9TVsSAnZWagAACxUP/0JcRAhB0YwUeHm3f5EL\ncVBg2Mm6b5hwHy3W5EU2y31wt2wa6fzaTQKGUdNSojb31/L08N1mh3WxF/TH\nRsktmXYEviBgoLxPLMimGt8VLtP15SpJdlsBa+i1wA6+uq1V93Q/JurGScpE\n6tGfOLQUOQ4t/TXv3sz+zh1BstEVcOIxDGfeMs/9zD/58Ww53zvtLWIOouES\nWjG0bN1kR9kLAumamldYQ1XdEaDOg3m4mK+z6kYm6c87sy/LwdUjXu1i3qEf\nm6vNsA7kY/bczaf/hb6BwfyEONy70o4cjn/Y4HhQFCGhL+b/H/xGny81dvVI\n4V9IV2yKN1Vd9vQAjT0Q8Ak/UFHKNPNnJObKzqUqhfviqRUmK2pgYSDJ9Vjx\nyWGWX8eFBdksB95oXFT3xoVDfQqLjRywzXjIzETM4nnSF/dbn0UTDwg9i/t9\nBlKAzTdNeE7kaxAi17Mf9JxyDX8RglLkEwchrpUOyeJ1PkgMC+Zy6CYj4yXz\nJjttDWan/HGfhV8H98t5unq/a1XVkWVDqDqW0pAeqdkNaSAz4xh8YiLr5Ty0\noR7WSsvr4Z2O4XZyxLpvoS7PMNqVlXdRipZsegRl5bFLhLjQkal1icj+eElw\nWJj47Riv/Jx3BQfG9nbeON9uuYynPv9z4PGLgsF58yDZ9IdLnFrEi6mpFylP\nrz+T\r\n=SZZI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCprfoG6HapIOBOz2dX1qJn2+guMJuu84A1B16g29dKAQIgF1DFSehqNnT8ZPU91K96Bu1g4Y/PFGKq9ZNrI2ouHws="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200323_1584947223487_0.8698740176735629"},"_hasShrinkwrap":false},"0.18.2-nightly.20200324":{"name":"brs","version":"0.18.2-nightly.20200324","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200324","dist":{"shasum":"fe753527c3e08f77171dde72241f4a235257f053","integrity":"sha512-0MnrxH/EPxVELPxFshl5v4lTmpxzC0RPZonsH9aNYxUK1GY6cFmti7+pQSBl9fbl+XLiAxn/i2t28SM3L9g3zQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200324.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeebGyCRA9TVsSAnZWagAAML0P/jkAvuGKHJnUj6GOObD7\nT33RtTDU6fA8b8swolQPXiUGWpO44O7TOv014aOirR0aPO0lYRZbeo4rvWxu\nzMJ5Xt98U/pNsEFZGRRsg6JUrs8mQwk/Fg3qBsyRhoPtepdt2DYJeowR+6V/\nWHBu5S3oc93inMMRtBwFe0PvJBFTrNesWxGwZToTAHJ656Rkz4h9x2G9qfRe\n7wRXXkMiAYRK/0RGPqt6oVYlN52ao4RUe6QbVaaE0CLqTXbboUXxcrlJ8l/d\nOs2gQj2+OCZIz1etOjLHbutcDMXfhpLN797vV8w/M74gBVLNmP7ncVyfzDWl\nG9GWlWui+ppb/ftgU7+3/okZrNQ7D6nuoHBkjwtmaIY1/5DBvU6XMAV2dtV4\nCEm7NwZjIGHFTaK/r7agstwCNtHLQ5ANuU0X/PRdGGyTbgcsdoceiuGaL2sO\nY5Xn9RGQB6tR2vOexUKf+AvhCKDmgIp8eF2oYj4VzMU1lARuoNLD5jmlzrcH\nSeTlLsVRYY4dmief1od6mra24KGgVIQnNF5kJJPF9DQLeQQnTToBKjPyVlfb\nTlHpEulm1YluJO8v5wjZVU9Z6Y/gY9VHZYBfegdaB4QXkdLNxsmP7es3rliN\nS8U3mi7f6Xv55Z7EjohZprHQGpEtz13cPcrOr656lw2ihRELOc/UJf6VtS7j\nRhoL\r\n=IJ5+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDaCoaJQkECBPiD4nHztANAAOWXIerq0Kw2YZoEL2q60gIhAM+hDbSkm/KaiG27jylJvSMlWoyKMKZNyOmipQ5KGDdp"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200324_1585033649520_0.08024040646262143"},"_hasShrinkwrap":false},"0.18.2-nightly.20200325":{"name":"brs","version":"0.18.2-nightly.20200325","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200325","dist":{"shasum":"5ccf9412da2b41399227ebcc608f4fd40623ac10","integrity":"sha512-MFUdgim4oZ6NVoBn6yYiiHNtVe8TYU3aV67v7j4iuZhI2tvuhCypMYYBLXWeKGJkAvt9nBoU5XkYxsGNL5ckTQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200325.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeewMiCRA9TVsSAnZWagAAw9kP/3xP21yGbSuJiqJZovq7\nVPepc//bK4v5120guymFzXwLl+91OQVRHEngJTkZvE5PCi8CUyjEQJYLmtCG\nqnWQS69xEwvqt42rc7GeA/X7JJ6ZkvH0gjvaYlsUp48Y1FTxlV/QtZRbLgiM\nLo2phprQXYylEB7d3omx9TfrM0AEyhKfGXFrMhrGs5+R/t4EukGW1CPHZiqj\nUe7Pn4pP63eRcyy4M1tnsLu8+faeNS3x2Q2eg7xFDGk5sE/tOJwAcSIhf6LC\nls9PsG4OevNeXCJ16zfEGRV9w6TFB8+QmYTwo0LzhjgWOyqim4Rpxzjx7c5Q\n3OYPTmsOP+bk2RtcAWYZsMWtRcYSYoIPKYNH1oIZs6mY8Be6WjBeEhwTnwAL\n/9r4knsfNH4v9j8of6Q5RwZA7UMjgJBmcA81ptWvhybzXAgH11vKV4K3fr/1\nDZxdUDKxXZ0I01isp5+j33gqRbqqA0+5iVX0ZF8hOwrqlPRugIYmnZb6b34G\n1UW1+HWT4r/SR5AuzHq6C8bmquA8EgwkvhnwH+SSpRA2IsYsLpPJxNOHjGnI\nx/natn+joZbmjvWwlGENVJA5eOHJLN/Dm6/iRQeom5utsMLhwRAWyygOmV+g\nAK4RnSPQ1/iaqOlrQ4E4rkuFBXPU6h8PMsC36twfoYA782hg2YLPzTYrR6e2\nu5mS\r\n=9P5k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDAw2/mcICTtoxwZmCRs6dtabdCVedKZX7SJ9yV1oSB2AiAqoZ6J+30eWupJ2aYXJp7AGlopwdJ1wQkmu+xcwjzSPQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200325_1585120033787_0.2371339520482585"},"_hasShrinkwrap":false},"0.18.2-nightly.20200326":{"name":"brs","version":"0.18.2-nightly.20200326","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200326","dist":{"shasum":"46c25c48c10362b5b3d1b11a284f2bf73f1254d0","integrity":"sha512-E1Ujiw2HZSquo+ehsu982MyB+7Luoa5mOe0sklAteUrEY/+g8acg83FDDIBsspshWp2XNtxo1QHAOIqQo/dzaQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200326.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefFSTCRA9TVsSAnZWagAAKP0P/3ioT2sG/ZW497dFTia+\nSRMa3x/oLkDOQXSg+bOrMpDPtv85JSnObMTqMIqClpg9f5h9OhHTScgC6kq2\nB/cjE3xUfFAfkwlGPS/7+dLaxgejkc3II6bukwF7TvtdR1ll0CAu0q5zO6ht\nwGWE5Znc4wl2tk+RgFcx9L73QDRsx/eRW17+Q9kHsXrSh1BEkfPHqdDRiH0m\nhgHtwA8buApigWVeoukNTT8YKgJIa2y/9fJ5Kw5ASMXLFpLFyxvwZEpH5ao1\nZ501ciQZ6CkC1b0RIEtJr8mH8O1I57TQtddsCWmRc0DEKcD6ORQ2jMD+VQ0g\nlreLh4hivqvukurHSIPQSO8kv60te7ki7ZLhZIpulxLyybCdB7Xl//58021R\nSjR+nH3cl+8y/HW7UZgSJjOOOyHL2+/mwM7sEShxa1hbVv5nkRbQP9Elerie\n267/VsXtWaPoQ1dBhBYDBxUCD07gtkx85BuT0FBpCCv9DJl7sL/uz5ouTaj5\nvjhCAwzpzqDvXUxlNn8rB5L/26egiwJRH7IJyHIMb1MVrk1ePAakccGnNnQO\nhIPKuSIyRgPq0pcVoE32v1fn7dTlW/tbQj5X48UlEExCI4YFdApPTeg8u1Uo\nFdhXDD6nLs5OBZdtcwJ5MtmVRDI+A02d5vBvNNfpn8Zi4hQaHTsKdHJRYvGh\nNdfd\r\n=kL1O\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC82OZeUOOjfomLp5PbDzB1TcX4s7lYv2G9Zcg1tFCHgAiAi9rYUlQrs+MZyp+9cFa00wIlkXCXWs6Wh4ik8naGLZQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200326_1585206418498_0.6508583468026259"},"_hasShrinkwrap":false},"0.18.2-nightly.20200327":{"name":"brs","version":"0.18.2-nightly.20200327","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200327","dist":{"shasum":"7e4c99d9a12970b1fab0f68673881c7371a6613a","integrity":"sha512-IHglRvHKH+VfGeQpT28YaKuQ9mYim0M8YDEzU3CzhJsFMKQX0f+mRuQOoGliDFJRdPMaZhN0t+hInxBu9KPZKA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200327.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefaYbCRA9TVsSAnZWagAALt8P/jrs+CQJAp7YKku/jnHa\nj5+0qT8MH89uqW6Mqv8t/G8RuRaf0QeBEzXDqSqrNR9C4NU39gkyijSpSDuh\nEUuB7AhluhzIyEv4bx2g4Eo6DnbDa1mWyU1jx2l4JgsgS7DZ25dlbQI2UWFT\nIOcg+1tdMvSIjplSUfJ0zV1ROGmoiVX00fmhZssDd0QIU/aJcc/Dt6lvlUGZ\nudcOcw+77kk8uQTP9lwEKadvkR4gLrTzYgEyH6NNkONVd/8v+rlXo+C7w5lL\nxboe/iBoSW4qX5QJ8GV8pfMA0JxknEYQX2TziTq7ApFhHSejcO3cInZGPRNG\nR9AGw7lZ3p+PWjthCYI1rndRRaEQteb0wepxcCrcUf6MY+rFwrp9SkEYfZKD\nYsjfKvPVRG7rFAgMH7llvOdkhESlUJa0YY9A/vqqkyAG663SQj7yFfyOk+pj\nDGI2r6DBos+LJYFcdaNFJpqzNwb8MIBPhUGPvrz24oOcUWkH7z1PhvR/X/z9\nn1zIN2KeWUqVT+ACUbM1+k3ebu0TVf1c6ju3rxKo4IvntbjG1cSdfe/Ed2BW\nVxpkHqwgEsqSu9lOtg3GPGXmRIHQVA13hmTqCbLpo9vqh/V4/UepqFbj3+g5\nb99oVHfHHkxJHBlKQ57UzfhRuR/w2VLM4uAARzrXDTWOMYItRtghp8zwSsvV\nHoM/\r\n=YuG+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC9Nd7bt4iB3n5iZ5hxoQwjCZMLPrvJpZwkMuNO/MHRdAiEA7nC78/rcxQpxzDjDpJmHqly2vNEFEddZBv3CgApNgdQ="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200327_1585292826714_0.6126917858865795"},"_hasShrinkwrap":false},"0.18.2-nightly.20200328":{"name":"brs","version":"0.18.2-nightly.20200328","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200328","dist":{"shasum":"372dab8122f01c1ded95ec53cc90674607485ef0","integrity":"sha512-8/uqF6LkmbiXbfbInzMQBPO5wSn6Y6csjDW4nvm0NPk4EH5EVju9tQt5HKSvbbQ+Xh7Y7+nanmciqU9gyacrDQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200328.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefveWCRA9TVsSAnZWagAAmhcP/jpyyweWvuu1VegS7ksL\n8Pp4o6Q+GhLhziEyGpcDgT3Uik6/9Xt0GQ0+UcqeEmETx3z0r1eYhY7sg8Of\nduq8m7bDaBnvqy6o6thMVsQZYBc0hr9xp68R+96BPVD83LAFwlFPSyHXSURz\n9Db1eM51Tighc5Npuuxcrtv1DYm5NvUwTABqAyAZityxbpCzgb8hpjTqnnw9\n2hdMePEmTiAEdxZj3PHrDKYbwzaPUBCkBhDaG9HD0MO/46HlgG/EFF89zhRT\niP/WOFA3yRlquuMFXmL54JPO9a4b5NJbbRh5JrE6a4I7YjFBDJjX5DKscxFh\nsAHflsN+me6J9Ce7SNbsRKLK5Iyl+1LWkwZW6A/Ab5xzo+cMRRYna0fL/Llw\nSwEHgqUDofmvYZsLBLaApmLgw1D7ZhejqqqN6DhMlVtKzWYp3EpaebUCPsG0\ntSnR6lTtHUx3tPgpMJV9CcKbKatF8DWgKK/jSMiafZgus5w6Jy0w7xm4nvcS\nBvSn0136y+Ym9Gvf0TP/nHMNGnX8n9aCQ88ZJc9TNFa7GRvTRHfWlS42OZ5f\no+gDrEdGQS8vAovFyalxUf1AnKjNDihgcFYHtQqLQwj/J1sPSs2TEJLiBLk2\nFoa9vUXQMoVeX9YrACA8mBQq9Ju/P/uCeGdwAgguF49svNz8+T//5rVdzkXo\nmuIz\r\n=UBi6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGJT6FCT5afM32GwLPKngpn0H8+IxSRSZEPVwmNUAvtWAiEA4XUN2O0iUZWqkqziQcwhi21i70qcjs0NIB2fSeOmLpg="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200328_1585379221419_0.7555620961570688"},"_hasShrinkwrap":false},"0.18.2-nightly.20200329":{"name":"brs","version":"0.18.2-nightly.20200329","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200329","dist":{"shasum":"37f72dcad078ac7793a549bd113ee628510b6819","integrity":"sha512-+wpnuShrE81kO8o8X6ITIdCEH2QVR7FGAeOPOvMDyNzIfos1NLdMKiYF6bx6X5XCdRHs3QD3AEHBDfqeOVxq+A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200329.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJegEkACRA9TVsSAnZWagAAuRwQAI3cio/MBEVWQZrsXsHV\nJLbj7DE5Cl9eNH7frxYiK9kMb/zBUkIAGlv+vySFIJNaZKpQMtisrHwI1iwD\nmUKQLclCOZs9nZhrpiTbVPhBjCj3eCTgpDu/2CRYY6SKdl74ehJHWYuiwwT9\nm8H8bHAOiNxL3Cnl47UQBk6ip0YeFMW1m3bYLtvs4sd2MzcomxaBuydyTpBG\npQ029RWZNgPbb9TBLfv1u40EbiSgCCyb+t7EwckL1q/rMLjBe70a0YhhBIPS\n6P9fTxTFhmnotwa7+fEGWVE3hGQuyfuq4JEfZbTiunuJjMZSUvkQK7reW1Lz\n7rBIdUyYaVupXcAUOoMrWd8+u3TX+47avxcyObk8Idy+PnX56s3nonrf5ju1\nFq+GPP6qGVpPcFMXQwhQroOlel1GBMzci5HiDYz6dDU3GZ6LfViMvkavKFwX\nIc/52zbIyEmd3AiB2V3Qk7AQ4QcEJJjXTZyTlYL/aGt45v2hOX8qI2bZhLWC\nBI7+mMNRu9mALwXuJWmKDXbR089QPxmELN9VUHb6aYcMC2srs18tLFLhuqVh\nbfchLxL51lEiZqJUcDa1liX69A+0rJT+xumOimJw2Kd27J5CACpDq2ziGHv4\n3NhHQZEvmAIUVI5ZFAC0UGLBRL4HVEqRtVAQ60bHaVCslu6HJINBgjlSmxrR\nqtkB\r\n=DWER\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFHQWfR2Rh4VFjv4Z59v4cj32jakp3z5D6SS+ugddvTMAiEAyS20fFpHtYUcV2aghWw9UVN+ktBQj0W6DA6Cidbe23w="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200329_1585465600060_0.8022682617882544"},"_hasShrinkwrap":false},"0.18.2-nightly.20200330":{"name":"brs","version":"0.18.2-nightly.20200330","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200330","dist":{"shasum":"9cf7eb4984dd796145aeeaf64306d58a99b25fef","integrity":"sha512-uPaEg0tW8Sxrrhn7IhIGgH5951K+TlQepPAgTa8hFQFzfdOF9hgxtF08TzyryF4582QT0e2jy4r1TM69eGm7PQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200330.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJegZqeCRA9TVsSAnZWagAANdcP/10fk80REYhnkMixNPDt\nJefYDMwnySQpMCnyQdffc/mlc+nvdUo1spxpr5cHLjoiI/8QMTwPF/jyAF0k\n/JVBYU501QKS+l1e5jtqpnlaUOMdWi9WB5qhN08FPEaqCWw0cpWaz6zJ2X/c\nVYFIm+GrQ7SzszsP4A+vwlnqSLb5hddA/1u8zN2Nf9eh45rGzSgs8Tn5ohEf\nx6aEcs8qKKA3DW+g4zKQlgcOPMEgS1s+MR6C6gkK5O0bm2j9twk9gvi6fQUX\n+2XjHp/BL4rTEKWdKcug4z00hvAr5JZbHDfzuL6wjZzB5gV1OEwVdg35YRSM\njJLEzwSSqAdi0PbhTq9pyF9Gx9DNO/dGBjNpghbyiA1KLUhtFl8gP25loJ54\nGLNqE1MPkI5zC7AO/dsqT0waLj5MC+KQdnkuTLC4Q/Tn5SWs7+HqjC9mZ4lM\nBlJ6MUjdkfVhzGePJ0dkblJCeRpegRAkogm/h9v3tk+qOIri9Jz2mJmD6iwi\nJgnhIi0odb+uGEKJ+JKmDwIhAcvBvx/AslxtD6nN934Fp0gylBkcsyW8F65i\n2ZTxPtJur6cKXH1snRvGuOXgd/VpELgc3BbxHlTm6ZStS7KnDx0AkZLS12fJ\nxhfvvrWNa5upF2JFsI0T1L7V3eqaVYHJbmQ4b5U+XinUE/k74PPsmlgl/zLt\nh2sg\r\n=EWop\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFpiDl2OZwFXakeCNgrvgeKv6Sg8AxEopOdp3hn5kkIbAiEAzYoz8UG01HM9838Nj0oBDotnMUysR3KdzIa3WT1y/Xk="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200330_1585552029563_0.2123322314490681"},"_hasShrinkwrap":false},"0.18.2-nightly.20200331":{"name":"brs","version":"0.18.2-nightly.20200331","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200331","dist":{"shasum":"f6e42ccb78ea42ca3eae74bdf50fb96736c5cc54","integrity":"sha512-Eng5wGF3ETXurWYTFw3/Y1fibPkReyvdkWBApNp4PTNMSiWWAxkzOOHlw6RMGnSysKroNaZPrc2C2H5D7apT3w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200331.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeguwRCRA9TVsSAnZWagAABnAP/i3b3DwTs75jdwdtIeqD\nG1bKMEyAPCyzecYcDArPfEM6j8Khwk/W5FRPYqVZQx8GzhxygZ041UP8nxHE\nEx/YY0S0OwONG4TsiHwdicvSb7sutGoGN9DneBtgd0Tr0FvhwamfW0oC36Mf\nJz6DsyReJtZtPqOTV6ySwfbXzN5VfT/vswqCeALt0m8hzQ2aKkT/xYBle7UX\nOK2Ag7a/zrlNtmFiML9XqfLu1bw70K9qLzFFfmHtz80AKjJ5cTCWLY5BfmDY\nBVbY7/oNuPpVkld1mWIFfhF+oWRQHn4+ji5as9k9oCOlSWGEVtyC7RthV6VH\neGZmdSYGGgp6HhZE1M6jpxaQqVdiWfXeVelRi+6AoZNKVirdJLoGPl/lu/OF\nucH8GXV2XMMFh/WLYR3LNhtsVrtM2R1U5f7hUN9nh0E5Le2Usv7Mv4FPEvFs\nC1N4QcyMLQ9kPomCFuHVegMk2D6mcWzls71tMXoKhIDCFSNtVtnQrtrh37As\nkCppxu9PTLpTdwm5vVcWEKka/RE1hqpodxyu3WcS5YSor/uCp+vVbGIP+ggo\nIQkIaKGuSHjfcpFSGKNkHL+5gMUa29/tmOaS+7vnRHilu+fSy7YVsAApeNkR\n14rL1zkgzACstmxyYt7OXgjsaz+ZnPbqVV8TlmSGb1hHlYQrY/CJa/d55HA/\n/oIz\r\n=CaRB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGbKCeZyaTj9u8NkBrhRFOPHAbCLaiFrdTvARk9lEugoAiBMeBvxoR3w9Wv+GuT/xweFsprhC0rP/3iAYLfEH8M3Dw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200331_1585638417255_0.8536510371107253"},"_hasShrinkwrap":false},"0.18.2-nightly.20200401":{"name":"brs","version":"0.18.2-nightly.20200401","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200401","dist":{"shasum":"018bad663b23da0327673dc1f4b4d3c962c41198","integrity":"sha512-93oB+B/p35UY9bXG3OUBfMaY2KxFV5vQe4018peUIOKZGz6cTvhkHMdKt59P6Wic0SenckgBLJv9BpB1JMoioQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200401.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehD2hCRA9TVsSAnZWagAAbpgP/jiZYeOioqben11uqODa\nArJkVYvQVPf/4paJcONnVdevg7U6MbQ+ovL0YmfV/Zlw4zNHwoWzN8FAlN01\n56c/bCNhwkf8A8XHkm9uk5stJB34TibMyfWXsMZLvng+2bwopyRQEqEJo9Xd\nYgaKmVPPZNlXqjyTrSbqXURaH3y0y76Dj2j8OuqigD6JUfjPTgYFJ1Q6+lky\nn/o1IVbQjscwPgu57f+9RVwTPrmN7rOENIcYVTDzY9hT8YndXe3uW8pIrAex\nmJhNZZSMlxqNHXWxVnHt6QcabxGioO5QrdIC4Kaep+VwMHT7Tn4Wr+98aBXA\nukh5UEOPxVTTz7QHu0byrR551GIl0Ww4ia29NzyONw7O+5a/d5VA11dCAvB/\nLie/nufoPCzE/f7KpoxwNHdj8+JBnt7DiFLds7g8iUPQ7NsnuZgf0gE6i85I\np2MZvACARZjn8LyAlXm6Ne2WT1CCY5weBJVo+NItVkbeCNbAWHvIhe6POW5o\n9rDklkUchApE17d6WdwoMwCZRySw1GXbLx407736KVVPvfxHBYspV/KAAoii\neBcePWDFG0dEcBBgAEYqixA0+EeR/DNCKzqSUU/ybKpAF8wHPGK3BbkMxfDS\nulDggDudR/QHUeZDPIZJs4iONIRxLCZpYRjZXz6UnxWxsSVm6VrrW/J2qbFX\nPCj1\r\n=+rO3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsVM2GsvBhUPK7ng4QyCIOt+iOaz/7JlXUaBoux/io/QIhAOAcdMpNI57MWC2lZIci3kuMGzKVlxTMkHfZSGwB4Y21"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200401_1585724833292_0.7146058505041561"},"_hasShrinkwrap":false},"0.18.2-nightly.20200402":{"name":"brs","version":"0.18.2-nightly.20200402","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200402","dist":{"shasum":"bc4268eacdb6009416ba20e9080c25e9385093cd","integrity":"sha512-jF/ho4FChACK29/gKooXWyj7/9hWZEcNZpcki/haREaP9lY1mHvXRNskFlnSpWG9tG/QEx6fIq63DWIBDpkyOw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200402.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehY88CRA9TVsSAnZWagAAdOoP+QDbAs2Xq7h5AhqT3fjB\nuV4DKsmAS0nRUocG8wqXkh5Lud3UZUuKNuK/CvJZNMCT5oxIt4eLGNTqr0uL\n4EFbd7ZEZMdZKF4HOPdvfh6vjetW9Q545qUJTeaX/Livk5t7enzxNikQKNhz\nt/KVPNfr+ZdlGTzg0vejjewno2S43F1BQ5Uy4JMidDMpRaLCaRR0VXwxjGsM\nYK/BfmmGabEe3hTJqQF96cHrp5oyjMdgzHy/UhMBh8qlW6aREcbeh9fFMrg9\nt9pqfuu2VERzRRrVKKtFGR7P+/sg3hke9gV/cUWuysDcA1TA9SWOui0RY/A+\nSpTW4JQpUVXjx4KVyEf7jiP1A0Hl5kFglLJc8G1w/1PXmw/EVoUwqTI9k4s1\ndgL2yx/HZzENsw5nJmXf2ZPLje/GJ0ILIRHqOgGBr4HInCf7zOPzl3MpUPV7\n5KXheme1zLHlYKId1m1becSfbvHflxlcx3eBmr1gAYKeBJw0a3fJx47Qdx1b\naSarFEWCZWx/K+n8IN/5VepebELGLuY/mPbkYdgUkb5jBC53G22+HlwcMDG4\nUne1ueU4zuYrVRsY+vg5KGjrvHV6lzjL91WY8pXwQsouCKqX4odVU5MKcXzL\nZp91emcBui9+DMdRCmKrJ1sBpMil9P/Y6I7ys1p/fGcYzns0IGjKXQDcfNi4\nzXE0\r\n=5i0R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH9+u39ZuolVIZaZkLXiYmq8LEe9rTTJaIf7lCvoo6hlAiEA3SjNIwTfVsII6hSezE/RlRIe7+y2Yz7g7XUAOPYxyK8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200402_1585811259952_0.8711838670408434"},"_hasShrinkwrap":false},"0.18.2-nightly.20200403":{"name":"brs","version":"0.18.2-nightly.20200403","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200403","dist":{"shasum":"ee76f39fcaef539a72137c186779669b3115fd50","integrity":"sha512-otOxmhAWzxpofG287boL55JrP8bPheJ18eTGSSgpiswMeU6j0ahKeHghLKsUcv+HoEr3MBMOUrVvjfXm4til7Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200403.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehuCnCRA9TVsSAnZWagAAnOcQAJDbloucUecYHdaINUDs\nnXJ9j5mKA2pAbLqGJ3GSnZILRyBfd+wJGDzFSmExGIWRI1cl+d/nPRNM8wWc\n2EScYUyolDOhCL4iz6dM3syY4sLLL5+kjugpMA0hHkyXBvEC9f4cWiHJFj4M\nCO/uOF82uiSFLwOCZoWYzu8Tm90F10Aug1TpG6/qIDWhg+Ykk9DX3+BZuLwr\ndQPAbCNmYfFzxl8spAgjwrjagZbcxu6exDnegLxmf7v1QaDEioIPhcT8mMrF\nFRBI1t7BNhEoCPsITQSKJz1kI1kvc6Vaez7zJzlzV+KKzf7xYGMnt7CYlQRt\nKHL0fGGmQ7m3TWAWA4aYS58myS4BxvIBVkUfjOk4R5iIb/nU09laK3L/Oyhx\n8TJsfmqcysBdqfd0hWHkQsT3SLqFOli1MQxk4Ww5vqGam8DpTopUZri9T54u\nYeA52/LzSLJzg5OMhAi1Qvv14ik5EUK4zTaAdBqbdsEWFxl+5ymnMwPzGrdo\nQO8r24luoX21UC2XPNXaBH87hm7+Y/kSr3YIOBn3X5LsmYlcp2/7tI+N14qr\nwgAwskSqqWdwH+uMX86RGiDSvlursRgbJZGWkVQsnJqT1WJSo67nxoenln8d\nXr6o0xlHW4c6QIPpHCLFhAAFb5OFK1xrQpCKlFckDPJS5dJ1Ou/aKuisxOJJ\n2j6K\r\n=ki8W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICHlTkth1ouayP5trs/V5n68tmYXlTU6sVBp8vGi7x9IAiAZrNwf4KvbtPkIZF0LAxIVLVEsJbSNE23qxmZFHkjemQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200403_1585897638951_0.6804298546946959"},"_hasShrinkwrap":false},"0.18.2-nightly.20200404":{"name":"brs","version":"0.18.2-nightly.20200404","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200404","dist":{"shasum":"0ce038824fa4e04ac9b5841d13cc033715b954e8","integrity":"sha512-CV/rSrcOQsblV24+8aIKYpJNLK2WTEy6awDMGhnWbeC1C9bRo0Fjc50/4NdD/L2Q88zW7Vc1HkAzZ1hhuc8Wwg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200404.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeiDJDCRA9TVsSAnZWagAA8V8QAJp/sp7bLxEZcnuZWTXM\nfChWBiMPXrgQbMbsXw2PUyLBSUtlZ1I3QdStbkpZSyo/OO7mruphcfs6Jl80\nLu2L4Jif9mBDPAIozq171QMWUdMzPcOpBp+H+dLa8V7e0R7Y1LueQrq0N92W\nJDm/FybfLJ6Hy9K8RsD8oktqzcM7nSyIc9PluZS7o6/Q92YDalvH9c2J9fSA\nJa7z9a9QHgekf1XZxkWCRMyjYrnBFCVCkBgoA4QdzM9GFKT4CGsQnjlCloNP\nOKGXUAU1vdTaY2ZPale5wlyo1U3vYyfsNc9dP/zQPHHBbj50uf/iuhF343CX\n959KRgHKnQX8QExyQA/gvVfioeUUbegkS7tvwmNCUzzbR9GTkIqRRexD8FEQ\npOQTfgpZNngZz2Sg3ruhFlEqBKOcQHHx00oM1Abr9TwcrdtH8yr9v5XxTQAX\nezzw12rQALSArUVoBKivwYlGgOQ3bTTKHMs2Pe9gqc+8zPKx/5ZEKcBNRfDt\n+QGQz9U+2hOG9rl1TxHCnOa8UkU7B3vqQ6DB0NVDSHi8XRs6K700ap2nRNk3\nyaFYmB45D52SMIVNucbjT2WJObiUWLCMsQFSYt0VRMQ9iIQ9xb8tYxJthaZ+\njRA4AU/2Kjdfm7Rkg+xGXcDS+Bic+a77aB4g6049jYQZ21jEKXHy4pdcZ7jG\n7/qs\r\n=7sfT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDdH0psgLf56WWy7nwLjkh+KgjywzbltyddhWLQVktzAAIhAPUyiu7s9ZSCJf3gHoIq0oK5hIHP/5nCFIatzyI4HnfG"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200404_1585984066797_0.9549534319821371"},"_hasShrinkwrap":false},"0.18.2-nightly.20200405":{"name":"brs","version":"0.18.2-nightly.20200405","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200405","dist":{"shasum":"fd3502e6de01d7e342485f1a4e01e67e116c0c3b","integrity":"sha512-aROdGx3UAdH6cuKG+HnePuJ7bseuRuWBT0N/YHD1fHcC7hJexspCPfWxHex+lh8XFRAbReGwSLccOJlkAX+MVQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200405.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeiYOnCRA9TVsSAnZWagAAzYMP/AhOKSNhVIS0kpC5EEcr\nt1tmEtyJelGNLJywxylkXhpJWd66SPzR9MXp0M4wFtUVo7DKuEqyYqT2orPU\nyiOTlt99iK3HnfpfG9XQVgtAhnLysk5/xRrljmmF/a1KvdwrkCV+VQGmsg+4\nzxsqeuP72h7zF+SmsxpfmUzVkRJnF03bvMD5tNSimS6Urk/PnKtGvQ0wRxIE\nOlZVr23JBSaWkr/xoWio5u1EiGzmpXS0Xt7RbSkcH2ofWYFE1KA5PXz0XZol\nnvT6FKHjm+CpKZe6sn9OhSlyx5nDHuP/8aIzTwwgmZ8aKQXpj90h+EgU0cSy\nyywY+Flxxy8HSj5IVC1Y76FvABjsib+9b7OHnsBcidJ6K/BFTz2cgZ6kZHip\ntIzXkFuJX6tcGuYFbOI5B2wnqwZfkLLAbGc9fq/SdPYDSEJCUX6fMbUATA7M\nESUEkF23W0sGxXAJxO6NXZfoSVqvupvbkNRD2iJIN7wQBBYsVZsa/+BENqPW\nK5zZpXBeap1eRMRn46JiJt2FIRk0P8jgTJfKkXnaX9Qu6CTQaX6G1hQXUtj+\nU1PdmvODGMubiaitAAlO5OumcJ6IukGI4p1FK5nFzKB0aO4wb93HCK65TEnj\nqvgp4A4GjmmpiA+Q4Sg5J55GGMP11ClEMhO57qYNVe+OnayuN0+nUsI9kQCB\nHy6r\r\n=iQ88\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDY3+vUPUoFY839XNV2Qm+Afu5NhwGMoZalUhypZ+S/jAiAxvdRXETJfqWC/FpIwnKoxA1o2OBSAjSF/ILlTb+9dGQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200405_1586070438390_0.18398058403547934"},"_hasShrinkwrap":false},"0.18.2-nightly.20200406":{"name":"brs","version":"0.18.2-nightly.20200406","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200406","dist":{"shasum":"9e7d55d1551d61ae9ddfa5c0155b7cb6cb35d2d6","integrity":"sha512-3xezb7ufSvTSaGgklwt3HrsRyh9GruOQsaJBpvKFEu3FkJPV/qxJbjCFUu2Jxixi5AbjM9oy1oW+TuyOt+60zQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200406.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeitVGCRA9TVsSAnZWagAA7EYQAJR45qZKn/PwaTDFHZCl\nPluI1jVpso+LW/f4Szt210jhE6fqpNnkxrd8bdsbm1w1t4jWDSWZNYwK/Ej+\npHSGnizQjQ+yHL84mwqe6DzfS67rhJkMw8eimbGAFr/jO/dibam9SLtQ4y5P\n5aavHAGkMdOFsbpflgJWCQwhL5jj8l/4j6Gn9v5Jy4/TIdFWwVuQ0vSxabpx\nuZMzFr7MnIAcYcYP0Oqc2tixeEudLwo9epJEZbfYIfRPwaiL0b4F7LQsodZn\nZv4JVLT3bDCIUmKS+TySR+QYblMMyD9SyIkiI+VafHokV88SjL1F5eEgRaiI\nXkwKuNMsYmGaU3BheyPh5hVc9ArWFJqB4VJlNGE7ImK64lE5W3h6024LGqVg\nitIHD/Y1I6VusjoQlbz72TsWzuZCfa93B7PGhXeLYj8PWeqdOL4s8tkkKNGP\nCp23fM/2OOMY7x1qxsUYGCYD1c4GgVqcL9BUzPLQJzv55zY5YW+nLTRvL1vL\nktVFAcEdqBagdkbouBAIsk7D6Hc5mrp47J8huuMtyyIyLL0GnYSYwZT1jdSu\n36Wv/zWI3gjEdmx8Bcy5gk8dAY/IH+QZW4B4rIjvVTDPT9S8upRAKt0oAYN1\nwdgWbmpATXMEP53tbp2vYA/ImjC7a3HWw2iotlUCLcg2Rbf8TsnPOhuYfEk8\nmHcb\r\n=kSp+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgwAjIvZuybH14VfJryeYFa8FbqsDlFAu5LQNAfw2EOwIga/f92SfgB8l+yCkZQj8fGp8uG9L/d1SJ44dtCcEeHRM="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200406_1586156869393_0.5753373212861526"},"_hasShrinkwrap":false},"0.18.2-nightly.20200407":{"name":"brs","version":"0.18.2-nightly.20200407","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200407","dist":{"shasum":"257661a7c14ca7b527d0e1e7e438273f3bcbff53","integrity":"sha512-PxhGmBxMz0JxCqlRSZfJtcV2Pe9SUi2ZYglYvt+9wrv22Duge9/kv8tVdIGMMfPjFXpiWMeW7GUZZxNNkS2C9w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200407.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejCaTCRA9TVsSAnZWagAAjIgQAJK70EKAxIE4peOu4U8W\na4cuelEmYq1m0VTNzZBFNBLnp2iUHO1v76z9acPBSsbRo1WSJb9o/kQ/8kEr\nMG7bFQPRjlHzeCDOs+B6CUWuNFUQx81nV8+z6B00xzTjONOfjm6e9TmMy3cU\nmiKMNWby2o2oMkoOcI0kBn0uA7fp+I0sj89rjTalpWyUwQO5Ca0PzcoHpJDX\nJ7qPsMf9w6IpapN4ck5p11clZsjtkJmOWjLdKV7RB9EjRYMUXGkhYPJqv44d\nkCqB3NF1+f/mKVkQifG3fVnPcIqUVAwd7q9CZ4BPSiof5fNi5iTY+z+wHrCT\n9xhaljRLaEiCy6Bri2AQPL78r7JQFMk7PkV2nCCKDwNrp0c/EE0LtGstDojW\nvjNS8z4gMuNm9dtr1OexpReVOKvB815BoIC0Or2jolJ9tFvhORJyLVkocOIa\nHkONfbGGLGCHkoxqU9lULeuvy40DE8sZ7WUK1g4EnzFZzdQJcbqmun/XYOvA\nZV7a33HjHOf3U6oM2ZtAl750knnMRv8xAREEjz2/icojCHDP7kQ8rkX7LgPw\nE8TcWT9jKfJP4MzAtyBe8xt9ShhvxkVTBf/EIEILhib1qAlfd+VmhySH3IRy\n2msASeDrSaWDa91IQD7T5BW66aJCcVQGsCKOxXwjHNRhYfIn9ssIycBuYyZH\nlW5c\r\n=is1v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAo6juTtlgaL15K9UZppbzRrl8a43iK9LXe0VqJYglayAiAKCMUBGrCFFw4i9WhkSEAk7LWVWAg94AbmxP/Lw9b+AA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200407_1586243218975_0.7934723406058604"},"_hasShrinkwrap":false},"0.18.2-nightly.20200408":{"name":"brs","version":"0.18.2-nightly.20200408","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200408","dist":{"shasum":"f86eedd9a76d869d4c5e8b820ad281fc6c365e76","integrity":"sha512-r+jbgri9FiENUkGzd16t36G9gfUMiHQcuHJDDhCqPkRgbnw8UBJxv7lRBfI7sSVquKu9L0DkyaSaf/m66FY3zQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200408.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejXgWCRA9TVsSAnZWagAAAZgP/21S/J/XBRLTlElHjSaG\nedCUeAQWqYxxuRjBF5eQbJ9mFrFELmWhm/Ky4Zysp/R1FE8Rg4WShWtgox5I\nUTOULD86SYzXjhnKoNaPu43CcGV3JIi8BX7QKy7t4U074X56S4z0ZoWXjYc7\nWDiXfpi+EHBojvD/F+QlVQIhdUjwBno9BKEg12tpmr1sBuxZ+1+orHO8Q9fQ\ncH8i/3WRRsS3hh5LdcPL5GcpYTQUHtQn0hPC6Spj6GjCyJxZVyLw9LtLPzmt\nWnp5Kdqm56uuf8Ik7+/3Em0F4AU9aPHdwHwI6yIxAgTMqf4FDJg+bR41mmOG\nOwSpMATuKXMYlhrXyJjcAzQ3ml19wARTga2RaT4FwMFQxU9WVYIlgYb/5Mgj\nnFvk6Z/9joAa0Sf5TETcXIaharMd6OCVFaUIz5Quunu5PFpN1p78EwS8ezlI\nutV++pVQi/3TnPUQEUcvX7jBLB04F/4bX7rScXFMZ7zseohIemVsOvzpz7Os\nqSyK550/3gapub9K0f8uUv6E0C6zFNdMu1B2JxfkGkgWz0IgD0sq4NHIO+Di\nHcaEjVPWGT+LJwab+RJq/uuDwXkY8s3QG3KtHzeCVB7RLQrTEpprQQ4A+6mU\nup5BIs5GztNrDh3Pp+tVQBSzkyLH7G0t9068xJWOvNHFPJ8zJwy/r7l/fvvn\nyIMC\r\n=pe8o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2gbV0eJAnmCMwsw8ph5CRehVqYi03FlK3YIpne8N6fAIgdW4WbRcvRuWepKbDsNPCZzQCogXUqhdY1XFYy6LIra4="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200408_1586329621366_0.2503354843416361"},"_hasShrinkwrap":false},"0.18.2-nightly.20200409":{"name":"brs","version":"0.18.2-nightly.20200409","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200409","dist":{"shasum":"8cc667afca33242795b8f3d82ee6b9ffb8b9b960","integrity":"sha512-ZuUOzvs9b3mSRdEDeJq/G/fA2p4GHRnYggHhCTVXpb2JlcNo35zcNJtKpddZbrFrEIQYRekjr3nSL3IwqnXclg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200409.tgz","fileCount":156,"unpackedSize":995096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejsmlCRA9TVsSAnZWagAA/x0P/0gwbNcIUxC4yuZHtXUA\nseEgLFj9PgaeRkqFFB0gnjKZvuwzsbnK9XUh/YqYjKCUJvna9mwC61nbt5XI\nYmNxNQnfdW986aACTRbF/skoNms7rvnx13DFwdRAJIHct8yjknHi1hVQm1yw\nh/aOPjXAixalutyg50Tmp4PNgs/0YI0PVJm8y6YuHO0Gfu9147wF0/cKLKrk\nXfDSOKnIwhd3dIHiRidasiyNv2KuoAZJmeM5XLwqyAM1zZEp77ziNQx7pHSU\ne2OdO+2DWoZOA3wEf5cvOna+4FzHdsJjoc7h7ULBI+COPzQ9/ldyruKq95ne\n3tFwM1dsfqed60kY2Kl6tAcytICXT765cjNTtvS/9Opuqv8uY6x7qIC4O5wd\nFYpT1lkhn2mVE3yv84sqy3lB32iE6idic8908Ho5ZezOWnOFN4aeWdFb/Zdw\n9c+1Q1E2bXmFl0z9EPM0weZjZT/Iv7yLrxCFC0HgqrdeoWvFLF4j93FVVBy0\nmCSJIenLyVwD9Esoxn9IbLaeq9zIPiGmI1NT7l9svlKzVkZTmfLoRYeN7jpG\nvAQRn2rflWoxPxFgCLyx/9bTXuUftOMahISptSFwcd2REonwY/AY6VFPgPRZ\n3xc/3A6Yf/tH/0Up6oHEJ3vdecCf4fDy3gMynaNV0+ailubU95W+l3HXt0HW\nvq0g\r\n=cnVC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEKY3qIlwHWrcUTyKAxPQPd4o/tFtyY1MSGJQTfZ7gqrAiEAg4kwjjT10sQO7aYd6sM7vbBQ+R8x/uNsnvTr7p6DITg="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200409_1586416036332_0.24155396591237777"},"_hasShrinkwrap":false},"0.18.2-nightly.20200410":{"name":"brs","version":"0.18.2-nightly.20200410","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.2-nightly.20200410","dist":{"shasum":"ac80b72e348fe84622543ff4b50bf5ce6dc4b5fb","integrity":"sha512-bA5HJxMXweTo9BrXFc1SJEpEJN+aJ7rNYAG3fyxlP3oq7UHDD4Gv/4ZkhU8BdDoMPzdXm5NwmdCXl51fI/bQBQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.2-nightly.20200410.tgz","fileCount":158,"unpackedSize":998996,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJekBsjCRA9TVsSAnZWagAAPGYP/RYghMrBrfv5SilyOop7\nIHcOAU4cKHMK4XN+9LM8Z702ZDrw/KPevddIrCfV362S9eVqdbNeiJRsw1/m\n/kGQqAg6W7zG2tquMU/mK5Spxo1A+5qGN5VnIofgiUvLEj8/PlmUpBuglfWQ\nPjkHDCuw6JHjDDKaBUEwrVtsFjntONhfRguF2b+2riDJN5/DG851GmaPVe3z\nhLJoT0SqZNp2pOddAUONj0v7Too2pgy2qzXLNZoqlMxtUzbpW6r/ypq+7YdJ\ng50LQPTzINfKLqK61G+d6ledc4OeqhQJzr5IpPRoD88F5ojZlDEDCxiIoeUS\nj41e4cygOy/DrfmCkHRJ3vUvmt/Orwzo56CIt2Gg476yhpALFrViKtzp4l4v\nqRZoX0UeEm4s5rV3CnQ+xr7TJ8gJjFFCfDNnJDpS7V7boqsIavks9xogDQpS\n8qeTKfsIrhliJ5q+ch3svR3Lr0mJRwlU6JufqK7yK0N6JoUiKVwSwJIz76kc\nxKlCFD0PewybxEsN+RavXFrl8U7hzIGqbIOUQyvRd71m8Hbkn4HnTPu7p0P+\nr458YxODd2h5qEHTXVozMisVp2/RAdKWmw0F5Ja5nKSTkTuyKBVPhq2ekh+X\nlTEg/YTe5k1e3Jc2DlrmclJ+0gAm8UY+aEw6Z8XqsJXBIrXfl4PLH5a/RQJm\ns7wB\r\n=xCZ2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDymJ0h34nu8LTZXSQML8PTFCIjvFDXCOXHhx3RDoQ3WgIgD8bxpJmtDCAUycFwPd1EUrnMptwPdCzI9eabmmmIn2w="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.2-nightly.20200410_1586502435276_0.21529312828888325"},"_hasShrinkwrap":false},"0.18.3":{"name":"brs","version":"0.18.3","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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) 2018, Sean Barag\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@0.18.3","dist":{"shasum":"1dc3ee67c78343f8651a456e9e864e7272942c90","integrity":"sha512-vxDWTLHL3PNyQIFm2bPoIfFO99HI2GavEiN635nt22c3lPt5x01ECKU4AkbFcQMeR747Ty5NoVMOlWFn5I5xCQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.3.tgz","fileCount":158,"unpackedSize":999551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJekK43CRA9TVsSAnZWagAAKSEP/iwlz5mYGj5BumjgjFf+\ne/GCPnXQmGt5IvRFVCTC+7hGCRZZCKmtPrInsPqAS5wJH/MxdfdgOjhINVhN\nR0+r/O1VPZFqV+oyQ1JyGpYRZMMblCpdyjyXcxR+sadjAAIVKpK0/8MrLjcv\nySaGuQ9Je94GO2gpdliCaPJdn9eSM2qVxJs7pZeY4Hfz6Y5XpYwPr3jbuCKi\nZa1zLp92in8pM9GHvSG9Ir9o7SUI1yM/y3vhF6EEtbvmOqlp8dtSXC9X4nyD\n2zAjmmlprASuS4YcrYlXGKveVE7PI01veTN6EGGixm7kbj3qjSUl6iysr3C3\nLuSV9tWJ516YFA8Xq/X4kZ+OhXfO6WOh7/xDw7NC2d0/e17/ssNPIMp44kZZ\npx5UQEPc28bOfyf1uabFi/VVrw3gKjCgX97qTrD72wRSS/s6p1aLdEsmy+SJ\nj4viZeFIpPfrWYguWNg+5GQnlhVA13dxQjUiGpWUrb11lkNQO0/tECHtJsFO\nuL0SQPs98XErydo/Qq2bUyy84HnwiB8EDcU9hsz14RBXLcZJUMWlA9BbA/lj\neeh+UUYhB1MBG1RBcRJ9sc+1Io8eNnqj5E/AWlulh7d78A0+qJ4Ax+nuJr7B\nrKe9wWrd4IzbqjKwqg8qF63IxHB0mxjBAIRKY5FJP46qMjw+mWEol5CmxTrx\nd0RO\r\n=X+um\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXPaZdL177TwNR8hPG0hMApAEcOHPBWlPfPV44ez0xGQIhAJq0dO1766GCSIq2W7rh64O/WUPBv0cbb4I4VWOkDHLQ"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.3_1586540086973_0.09700752032787685"},"_hasShrinkwrap":false},"0.18.3-nightly.20200411":{"name":"brs","version":"0.18.3-nightly.20200411","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.3-nightly.20200411","dist":{"shasum":"1719bea501c7ad74d8d52fcbe3307ff6e37fd1d3","integrity":"sha512-J3s5ULaiAN/Ut2QFyyjvxxG7Uicso/Yl120Px4ssNMHBON+cAYym57HQG7bj2DPR/leweWEoZyy6Y1UXmKfoVw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.3-nightly.20200411.tgz","fileCount":158,"unpackedSize":999568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJekWztCRA9TVsSAnZWagAA7IoP/iZ4PiQeOzBWIjPn3qBb\nhyDrXWnVL4V3JnNmxWVP3/+knG4N2DtwlAj277m//PfJ3m4zP2lI1/2ktTk/\nkePd71TRQzceBazyS41C2y/qrWvyXJU9fyDtpZRzeFTcxlrnVeo4ntOkjj/h\nZrP5JtXZ4XnV0dU7uQF7Wh6HkpN3pKVmmdNYbr8xbbE31E/S1FCGTDeJUs3m\nECdnSCRrChrbmy1sAEWHo6l476cs31EMhVIBuXQy+G2xYuhPxheB2tpjLHvX\nleQs6qcTkCsh1U/17stZMMU1Jzp8vTyXaOzd8BNFmI0intVAYdeXWvrnIwlG\nLkBzX7585Phslv0z9Hu19LJYdzRSEcM2VtWnYpdxKP7a0bS32r4HhPmuLKgz\nKqnx8rl0pQNdKZg6KKJ/vfHGwkLxja2sPF5by7YXoX9I5lai3Rb7YzFrEUPH\nwjUuzCWsIRcQvQzNV/4R+NL+oykWM+i1Vf1NwohUxHrCVNSVs2c0YLhi8G5x\nWvsHB3NMYxHJ7dOHgxDohkGt4lvno0NgyIcwBFBaTTFUpyHdodiK+cVoI4G4\nJqoYw+6kdJ6uVDxodM73oAbT7EvXlNxZnFsYHCCTIsA6hKm1wevitb3BdFqd\n4r+C0A1DWC7wOPfJAgXwvBkmoz66ApBU8ooiE8ktzFm53w9EB81TyN7UyeDr\nOu+R\r\n=Mfz3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCud5wfxB2cuwlBhD/uumtUxIx9qacGU5f/glyqkJH0fAIgOFFfvnKWHqX0wwrVJNcKEzJD4ihLjLRyDET4gkM/w80="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.3-nightly.20200411_1586588908682_0.926923157789352"},"_hasShrinkwrap":false},"0.18.3-nightly.20200412":{"name":"brs","version":"0.18.3-nightly.20200412","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.3-nightly.20200412","dist":{"shasum":"ac2b7fc824c7fdcca2d23aa84eaa7de50592ba11","integrity":"sha512-KD17setLnUQeDqSe1BLkq17VS8D1VE9sXTtBr1Z2kXUoMGirhKhMQNq9v3nlFJOCy7tWW9t9cYVYu16lbL8QmA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.3-nightly.20200412.tgz","fileCount":158,"unpackedSize":999568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJekr4HCRA9TVsSAnZWagAArI4P/jTygey+hIKtFtET6DTD\ncDIWjjq40OJpz5qKDaaJDkt5JQc2aDdbAsI07vBgv0f6ABR4ryDSdWdQTuLF\n795hIEIud/HFUx+CigTzRgelKkMPjxcWiWOXDGvjIHPV14XaWhLT0B4YA4aN\nuO4M5xByaUiV/zsX/d3opo8RvL5XtLnnCQqQjfHON9O8yskH9LZN8foXeC2G\nB8buOhOVhr0gZ8px8Izmqq5MxnAcBv/9vAN67ychncRnWb8NpMomV/6RHTWx\nA9eitSaSX+hZ9sbsZMZefmTwNJn7DXRleY/tUdn6+YT0lC0MH+hhrg7h3vxF\n/0aDHGCTS1zGNicINl1zCt/976qD5yZFwaSMrWcnL91TY+0hapTU7a2PbFAk\n8I1S5xHGgt8/GmiBEFBSdGyE9eOjrWdk/3rQlWDh0dkdgl5LNlSuym1WA18I\n/UuWk5YyX/KNKjZVUY5UnyQpHMEQwMboDxjPRFhpHDX/LLwctA6gTfkntMSS\nsBqAphBDh9jp5xGLmdUstDjx9vhFQUvw/IVAVQ+PN/IkvWdsXXyHKKcj6QNv\nMlCuh9AgR95bS86DzY1ED1DuXvRpWiVQg3beXzFa77zmBOb/WhtCW9W0s4mq\nF7c+Q4615eMWPz9MsQ128QrpqPrG6z7SEUJ5I9I7sqZmJfrSrZonapyOUftP\nb5Zb\r\n=5KB5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDkyDMoiqvkAkMlywCUfoEnZWlExhPglD1i1hOI3/F3uAiB2cdQm4GzaG+UkTOd1dz5Uw6pmLdzZZ2k+rb6YM/E8mA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.3-nightly.20200412_1586675206504_0.9403273932098486"},"_hasShrinkwrap":false},"0.18.3-nightly.20200413":{"name":"brs","version":"0.18.3-nightly.20200413","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.3-nightly.20200413","dist":{"shasum":"2d3001210ac0ede807830989e2ec164cf853248b","integrity":"sha512-qeAaD9UnKJipLTuVfGcFijkTGAokUDb2ptv1AtyEdkeVmiX7R6XsYEEvysbbBYYEjNNouqzO/3ADAlTOok9/Qw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.3-nightly.20200413.tgz","fileCount":158,"unpackedSize":999568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelA+wCRA9TVsSAnZWagAAqSwP/0SBUDN4vF43t9Zw3M8s\nzHPkBeJZclWdWBXi6GVrLgWj5aT9RPKCP/Hn4S9UOAh86dlSNRqPloC2p1dZ\nwCbrnvv13APrVF7K0dsAWMHYO7d593xR6EQzYCFI8b+qR6cvU3Lr98fnprtW\n097BjaDQzhE6DYr3onNytC8ipUAbRCfdbcPLFkhOfH/ymktLlXm/9p6W4dR1\nvz/nDV6/hw+p4r2xnvc8K8r0WTkc7gtAcQfjuJ49Bmjqo/L/y7i5EslAFY/z\nd7IfSVxeDZxW84FvGMxr9loYK2tT7eOdRECbVEZSEe4+HV2k4iJxc1dXSjxm\ndV8oF3NtpzwmRz9kcyxV76Ai+rgt1eeoXgcM5KVtzQYce/vLB92wvcjhZQQ7\nvOlm1C2i6PxfofmIR0/vU8jgUz+300xf/ddyHAeF3EJmXEGZEo9Q6wf1wkqT\n+uVc5NdkOiB6Ma1wYl7UZZmSrE3TSHjsazUJ+q11Qv70E0C6lSuTNovjIx6n\nBQZpGLmq3Z+40ShcNYnzorpohsaUb1vON0wR20xqpEzo9plZ/sNrJNbNWocW\ng1N7rC7JNsrRm7nDBb1j04oNBSvfsSUAhNVB3pt0WaG08fs1asMxPpbwWfNg\nbwYe0388Q5Ktbhj+G9e581pa/vhP6Bb2Am8ls+BzNhnkMVie9Lc/lP6/b32l\nd927\r\n=DOx/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCH3lLBQazfGK7mD8LTl2E5kzlRjlkZIqd+L5t2VJ1PAACIQCcUpomONxNQhr/eCBxXJwPgRW7TLvrzw9PoxbBSrhfWw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.3-nightly.20200413_1586761648037_0.6414742068282129"},"_hasShrinkwrap":false},"0.18.4":{"name":"brs","version":"0.18.4","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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) 2018, Sean Barag\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@0.18.4","dist":{"shasum":"0532f4bafbee39b7420564369bcf2113a4f3ce3e","integrity":"sha512-PEX8bb1W/SKIM4zrGWmtSf/UytMwxasBRa3xX1oNVEI9LHIgaHHAnxgxTfExlvSGqSSdSuI2lG3TPcKwSm8ENw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.4.tgz","fileCount":158,"unpackedSize":999501,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelQSjCRA9TVsSAnZWagAAegcQAJiGL0BAYecjk7IyCkDz\nUFSqzMdXxR7G83b+KcapqqZQZs8i73oOvVyRtqq2oDPXZH2V0zpJuOdTyb7d\n+gJJYgu/4HskrjqSr3o4ksfFQpF3hhI7MzzUHNzLVw1HomC7SlwbQY43YPrj\nBW+Q3IBzUMaw4lscrNZnSWE4Mdtd8Bu2fruq/UxqXm6IbvHaHsboWPwwsFl+\n4dLA69vWFJm0vYfWVatq1wvDo1o17Tu6ZeBMAHSqrc0XrzaDrLiT78AnxRzT\nleoizKfzVHN+z4qJLpIHMFxMY+j1thXTBQib1QvQe1TgJXrbzBRjrpa2BZRW\n2ug1s8mwANf71x7Ft1gGvwh+mK9wpM7aoivPhcvSEDJR8r3uN4xduYnCs79R\nwJoQA0+T6p74hKnO7hCW3h1wbi/D1O12l1i+zEK/07GXEjIrPQ2Pj57bfxaw\nlNe1R1btGkjzWhMmPPnAzOsGTUtrTFsxsak7Pu1lkMmynqRQep4JDE2P9JIA\n4DpmYxmo21/lxHZU6sNe0EDEUDhe9+bhDm2rCTslwjYRHCblh0asLOpa07R3\nLhdqayT6kkWrt9asJb3a3t9NjHqj1pORRIv/5rDkw2vPVzo0SR/AvSYRJKE5\nPAvAmLmIbPIiPpGgw6HBCGWQUE6zudirZRo4me/wSF0OT1/CwQHX0AEghVcU\nt8Sj\r\n=frIB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqd6zx/45WmbJYM4eUtZAqvO+Afj4PeboMoVgFD6VY2wIgPhVgBqzjzqAopIIYRi5rm45hJSr7iQ6i7XcckzNV0Uw="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.4_1586824354516_0.8157398908443012"},"_hasShrinkwrap":false},"0.18.4-nightly.20200414":{"name":"brs","version":"0.18.4-nightly.20200414","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.4-nightly.20200414","dist":{"shasum":"41c33cace697c78976c7868081aa0fd8d12450d9","integrity":"sha512-gCcmyK3o4ysU22ITGrvOvVj1YQl68N3BKQyMZanMYPo1QzdpcYi4IoQCWmjKbXspp5iidR+Qe01b6VMeEf153A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.4-nightly.20200414.tgz","fileCount":158,"unpackedSize":999518,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelWEnCRA9TVsSAnZWagAACNMP/id91mkA5+xWkhiUhdLn\na0CiOIz7kB8HAW9tndur7b1PrAx0naC7P1DqJoQO9ILE/qIhTTBqMyayax9Y\nX0Z6Yh6heopkwo+y4QmaUGbxwElNt/0h58I2zzr3Vvju3To4vvrLooB2OtNg\nNPdUPjuWojQCnp3puTvwbVV/Pf5X5wqgMnkMocRgUQ8kvA28nwjU9KAC+YuN\nzhBq1OxrLFExZwdqgupppPi/pWdy9IaxHb4xA8AA0ItNW0NeqhOc5uyFBcW3\nC7HIW8mcClmi9xfOXSDwjwno3pqj7kt5pR/Lgrshh2/+pcS6AO5Evkb0sy2M\nmEtbKM6amYdiDUsPq8yC359wK/t6x6d+l1yapp3BEB460vMDVG8YiqeVxvGu\nBqgPUISxdD25KOVdFB0v4nxwq0er+9lNbijc94IJJsFdZxjTH7WJjLyOUkd+\nJgnFWtTWihXnzK5XDK1vN1cpsc0lTpYeSQdv0vrSY4sYctrLD7h+t04hO6Y0\nu1KpxUZfzTjGM59W/4Zxdb3ezPH9fXu7hM2/pCKYlr0hszI9EBJOHQXPrVGN\nv/gJN2b1ZBcF01TMujxDZJVyN3RuPLPUFyTROvEY/UXzyCeIZwS279FRfxbU\nP4e4Zk6X6mr8ePvMoPkNswblypaLV0TfBwEFkEBl3uoInmjdNcRoY637ovAC\npJET\r\n=IafB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE6ufV3TBDH6HMx+AH4dTUIE3WaHe/+D/GlmiVE9006YAiAkaK1cHKocRBvhuwbrEGNeu0++WA0WSyrM34l4/otgHw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.4-nightly.20200414_1586848038767_0.2832047813300398"},"_hasShrinkwrap":false},"0.18.4-nightly.20200415":{"name":"brs","version":"0.18.4-nightly.20200415","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.4-nightly.20200415","dist":{"shasum":"0edbdc102d82ba489545e1337092f7f09536f7c0","integrity":"sha512-+iDoMp/KoH6ZDo/uJX/5RJ5BHzXlskFtEoTx/LnTz+goyxs+6PilAQSadjXU9BTilYwThf3C3P3UN8wu/SBkhQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.4-nightly.20200415.tgz","fileCount":158,"unpackedSize":999518,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelrKlCRA9TVsSAnZWagAAMUAP/i8h8wSM+b3hMZFrQ8oo\n3DisISCVSNXYu2g1zGYLcToblXVzi9rlTLlu5/5zKeB656sQ/RRdJbvZc62r\nsuGxvPuSXSB3t3kOX6oQE9KIrfFaVGnSzn/9LqLi2x1QkoPYEWYTIDwcNN7D\nka0TE/2BaG4uJ8P4sUzrEH8AMIhJsj4ddLg36JgaO9EjYIYBsKQLaRCG+Qf1\nnirHc0BPAlzJ5xWlRMvJ/AhWGEfrKBvYajiGNPkeYMuzkDMdLfFBIgovN3MX\nVeygTBe2O50wXKgcRl33G8UUsxqMVdCGAH69Sv7w+GeNJosJIDJFNS+bveeK\n+hv5JRc+tGTOo/+yQq4w8Y3nlfWHvV7ZyVhY2oj7RWTCFHu7Wd77uOGHyBnd\nZz+JZI7yIRaphAl2DGh27wlyeupo36fw1JNQikzKiWCqhqjCXDFVNGoLVIUM\nDhhODafu5SHGzyTBP8ayaA5saeCMsyEt+nPCy3O+NW2ShTqwZkxWL3ZpW3oa\nPRDRLrUCooMCLdekKrXDLTT8rk0lEUaZHpXEZuycXpMwU/4RhmnYwIyGqQRE\nfIZRfEcWS1ygjy9wDXBf2v/J1uGrwydVzmXSNTfseK8efL4XzBwb5Bz+kZhM\nPYtdROCGsRqP6AAzGb379yYnM1J7j8iyQlhBvz74eA8MUd1OrJCiEURol+mS\nDb8J\r\n=kL2n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6iXW8Hp5tD2Nbz05lRg5Tt0I2Z51jbVp/lP/QXabK6AIgeTgb03W/OuRVSBo02FY1xv1BTKfWAgFhzIbQywj+EoE="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.4-nightly.20200415_1586934436839_0.8796046938061921"},"_hasShrinkwrap":false},"0.18.4-nightly.20200416":{"name":"brs","version":"0.18.4-nightly.20200416","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.4-nightly.20200416","dist":{"shasum":"9d05d07029f7aae2e38528156a5e3fa4c154aca5","integrity":"sha512-4rRlkFBVIoGEhq9jI2tDm7lR6aokQ/JwlKmq2NqNNZCNs67sHhVMYxEbkPjGf1tIYQqc97LFWVmMKYqiFoDLEw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.4-nightly.20200416.tgz","fileCount":158,"unpackedSize":999518,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemARGCRA9TVsSAnZWagAAWokP/3kIn4LRdqepoSJ4VWmV\nIQ1/7YrnynjI/rT6nEsnnsbsZs3aYZS7rW0SNUiFnPBl98WeYzXpoWIktvKp\nco1cMb30xpPJSY+EkLVkWIngwBQCtxnecuD9KEs8aWHmCNFfLn9t+hsK1TZp\noagioIMjm7Sd3UAVv2gBJK14SBQj70jdkRWuY0bMcZwT9VquvoKB4M59JO1u\npsWreSvwJKOVbc37lWsYk9OVSvydmM4KlS66wtX52joKo1IgPKxcvvoIRhgn\n5GFCyVyhUUg3ISt1pLLQ2B5pA4RORPESVM1xbnXfjYxtq/IA86BTxYi95AZB\nipuf+OYEfuc1k32wH519mtJ9duTJPjDxR3BUIfb9NhMhXbsfc0DmPXpHoDAB\niUuJ5svJyLVf5K2Y2Fim8qXkhtrjB+Xj4493M43AUS6n3PixE/tKirpJIoVm\ncJmEdP8y5BPS6DXwwN10lrWCTmb1ZL8fpIEAn2Qca9LNgOv7YsTybsg0rI4g\n3pND+9O8okaNXoYsJCNgV+wZJATPxcO5yn7U9ECVWdJg8PsDP5+IbOLaWeWG\nht2TFHqVc/3VYMP9IEPvTjHdPmJIOxpt6t0JVhCF8xWXF1CkCks69TPLqW8E\nFl1gZ2Ko9um0eJCgyGaSXKb0p3VneDZ0+1IKAPvHlKqjDCVGpvSewXBmoL0Y\nHr63\r\n=ANgK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEsjE5nlZlx6MqOeLycT7p/Zo+JD6MOaBiJYSKPThLhuAiAJr12KjvMVIsvTd30LZ432YaGgOaDvFwfeElg3/FqfVQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.4-nightly.20200416_1587020870235_0.8385334432447897"},"_hasShrinkwrap":false},"0.18.4-nightly.20200417":{"name":"brs","version":"0.18.4-nightly.20200417","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.4-nightly.20200417","dist":{"shasum":"c80fc9e9dc80c287317e8eb683fc898f0253fadb","integrity":"sha512-u9OkIf2ZZK4lj7tDlO92FxGEPvgjEnclya/QDmtpW/TD2WS//cZTtnMhjLaeBxxC8GatLyaJm91FLjGSbZ7nyw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.4-nightly.20200417.tgz","fileCount":158,"unpackedSize":999518,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemVWZCRA9TVsSAnZWagAAfmAP/0gTo8ATHXyVaNNgCIe7\nbUmhd0zOm0ehddPuNuMPczu+wI7O4Fs3DhunBAmZ2Ziz0rBpVsrZIiuBrF35\n9JAKiooS7yfFg5Ywg9MYLMxaGy0L/Rtrs6/gju/bECjl2I6EkC7koTrsyt/+\nZr+KT/PrluQ3Nz7oCaufTHoK9d5M2GsTwb9ZRwP9fBSUbVOzTQvnwJh/J3Ml\npi6dd8LjNmRDCv4+Q8fYoUP415mJGONGVUWwTHS4PYR+5IHuzjwgFpcb7zGm\nvDox6t+AApwcxmJJti6cxZJY8i9wax+DqA7S/D1of4tBicueuJ0X3cm2K4cf\nE63gk6Snmvwlep7ylNFIahMmvBwj4p/DBL0ikKslpU6tWZfMqmUK1hnrZR3F\nsJ5HxCy3iscPGODWTXAILXQOadpfFpMLuHyviHHfKSjLTbPgkIhfXvTfsA6A\n0HG6XoXATZy+Sa+DI2F+S4NwRvhMViUVySPpYnUyY4KO34MygUL0wQvgcT9m\nYCYFF9NvmKzR0nNkK1XBImRjATgJQ9UfIxfQeO77ux/CZu2usWQCtk5Tip/d\noCheCGloAM3z4HBvgwNNbL5R1ifDmngqOJ+9EVnDEz0bC47Hz680TVHAylEr\nuPfABCxvLUnJYVsyYLZxsG2xaFr94Y0SohIxJIkMlag9XoNOaT85U6xQghH5\nF0JV\r\n=OriG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICh4QlBIE/szaKotH9PwSb1KVJXGHqPYsETULlzhydJcAiEA6Uih4yvlo7h+WxlfMNYQihFrpnZpFftxcFnoHvIyOD8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.4-nightly.20200417_1587107224884_0.35632960906488154"},"_hasShrinkwrap":false},"0.18.4-nightly.20200418":{"name":"brs","version":"0.18.4-nightly.20200418","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.4-nightly.20200418","dist":{"shasum":"9c6d2248bbb9e0427827be3b62fac11603ce464d","integrity":"sha512-wCwOteo3fmbZg06Ue2as2rQ5b9L8Mm/5sQ+vbhCciy4aysCMG2DbKCffdevYyM5BXXnH3kjni16coFOP86nYAQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.4-nightly.20200418.tgz","fileCount":158,"unpackedSize":999436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemqeqCRA9TVsSAnZWagAAu1MP/jASX0gAx0aJUul1gdx1\nH5tRlSaTeIrSOY9AsCCYp/FQ3x41D7oDSr+oxrTyxYtORfR424n7nIKeFYpP\nvr78+hwtBGAIHdn5VJE51Zvtfrbw16FhPo9logm6DqJQQa3sa9m0YvDT4w8u\nowxj43VZpDyv6BYrrziytXvsItu3IRykhYzT1X3eXrxuaIeKI7Ei2o5jkEuS\nVYDq7sHX+lqt1AMmCLXmScm1Z7rqhJq8Rd8tIvrilLiRHAahZ58sssWR9FNd\n0KdxFjem29lE1Ppu4qIo0sr5QBqmwS+zNI2gIONBfNwzqXLx54o3Te8+op+4\nbso7wIXrxr2fUCWGKttgG+QRZhaNZLqp6wqnLIODYeNjEAlkSD5yxLLpKbFe\nnY9QD8MDDtwPwy25orkUJcZVLEc/fYnFtpvctLXoI8/zKg6Hi3E4dEDVn4qn\n0SzniL1Wok/JS6tlMRsR8lel6wpanszGTM2mK8fHne79h6jlbbHx6mQAJwO6\nGqIDnTs8Yc2FhYJhvyPT11I73MXZ7t+hv20mzkdkLdDIy25ENKWoeHvPyXvG\n5rqH6sNh0olwhW1M/IB9fCwiRiEpyP6pDJ20G75/fb5/d+jw4MWz/7bfv5/U\ndbcQebiqXv+zwmZV822yqPzSP9Vh3bIPeGWVqpRy34CdsM4ghiFDF+p/9g8l\nro6q\r\n=3Ore\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3fXF3QC+1VJ1+msNJmhrjbEOxVpd60B3wfhOyyTBgwQIgC/+aCXQ+CHfPpNtjONmf+k++WXqyYP7pNUu2rnRFOn8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.4-nightly.20200418_1587193769826_0.06108968313184726"},"_hasShrinkwrap":false},"0.18.4-nightly.20200419":{"name":"brs","version":"0.18.4-nightly.20200419","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.4-nightly.20200419","dist":{"shasum":"e021583dfa36bce7c0d8064d70def547934f4376","integrity":"sha512-l4nAQGZkk3ZXp5suK2F6ZL6UC3cYrUmygbS+zsnHmAVquny5LIvi2H9Jc5L7h7gGPP7tq47QQlMyfk0KFkmshw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.4-nightly.20200419.tgz","fileCount":158,"unpackedSize":999436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJem/i5CRA9TVsSAnZWagAA6bMP/26x0uH86qIYIJT4PQhY\neqHQ6eCK35yZHZckTErb2Y9+oa8t+FO2haYH89jFYiCJ/BSVUfqb/oWA6Uys\nbWVIglQOLOn7zAOQMauC6dyT+qW6wPZnZNyy6HIng8Qst30pYdL+99CeNW/y\n/cLDa7cXpgSz8Cdryjue/Bc+XimNsuGwEKIC2m7n4ULM7QnH2ESMmE91BoE6\ngqtwLSyB5N2YkYxMK/uS4jkGzTBMgPri/sTm9RHnbReXNts0U5ofiXjJ272F\nomyLWM+mBlpkVaSikUHRvNimf5YOCjynd5dBLCGrPtiLfc8YGaOIO76uYSss\n26TqcxVe/8jEedBKD0Ww5MS40nNn0II4YX8aSxWSO+kyE/1GL/QKF2NhltPS\nyJEqlXtqKzzp/uUk+6VBlIfYlVLmwojTtLGr8m1aqjy1lIuCY7rxuRshukeG\nxlen/eXV6uUBHapht/xwyeywPwjHtAbkOfTvO+xBePCM6lymFdeuqZn9lZll\nbmpRj4KdquhLYegzZKtqsSTwN7gTAnbFicKOkNnLvFTZX8Hr2o9Fda+xNee+\nNnyIHbipAQD3SklLeDbl5JdzwEr8tm/dKyCZ1/A4jSHITKyI63Spiw9IxHn0\nFDoCVMKam+cd0FbHAt5xAQLePT0AK2kNGZ3cLLsYYMO4fYyceiu2tGdkvvvS\nWXos\r\n=uZXT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9oOr9/KOMxdz0XKKV2aZ8+uCNjIsdl0/62Mwl1jPEIAIgD+9RIZXPzvX0knW8Lv3q7+WUEVSZYlmyX3zf5m+3NVY="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.4-nightly.20200419_1587280056954_0.8889748283042775"},"_hasShrinkwrap":false},"0.18.4-nightly.20200420":{"name":"brs","version":"0.18.4-nightly.20200420","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.4-nightly.20200420","dist":{"shasum":"f6d07129810cddc6ff2170ec4a85a269cddd1d38","integrity":"sha512-SHgW3jNFcklwQ3VSpXfvGJm6pnD7DgeicgmelquDz1jot6zEmy3d7FQXm8C6xo9ioySWk/lspfFj2vbJ1P6eCg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.4-nightly.20200420.tgz","fileCount":158,"unpackedSize":999436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJenUoUCRA9TVsSAnZWagAA1k4P+wYnMqVQBJYoN7FfGPNA\n8joB+kZclfgxC3bhmEtEnIa4Pp8d0+q7r7o/3PjSsRTM6RGEzhCLknwURwR3\nG+4QeQ5LgtR3gF8HF7kLTTMpbcRN7aYZgWmq9+WpS+0MX+v8sf4a6VCGH6KS\nbgvJ0KkYk4bFfuc+SHWiMl4NkOqMTQp4AtSJ36mdcjDxKRh3NIE8CRxTsVHE\nPFLFFF9Ruupd15ztFzei1XHv3sthEwJepPm6EFZz7TqVj5tJ01AdVVOUZXiD\n8b0kwaW+4zxtRpZOr/SBH98aBB4Ffn+q1zd+2MOXlh95LuWalqZcUHa+WT0j\nr+qkkKZ732Qf6xJp0SdwkJBucYNVHyR1A/YvDtLTGVUgfvx+sRfeQXszzI5u\nOOlne8Yrl/Rtryw1d0Y752bpFZdIpSD8dSbHfQNgNXhmuO7oKbey9qKyAKbb\nV+dyNY4k7uoVmAGOpAno+pf0lHwgWfFyMOxDGJkNEb/gNb5OnkVtVnUZfz+p\nNxcopJ394pF+KXFRn1+Ef6K2kStanpKeqM56V1PNnnsPf+IUR9tQUdbd7MoR\nfiie3dOEfbS8jxjFVF2ugK1eMw0EhCb5jUWAZKoSF7aTUHweFDJTzSs5oXMR\nOXKIzlwXdCDRUDSL1Ky8EmXzG+YH06Ht5IvILcodQNwL7GXoPAcI410WI2Re\neWa5\r\n=E+Cy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4pDc9koKfY9VNTkBf26WIHzlMPWp2SjuG/d4ObR1H5AIgVQuwohSL+wrQCOTL0OtcpCNOh46XVgCXnd/AS0pkooM="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.4-nightly.20200420_1587366419772_0.5577012029838744"},"_hasShrinkwrap":false},"0.18.4-nightly.20200421":{"name":"brs","version":"0.18.4-nightly.20200421","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.4-nightly.20200421","dist":{"shasum":"1b5d406069bef5673f242e633b3bdfe56fe247fc","integrity":"sha512-et6sENCBaH6w4IZD0XOVnGi2AmT0fXDSP2eC4bvWqcUBMSEgSRwexZ69G26CIYPYwdlRbEVrdhCgUDKT4D0P5A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.4-nightly.20200421.tgz","fileCount":158,"unpackedSize":999789,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJenpuqCRA9TVsSAnZWagAAXdAP/0amB+y++CloIRwJXquF\nw+2QEI9C5SKx6M0W8RMLMZNn+PLWbE/8+ZnZITVUujGDq91VDf09RhDAzGQu\nHgwIESrhm/Bo0lF/NP8RhUrOBYnSl6b6JjJQVRbnl0YZ9LEnXRRkBnic+iwE\nGdTN/WKQNSAa6dzLY9RWuDkEtsG8F+IdC6XiRHpj6tsx9TecZt7sLipdlIoP\nUjPTqNvd7V6gKQphEvNoxfa0RQaQa4koszSdWdVfZ5WYkGNY8RKRSQOdjPfF\nvl1w6eXPtSNmraFHU+jAev/gp5bkTnhgfWafIlOBo91rVVBksr9Ad8i2SpGt\nAGhr9e8HLTEUwuW6usGJvBl5XI1YXT0rDFl3d/XsEaNxDYCcxz/4undvNhxe\nBXNUk5JfJ7+OF8JAnKAm3HK+4cUnx9fD2jxCToPHh5oljWmnR8Yl6qCHKLi7\nXM0Ub5iLS5PB7L2HH1yxOJoooN70/wq51cQjq99tpx21bAgcWr6JujHLXi7N\nOUAnYQKN/QPW1kID1Rr16ZtknmctYI2IxtUEKVcUOW6WD7ZjejT+TkduLM4L\nkfW6glH5CceM/JfxJtliB5APLR6QeHyprK2GBZuEl/Oxdc13nYgqFjV4PWjO\n7k0yQkAgRdI12W212dVAp10zd+r8oZZQkGDGsFtN/FyN1gyejwhF1KCNQRKm\n8KZD\r\n=pksd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/wivdVcPNGHTmIWRQtfOR45L1W3ZrHpPM6qk9FcyQSgIhANRY+BEE6zl0+W1g5XDtO0oQLF8eEsK2yuF4sEpB/uaL"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.4-nightly.20200421_1587452841821_0.7094263076471428"},"_hasShrinkwrap":false},"0.18.4-nightly.20200422":{"name":"brs","version":"0.18.4-nightly.20200422","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.18.4-nightly.20200422","dist":{"shasum":"4bcbf5d741fdda434a07e44c750bdfa1bfa7d4cc","integrity":"sha512-/7JGDaefwdqHFtt+0B9MwB1N8x4VDFB0A4TS8Z7HTZbz/xGKQuXT6OgrwfNBTdmd4zd3qQvCmTTV/iJlJCfVGg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.18.4-nightly.20200422.tgz","fileCount":158,"unpackedSize":999789,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJen+0vCRA9TVsSAnZWagAAhm0P/R+SXsfOvY9rI23KtQON\nFgLiKvkaHvwHKE/R8Adot/DHo6hZsGN/DEuuSSNr5XzLq8pmyMDAWtPHeXWS\nWmO4AhH/+USR+ZC/haENQULeIaxqnCJz61sE2fIzw6CxWrPDNzB+0dTMtmaO\nvQL2FyHim1CAdQ9R0IsZwvnCvZ0k6ym1DOFX5fM1cEmUUjlBXDF6ysk1Ijr9\nP+IhY/Xq9HxxrzfTjgo69u2Zv9JqXuYptICJEHbTFg3qLxO5P+j5il9+TWrz\nENAbmxhsJg/yRVrML2+IxvdRBMzFncLQnCy+YJjdQiL4xRuaPpXaCSJ4QzNz\n1Q4b7Fa7BfBDT0iKWhB6ujogfIWgzyzORR54u0moPd+UtjlFC3O560ZKuUtb\n5Kd/pKPTAXm/rzrwPHemtaS2mdTZW4vCoNwpeDF2yW+EIanGBf2g7SD+VihT\nIajAOUfYVPM/Xk0kqVupMOIV9l47Xm+RjE07FDU5N3QwwtiDNoqyVkUW6/Th\n3IQ0tbBd6TkZS3UUwPdkGyQCyB5EuwAPz5GfXxgYuoIlgPBAXD1owPmIofI8\ntvP77YbYWPkrv4vT5y9ug+AQJoq245mGjfwYp9tAPvUneAp6A/FQ1ojyhLRA\nVqu10P0MXBYnMVBpZ6SbmVb/jh1inl67UHvmFtv5Cx8xz1+rSMHIZfiNUrWM\nCgDD\r\n=UgWw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAUl0jiACsx/rgu45TM+PwAeYHxKzrSXTopAi+fgk5HQIhANklL2H1hmJoFksWbs2XNZEe2QTy+07UUESC01WolQAf"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.18.4-nightly.20200422_1587539246735_0.3643463078067464"},"_hasShrinkwrap":false},"0.19.0":{"name":"brs","version":"0.19.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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) 2018, Sean Barag\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@0.19.0","dist":{"shasum":"654c8366a916e671a1e49e3986ec08ae3b1f4084","integrity":"sha512-tlnJyM+AZNBkjoNZ3zgG/47BLyKCAZQNXNy+MkI1X5iXE9YZ1n23nAjR7Upi44/XUhb3wkt/+FYNK32IK+qXEw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.19.0.tgz","fileCount":160,"unpackedSize":1004576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeoMGzCRA9TVsSAnZWagAAI7YP/2lIIq9zPuDZKNmoYf9Z\neMvpLo2tA0qO973dB+xP7faXJchdh52CTGaNgslkuQCk7uJ5LC6NUeRTSm9u\n/miWbqZBDcBTOLjLEmEhXHmyF00T0LbFf8PMhU1dcTa5ctBaJ1Lx45DTUKvm\nwtjvhDxfTtpKkDZwZE/uFMjzJW1SzNHWA+qxztnD3ekwAs/P7VhSdFfn+UYu\nEFieKqZL0XauvVl85SCh+3cyuXrMO5J29sIFFIMY81HScrZjB3peAfHuPF+a\nUhtfDQRrEyc/GuPj8fJZVB87raBXVBf8BRBm0ajtl4v9Mt5G7YyNrgUqOOKk\n31zjfpom9nkes4wtmzBThhmFlmZqjQ96XQsUau87VFlyyNYpsRskmofOKjwl\ncuzYOmj9mxvB17F/xwOyPtPNIoRkDeUAnqoKHPdmHmNbLLQ9UWHjyYaYExgR\nlyfcoxs0ukPAe1fpojy3SmM4E8DfmvfQW4PzAM1m1+rtd/gk4MvE3EIFUdG4\ng93oRVe+ania15X8M2Z51J26dCr9pZ+MaIoyPM4JubkOsYvaa4GvPTE/3jCS\nf885L0rnPY1pCCZsLfjNlH5BJfZT0/QU4TZBekjcRITNIcigQBlJb+U784sB\ntqNeEWX9g7G0rIjsUxhUWNYsl9GfmzOQYGKY0tZrDRCwGgymC4MYli2lANGH\npZQk\r\n=J9IZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjl55eBK/xM4XLvKNFYVuyxSG5WQuM6s78KJXtc+5GeAIgXpMvEPmPCh9VZ6y12wKKoQsF79FIGXnGIfRt0lqw2TA="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.19.0_1587593650500_0.668847769708254"},"_hasShrinkwrap":false},"0.19.0-nightly.20200423":{"name":"brs","version":"0.19.0-nightly.20200423","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.19.0-nightly.20200423","dist":{"shasum":"49e91307836b825cb0be19fe8d038ea4faba1e10","integrity":"sha512-uAZOpxt4FFpueQpWM0j58jhygLwWcnwSemuCGUGmprZ4Rxs4djJca3eEd25oupse1jh023McKkvDMORQzUMfoQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.19.0-nightly.20200423.tgz","fileCount":160,"unpackedSize":1004593,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeoT6gCRA9TVsSAnZWagAARTsP/3amNYeNDeNI1bc6LAKZ\naOWcBpmQy2qsISadYkW75FGbClvFrmiu5RvfzAGEaIf3FfUehhBjX+MGipXV\nDCQWxfS8WDnEtrMho2GHiGyup/Q6dfd/TfJpkdZZTRNfiV15DGn5DG6A6XNI\n05G2HCX9ke6mSBokmU5A7KT6539gCMqza9vkMkIrELIkbmwrOhb7I+E7j9J/\nNNFoHsYeLvbV25eRVZtCSZ4wBL/7qQX88v/gza3sgu8QvG7CRm9vnqqdgPRK\nY7Z0BuwWxK6cpzCJN7QWCuheSDsgRhVVSm8JB9v3aJlc3dRBsVR+7pMR4lY6\npMO8KLvwLtRXC58cHzb+ZWVdL0PFZuPHvrWgby9d0YvspfMIiKKHJnA0O/x2\nb3swbtjJh4xfWS1h7dnYFSeGaUsDQcjdxeVqPBRpCh4YLOMUGXmMetYqVdpx\n57dlDDfpfXJIyZzxqUA5KYTHdn8diP1kQ4F0OZ5NNpCt0MQmapbYMtdJ2c/H\nsl5DgKw3xG6E6hHVt1rYNlw1Y75GpBnYCDDfo5CRdrJxSffOosF0e4VlBgPL\naTgKg0WyRILeGmAzSv1HQTmUExgKw/07ZrbGwQQ+Rqhv5SJysbiwOQZBuUUV\ny+0a/kF0gP1ZkgY6wQ0ysewMTT5dMMTbGYg7hdhif9SLpVP8qepH9lG+vE0u\nf5qr\r\n=xPZj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOwaXcUxIseWegJQ74JClzrsblVXGG2yn5fLDBbx3vWwIhAIOxYhKRnRWinTkrR4sRNKmqhLesTTXQLaqEt483nHey"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.19.0-nightly.20200423_1587625632075_0.6989055749908888"},"_hasShrinkwrap":false},"0.19.0-nightly.20200424":{"name":"brs","version":"0.19.0-nightly.20200424","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.19.0-nightly.20200424","dist":{"shasum":"153e61eb4c162ad9ec96037a8026009b82dc02eb","integrity":"sha512-gV5dnF6FaYqM2u39b2WFV0yJclwczI3s1EfApWelDblSeqWub8Fxq4jh//zXWUOPJR2l9ks26Y5Jn3ePKnLsMw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.19.0-nightly.20200424.tgz","fileCount":160,"unpackedSize":1004593,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeopAaCRA9TVsSAnZWagAAPdcQAIG4svofVigY6KX5xB4l\ngrPwbs6H7kq6cPnFZWHOPTodt4fV8m0zcntm88OfQ6nA1dluF/ZkdZSMpy+S\nJanvuECNJhHObbfoLEqIESvUDqqRenJRwQTp6ptELQX9Qg8+Ldvqgyfu95J5\n5OKQtjsqI5ybvCjphOWMOGIlf6ENUMuUWmA4B/+IXhoCForK7rEN09lhMoyb\nfKfhUSyPWWxowWBb/fDz1vuHNZ9tPSJbJ4zYLlakWE0a0mPmKLYBM0Ap626H\n4Cyq/tY0lNtIfViUgr4TXk/q23LHkwKvX3MJdypMPwswGUSNV8z7B63mvADO\nLg31PxkjYNsh/8wtNW2ACJBQ6CwytTDOfY612Si/fhPyjSLMs842/SG8ZifH\nlhRVJ6mcoYfUeh3u0bsFOquABJBdT519NrZMn4W27FgEAMccgVKNWGFufnXJ\nWCfUAGBJshTdahphYrHqxJm7JTP5X8bduvmCtMXkl8ERcy6mGTMY0NF8rcpO\njpbPQeJcV/YDdxR4WO7rQuae0dRvNuT48t076zD2hKJ3c/IGpfuLiC19Dhin\n3DBVIhUuQ9ZbklBVR1Qj8UvGxOKg2Wqk2oqQ1CbnCKfLkVnCVFfP0Du6+sEb\nwcooXg89SrCpe0t0uH9Pnqv3VEkzwQUhxUrE6B59mv5Cf09tkjFpcHBgSNBR\npAZW\r\n=4W6w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyl6hjIuvKKcn/mdalqwqspM9JmwNN+jDeKGvvtEG6XgIgUf32CSMgwKUYdRZb/2+rnAwaYTEHsXCc28W6QxxiqK4="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.19.0-nightly.20200424_1587712025290_0.27411777135450177"},"_hasShrinkwrap":false},"0.19.0-nightly.20200425":{"name":"brs","version":"0.19.0-nightly.20200425","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.19.0-nightly.20200425","dist":{"shasum":"7bcdd5da7ac59243277a75b157cb376e7e9311cc","integrity":"sha512-EjlfINEk2moVZmviaipFb0R3cmZZ41j43hpjmaUavQd0vMXqA9RsUmdG+HN+zIczDZG7kB7vFF6rpj9LJSqSVA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.19.0-nightly.20200425.tgz","fileCount":160,"unpackedSize":1004593,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeo+GPCRA9TVsSAnZWagAAAxwP/1s63qPoqHLf+oTOXYZB\n9xnm3lFhM3xpgVK0EQwzLCrd+d61cmbDe5493qWzAS9lJDy628aG4XzmLsmp\njWVc8VoflbqieN30yrhVJeuTZX9n2AH+J4SlUhS+Y2kkCXxduxedOSnfgDOG\nIJebwongVc8W9kiM9kl7R4LzR6U1fc5Vb5CeqyLCw3gbq/45XwCUGnZhKDa8\nUnhsxbgl+lsxJ7EnIOjn/Ly2LrVeADY7SECy8rMnR3Ci3tHh0fmpAL7QUN6O\nhPc7hMDq+/1g6ydnG9H5N/aNuXW1+g1IbhFCceVt2c8q3eeX9W/LgHWjSeuO\npB29wQdxTq5FDAro2NfiFsV8MSQmTiM3qw3rWNdAoZcZJGNM1FPIWZjzpWEC\neC02KL1YAiO7UO4P+6YWV/XlbMkfagUbOjDTRWMcWnMGP33qQiW2c8WBSn3x\nXHu0hkDdQBWkziN0tb56jxRnI6Y8PCMX4vqoYnhjvMKaI1kTbgSSqMrOFTuS\njp6+GnKAL8u80xmB32fLyRS7Lki5SIsU3Q2svmrt7GxJiCO2Wu593u/Qrlnm\nAet2aYMk7r++jxcOBrE2g4xleng8BnE7VDAxvU7OTulqHmMDQksByLgJUXD6\nHACJ8oZ0HzcuHP+5kJMKz4NlcdqOCnT0NY4mK74KsMw/+HoJYELQ5bhUuc+H\nCeEa\r\n=hjvO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGJYqPqlMr33ZNCunJTgUs094vrxjGU0yiliUZuxsyTgIgWrA0Ua0nEDGXJrlKN9K05Z0CJKHNhgmRBvFmjXkxeLM="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.19.0-nightly.20200425_1587798414433_0.9046232629690867"},"_hasShrinkwrap":false},"0.19.0-nightly.20200426":{"name":"brs","version":"0.19.0-nightly.20200426","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.19.0-nightly.20200426","dist":{"shasum":"90ad48f7b66a820345f9c57c02808e4da75bffa2","integrity":"sha512-Ex7C+kIjQtsFr+PswwthEAuPfPpj7GAf46iHCE0S1vvuUZ1/LDjYGZNxr4wMNB5tCOCo1/gNgB4VgKrmt9rFxQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.19.0-nightly.20200426.tgz","fileCount":160,"unpackedSize":1004593,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJepTL7CRA9TVsSAnZWagAAdrMP/jDonLHY7YA++mMBk9CM\n6f/RjbQwqn/2iWfy5f2TPAzdQdnME1JlFEfbrFun5mL/No7BfxBKmmrKzmRS\nC5U5S5M7lGODSwSeeBXOlB99aoUElzbOjCZ12se2C56oIzgKMlUKxpEus+vT\n1bYVSH61TsDjpuLUhss1dZSkhSVHT7sghyc+yJpSRZQ7LPKMctGi2+Gnd34L\nwY5rUMAouvg0/uj/Ah1Vn5mlm5zOetbUeyZzMkGl8nk75MaMqVtuvE79N9BJ\nt9I0QW2pSZQgIZdehsd+A7FRXq3HmLAqYqvByY8IpSq/PMZagxalouB4xw/G\nZNnJ+gQ2QiVNxmpIrx0nrR2wz8DRwKstsfjCSz+q3R7oPX3d6LJqLrBYHCfG\n49NeT9gP3MQgtxOZHMOdgoEomRziPd3WJ6wP4iVags/4Kzv0Ye5Ou6RV/0yJ\nEW+BN1Yu0wshaQnF7thkGIE68+BgjUUjoZUlKKwUYxsF64oB1qwkQHNR9ySn\nSdHRIPhQU8NekTWVQl1WHGUknyd/FKOKdHHIw6nYFaSpsC7yQLDNJvIF7a76\nBX8b7LtW2d6YrmQfFD27TqZ4CkX2FSPni+xds+OHxIZdLVGEQBwSwSZ/eTzf\nDtV0VPXASI/K/rWRlvEm5d3XrvuIvXWHUKGjFoOE4HWhn0OO1ThhqMnGXcAx\naAVa\r\n=UCKU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFlHstWtmki9Pq6bRIOsC3pv1Zt+ILFN9jfyXabPzwUYAiEA+VreZcRMLn+sG1D9HXk+++FQW+UpAQTAyk08Wjsj8fQ="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.19.0-nightly.20200426_1587884794700_0.28379574260408025"},"_hasShrinkwrap":false},"0.19.0-nightly.20200427":{"name":"brs","version":"0.19.0-nightly.20200427","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.19.0-nightly.20200427","dist":{"shasum":"56b738947339ee0803f465ddd48711ef8bd879fd","integrity":"sha512-rEXpmVAgG6HS2tyipVvojAfVFWZMJmElClJPca78NYXFOpV58bNi2+UkPsn/mG59HQVWA47E6tcPuK1XGl0NqQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.19.0-nightly.20200427.tgz","fileCount":160,"unpackedSize":1004593,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJepoTBCRA9TVsSAnZWagAAYngP/jhQHMM6TFy8DH7K3IGA\nRJthWh5cSEpwIFoJ6FZ9kfSjjl3XC3X9YmeKhEOQBwxhIF7Huv+dHP/HVTJU\nuNU5pYMDz3J5XlLmZ60JMXLD8puz4YPcBuyPohdZWEefPRV3APQIIezMx6l0\ntJkoWen6E48DJWP/ndkyf0qjnfj7S6a+4+F4335OyETpoh+UDnqjdbRjpQ7z\n/l3puioFIxTxZucjjHPpwm08BNj0ywX3vSQt1n698tMgO2K5san1jhqs7y9m\nH0GRWxtOw1nvA8Xa3nL8yGjq9Qhw+O/6Arw7rtOzT9qyzFpCmaaiYRxX+SAh\nm8V7gx1WvYpPP5t4HYSN8k48soIjDli/nKatZDWbp6RzzhCUrHj16Q8GrDvN\nM23iRCUWzq+4ZI30vVt0h8emfMQ9jOcaTPNFcb1vgVtnl6Gc1jktyd3MKp/v\nvrr4pcFjnF4mZTEzPD0r1CEROV058tiQp5dwzf7TbBQvi2fg4iUQuZwxC1np\nB/kLsSpW458ERRJYS/TFnslNpf3fTmELTqqCtdaAlMOeFDzdvLgfqHTmYO2w\nRvih5ct0k7ZiOTw02QS8T8qmP7kWhoA20UsOamirASb3khq/20SX9n7N8lXH\nwTNQUtQfrj5i+CIlN1Du1sruX9G6PREME00OtBbirCQLwyerF4LUAfU1w7Fv\nzm41\r\n=wKK6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCN0UmdMQx2uVfp7uo9jePn9IfCBe7wc/6gOwJYNsSxoQIhALvvNHDziOn9ebGM5N5cpMeJovuKzMZRmp6xiziTyrgj"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.19.0-nightly.20200427_1587971264449_0.40294573194297434"},"_hasShrinkwrap":false},"0.19.0-nightly.20200428":{"name":"brs","version":"0.19.0-nightly.20200428","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.19.0-nightly.20200428","dist":{"shasum":"f72958ee8651f389a22f22a1a6e0ec4605710cdc","integrity":"sha512-oLvtHnhzPRrrYTDZxRrWwvYw9a1MgqkThqcE0far7/9hfJC3PjjP6jrRW+FHonMN6aldMjSRx1FTu1zlsDT4Pw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.19.0-nightly.20200428.tgz","fileCount":160,"unpackedSize":1004593,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJep9ZFCRA9TVsSAnZWagAAbSEP/ipQkPXXtrDIWtNbrPzJ\nvhMQKR98eBIL3NIvbf4crtFvprEbdl9Q3uOsJNwSQeY1eW63WYYXvyxQf8Oo\n5gG4yx3Vm7q+z6sFY+FwKtIwQt3n7mHGbH3cZUoSLtM7gz7yM6RHk2vHV2kj\nfmWjSQR+5aQsXipDi1AemtZ5hIwoEw7ycD8SYrY6g85BZyzLh+esBR09xrYT\nCzkDuAfB7rz8qLKoQCPo9bYoWRtdAtonyVVpqFtsRmEe6JlqgARdwchJ68qh\nsNYToD+SKFp8Hkjr4yydqNFip5dJ97UJzoaXmcS2SRr73dBvrDrp+7rGxM8g\nSbozhcjGYvHHmxfdgHRIXx240xs9uG/rltI5vDrwVAXJ3PGZRLvVckoIrIYy\nDwTCECm4kyFtOx7FERB0k7MhWg9HKfTo1rxcVbU3WQck9tbfvX5HDRrnnVjw\nl2brCf9jXkKiec+/J8f5WQSTwd+yFwnetC5kYlRu1DV2FIVitA0WQuKmESkR\nomDEFMCVYpx/ye1aDpu1TkOE+6W8oNw7qxcTxLN6ItnwxY/gJ35BdRBCKv6j\nHJOyJ0JAxPcx8u4ACQI2w1LmagZVEwd4VzeA/cCM6ZZt8khOtk27Qav3vqUr\n2oEwDcu4Ys5knzVd38ovhrGlvj8APRjm5fkUxXrHCzQJFZGxNsHVkeWqlKVy\nebs4\r\n=YV09\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDV9O0zYhDKexYlSHbu4ivlotH5sQ05nfCM8AHLQ4D3rwIgMQKlgHa4QufsPj0bQ9WHqc8lDRx1i7lPjQC10NMbhn8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.19.0-nightly.20200428_1588057667737_0.9596526635548723"},"_hasShrinkwrap":false},"0.19.0-nightly.20200429":{"name":"brs","version":"0.19.0-nightly.20200429","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.19.0-nightly.20200429","dist":{"shasum":"29f0c617d2e2370d5f88a1d7e608d15b56cbe713","integrity":"sha512-2Dvu2LRPqHCEgH/PHkd+xbiPzRTUwakRfSjFzjCvnLYDKAmX9uG4e6UNAPUt33qXJ4ACh0GrfTU2+im9xbgI4g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.19.0-nightly.20200429.tgz","fileCount":160,"unpackedSize":1004593,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqSeLCRA9TVsSAnZWagAA1i0QAIwV6FzCteoLi0rSFhIY\nh19oikvNGw0g7Q3kVREjhbOQL+3eMZe7q5kOZTaJ3FGad4mbIQ4cBD9GITXB\nHgAhRS7GkamUOSPo4iwo71JCfOxoj22jrP+Hp8Byk563UddDelcAfaQdWHLK\nPbsd3ArkT6dgX+PjjLa07eR2tAXphPc3gpXmpGwqhhldpeueLl7opntc0+Qi\nj7lTjq88IT4thz40oE8Eo6zptGnBKLyv6S16YouUmEbkTQUj29WMJbw7UF3j\nB7N2I0CfvSvISwfg/AJmLukykOsHDvRNNEPIZZdmZhYmKMh7cG0BMntbPlhw\n3rRFdKPkjBf7TB3vXmGGQoPYbp1IWhGC6mQwCW3E3IWZVvBqrrm6pN1A146K\nOsq5fLffpGRy/E2q+UAB+03//Bi8PC2P5itlSiSk/PHryygK4okaUHJz5dS6\npIGO6KkwVw2EELtDjmr/dyyQpG+3u3FiuiEKNdVEHI2zeDRvbnLu6BnbnT+B\ncvZ2J8oLW3NHuwl/18UI6BFN7IxjobJsPSEZoo+gJ5A4vMS+SKtYy7bBeQLY\nV4d6pZCBwElprXWLoJlf1BZ1M1pCAMawqw35D5MIDayVD7qkspNddPfs3d8I\nKBIdc0zhCJYADyTwuNfSjvsVWQ669k/yFZSmePsqLWvEtS1XWC1NlmhmeIC+\nuZEY\r\n=vRLp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC7bW067zDupCelQQ/0gs8kUpka/4dgOvpWfWdbUI6dfgIhAKltm609UUflQgs/nM7Z/aeoJvugRAHPMAZ0mBDRwnLr"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.19.0-nightly.20200429_1588144010457_0.9352784799413258"},"_hasShrinkwrap":false},"0.19.0-nightly.20200430":{"name":"brs","version":"0.19.0-nightly.20200430","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.19.0-nightly.20200430","dist":{"shasum":"6c73a7a914085f54ba5301bf8695eaed47c67078","integrity":"sha512-V6qLL6xpZCuoKfpEsvvEvWsH3UAu9IC0lSKoipJP8XTOrsdRaHdR8M+JkjpQyGyqhr5oXF6gpAgKmqa6T6hCYQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.19.0-nightly.20200430.tgz","fileCount":160,"unpackedSize":1004593,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqnkOCRA9TVsSAnZWagAA1+IP/2SHNsyPY0uFlUfDMUZ0\nn4cS6wV9ny3xIG6jzcMll5i+hsWWhBc6rId8F2YqbnOye2qLkpGV4r92slb7\ngvAhWtdImC/Z+ss9xPwoWMpZS3A5OqMAwyUomC+7GbDdNcsBXI55oZwX+b8H\n14cdrC0toMLqS3NtPuOZaqa0fZHXwV7/Qh+2ZMQpHm0Q6BE3Tqiiu6fM188H\nqameouzxP4PiFyv1SqGtdnvkdE0B/Nt5r47eO9aBEzsiDTKjmfFn6dHpnWTC\n09S51XBe3UCHQmok2mcLOvm5ATtqLWa/PeYAnfqo9snb25fHTjRvq5ITtYvN\nSNzoa4loluIG7wAcqB7i6nOJ25Ayt7id+GbGKyWmrxA/AKuN3gL0BcVcMQ79\n1bM6bVAh7AO6IhGrJ2gxTbx3diLcNASN6xp/UJcrm4gfw+lKwn8MmlpXjupB\naDGq9pp7m3T03BRcjoR0c+juuMCBiDMrW4zhwtsGVGYW+Wg/pAX3jG5CCJW5\nAPME9Sbg/0znG2EylZs1vO/MqwDMmMACl9G9tazcEGN+bxUW+eBoE6sFyQlH\njEM0Cn281O7oOWJis3j9kVUYiFuYsftKeY1K8LG3au0vxz9p8Uq3+rYhw+FI\nDZ8yUw4qTWTURE2kzW2Jzk3iSb4ln5XWyhTO5R7UFQDebMrV9+qSLuv7o2qg\nt6U7\r\n=cGUl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDfF38oWl3o4lBfJe9NLbBKVeDnNDpNzFy725tt0B2VPAiEAnz9VnynMdrqJ+i6NkmGufFPUX6LHQ6ffgUJoGbTIuUw="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.19.0-nightly.20200430_1588230413860_0.47799575314360054"},"_hasShrinkwrap":false},"0.19.0-nightly.20200501":{"name":"brs","version":"0.19.0-nightly.20200501","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.19.0-nightly.20200501","dist":{"shasum":"7288103a128e88453ae6e27468d8111b7bd6cf62","integrity":"sha512-UlLXXUua7EJtbiHIVyUesX2+qDe0tYj5oAmB1IWUXBOjd13mIl2Hflm2U4CfJeDjcneiwHHd73ZdCc3aZQ6sKw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.19.0-nightly.20200501.tgz","fileCount":160,"unpackedSize":1004593,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeq8qxCRA9TVsSAnZWagAAnaEP/jIcJd/YOSOIg56brj5q\nWvzRBE3LvvzZbSI7TnGwiVZABcBrNaccSXp9i6sZzJFJ2hjSAVUKWddFa9Pi\nheCDEVTKCbz7Mmr2VuRajaXPAd3+sTE8zKL4lqtOz/Q/sZZ0s+e9V6o4DXQN\nsWFrGmd5NarPy+5zVkb2iDjQHsSriySNUitcNUsVZt/Yayps5mYRLqgpEwEN\nhaovY5bouhDgh0lrKDy2MACBZfBDSXBFunJZoCZbXsofkKLwh40b5hKUQf1u\nwptOIDcFksGTH2lObHebFq/7s9Xa04HAG9oyR+LTZpfaxZnDTSC+jVgGWwpo\nqSciPkl+b0x4r3r3RRMLHz4p7alpkFeIcF3IUynCr/wxhT2oCWpXVH556Qd6\nRBX5SS6MQrWSEkHcAJ4N5o2dtntOlaLhzk1d0yGOX/gLKA4NbavqByQLao1J\nlOyrT7u28RSaDv3rZEHEznQ24JONq1anERZwp0q1BOUEqOra/P0ViWWMmpkA\nbBpBHFl7RYaEV/E6yGrW+NZ2IZndgyqSdwQ1J/mjQaA7aVVdMPYUSR71JTwA\nUwgdcWCopOdcD3aWXlF00KcsuFi7RdMzomGAPQIXRE/Gs2V7zw5RPbirPCxO\ni+gkNXES8/dX4C1w4X1W+WJcb6bgoqDBIefneBvH+G1teVSZE99DoX/Pv/On\no09u\r\n=Iws8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLSkIZZYBYXHD5pWBY9/kkmD/MmDE+9qk8F0wxHjb36wIhALxTq2H4eWs2/L6A3lbKacV78ae/bLtetGF5mYezpcwx"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.19.0-nightly.20200501_1588316848695_0.8847465716432301"},"_hasShrinkwrap":false},"0.19.0-nightly.20200502":{"name":"brs","version":"0.19.0-nightly.20200502","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.19.0-nightly.20200502","dist":{"shasum":"6dc7c587f5e48ef5be50b035336b085999f89c45","integrity":"sha512-AkPh1D0n/VG0KHB2YHHKFVyFsklt3pLYCgVWE4C76BLf0fn4c8wF3sA6CBCZpIwPxWO1BLjQF4ZM7jQDxF7IOg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.19.0-nightly.20200502.tgz","fileCount":160,"unpackedSize":1004593,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJerRwcCRA9TVsSAnZWagAAmIkP/0oMlhern4rtOaJawpPK\nJKdwc4GyBnqML8zVYqX/oIy/M1htwlFayt5Gu6/LNMG2nkdhxao8kfW9IUWp\nxMuUKhM/vQFKQx3OsW/uro28L38K0Vn7d+ULXiRkKBhG5Nz25sY+w0j5ocSQ\nVWWPX93+MZmvOMbkRCe5nH7C6SNlU9W9GUkAqfU2cVOk6rLPOPZ3AW0H6bd6\nbraAZ1dy5SJpND+2d4LGs2POcXSAS8/1Aso8PJT8eCz3KPs5E7S296Rhytz3\nn74L/2ItMsKXy8+Sq+Tan9Yhyb8c/ZcubGpOhhxuyJbgdO5Wr5J4HQzVRJaf\nDVVISUEacfwzQjXR0jt6/CUBCPhrWyZflKv2I1r09/juvOAWYI1hmoI0r09M\nAHLZgi+6ET+pzHEaupgOJ1wGibtz8TCVdtBQr309DipJgto7H4P60G7sBMAe\nGKVrLMMbK4i5Rg/1kLva+/PUhS/Ze7CZLRbbwRBrMLeKQ7EdDSAhkdx20FW/\nAJOD6VBQgJ6sdbpRuB1PMchUkoF5K71TCUYlVmpmnd54Ds9fOoG7YqYUlSGJ\nZxwaezTdCV0z2Caa8zwEPdgD7/snjeSZAPTtFDHYlTBPFth+dAomFvYHEXOq\nS+oon8Cd3FzvA2G1Y4343TvljepFr3lSLAXSx/7MkcjGk+iyEFUW58oLTC1W\ncIhc\r\n=aTs9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF/5gDgEg8oB62f7FeRQBo/ue5MMbPLYdBncBthxMWllAiEAj/YkbPrNxj7Kp6WpFXCIxDcVrpu33IwIyJM1EyySHRU="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.19.0-nightly.20200502_1588403227560_0.8051776684718157"},"_hasShrinkwrap":false},"0.19.0-nightly.20200503":{"name":"brs","version":"0.19.0-nightly.20200503","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.19.0-nightly.20200503","dist":{"shasum":"8c0f9304bfa0b743df8fe01845cb34340d15e5bb","integrity":"sha512-K5xtiPOEGX4R5qvXod9AEuTZ9VPXExcAW1Svy/VGiKxk8a0riiMqBqjZ9x1u/ScRGht0enzi1pPoz5mog28Vsg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.19.0-nightly.20200503.tgz","fileCount":160,"unpackedSize":1004593,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJerm23CRA9TVsSAnZWagAArewP/1x9pY1NSTQB1E3hR24A\n7xXvUdVZDPfMI4wKMMwJFflBfKZHZd9lP6DSwNOM8pG7AjjqSdJKqVEP2vdN\nbylEfRNO1Wv8jt2ZPoXi/gv/63eCtNTwsg2lGPtMNYL+y7cb3gugvfvfhtWe\nlYusRXEC9vH5TdXwn6XEXiVuNVl9dsXzBz/yqBu/GEI/erTXw4v6L2hhXluB\nl5Nt0DJvCG4KgwN8+XWEv/WBGtxEWm4zLwuZkMjNJjykkEXw8uRAnBSuP/Ez\njGomdgsq8uNhtjsCSOxlN2yYcbUO+7UuW0DoZcSHgM7sXkbFJJ7GalRMqOou\nWSRIM6xfSK7X4dJm4Uo917JLROQXSS/1lJzrOtBualHrMZ82cHhq0r8185FN\n0rkqfQuo9y0eV6hWmaAuOYLkVmOEe+QVWrYapE3vuZIzGB/7DgDWnUNNG7j2\nTn7K6r8XSoz+CjyQbCIQreQlTVPlh2byDGird1FmQEKbS4rlX+h1HtVhqeZD\nEpEJMgKIbsXz+7PfHzfaa6EDlHnFmQDXecOxF86h14OKmP3DnPxOALYzssuR\n5s0Ax6+vfU217I0f96UUWBNIZUVQlctEdu3FvkGlltm9Wq0yNVuEC2VIvUKj\nfejIrDsg87mxwtNkDIlEXKydoMUCKANVWGh3GzoDXZLUCGoJxhjn732O/maw\nBPWh\r\n=bDZ3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICpannXNErxfq4bs2a3WV8/LkmRmG8e5+DyvhPoj6fXfAiEAvoS+puYxOUtA6VsL071ywgzeyHpBH0FKapcKUjJ6WUc="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.19.0-nightly.20200503_1588489654877_0.27881353249427687"},"_hasShrinkwrap":false},"0.19.0-nightly.20200504":{"name":"brs","version":"0.19.0-nightly.20200504","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.19.0-nightly.20200504","dist":{"shasum":"dee78f371c7c7870abf9c67da53c4d51c3b15370","integrity":"sha512-AXcP5a9xxT2vuze58W8bJ1ZyCJXx/VNpUDpgz+uF3ClReaWYn9PSku+YfZSVXOe5K7m2EmK6VrWfOb7kPmKCpg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.19.0-nightly.20200504.tgz","fileCount":160,"unpackedSize":1004593,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJer78hCRA9TVsSAnZWagAASVEP/R8Q/tCWOXIi6zCzWQOR\n+nqBfVlXsAn9rDScnmoy4gkhAeuXtAG7kTVHcbSaQpnkGEZ/OrUUZQDyPJrG\nR/e3W6R5GA4FiO3PQ4GaHC7RckeBvnLJKwS4htux3B1HbVTo77ScxVT+6Kg0\na7carwsvWa6bor+uhmIfg+0HjsDRAmAQs7n7haSJ3Z/1F+7m9Jwmq8CzJE8T\njiy+/QHCHXy5tXyxMo7/dleA9upAGsd4YuN+ndIqxQuwBT58dhjSHd5z/z0E\nbBdBuheSoL2migTjgRoHxKpupe68rCQ9shO9fXBKMmWjb3CTxJjbQLGHWZAi\nKew7Jj3NXYIL3Z2r79/9Wjoy6TwuGEdal8rwEitohemDtnuqvcKdo7yMseK7\nQnHJmrtWotRl3Vml35TNlxdrbuu1BEGPkHrdMdg9LRfn6o97nMWBF7Z27/aA\nANnxNca7fPGXbMcwXwBC5RxDy4Y2y24NFRb0fku7Y2GyI8qsLcVQfrEzFiMn\n6vzl++QG1mJu8uFjKsb5xKKwFePcR2OXmENy7GbRWltD6/PS2IL6dHeqk59x\nJzIC7M/0NTQ1E/Jvej7A21qjM4yiG8blzLBgIToESRejHv6es6TOj78K5WgP\nC9ZKKdeY+6oQB+LrIsYZ25we3EZXTLuAhqQ0Jtc/OMo4oDbe5/9pxSnAOK1k\nTD9I\r\n=zyHo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMqh6/pTZYvWgs7niElYJQEBMoKM+rnseDvE8Rs4RPsgIgdgp8Twh2lXXptHVHdPTVhRq+LLnu+pJfWssioq/BFsg="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.19.0-nightly.20200504_1588576032704_0.5557092948509332"},"_hasShrinkwrap":false},"0.19.0-nightly.20200505":{"name":"brs","version":"0.19.0-nightly.20200505","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.19.0-nightly.20200505","dist":{"shasum":"7256554dfb70383e0c9cef8d7f356d9e4dcd36ff","integrity":"sha512-8+5YfKX4U8ACFf8N6JQCMG5LGLk3hS4uSO1PDohxuASjnMY4mw+RcblwGXQeO2GH6b08BcVNg8tJeRDcy3MDZQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.19.0-nightly.20200505.tgz","fileCount":160,"unpackedSize":1005744,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesRDHCRA9TVsSAnZWagAARqcP/AuwbUAil+y2qL2XdxuG\n7B7CRXZ3Pcuv/EH19/aPoeeh7o5RxKJlRNYcsuWl2YrJOOsmt/J8oHcisvwJ\nNGD1XhOPf28gb/Z4wp+J4LjtK1HbMRrNq1/1xGuIRnIUdQDfZKgaK58Ypfbo\ndvOULiUiX80H4KX91IXEy6n/oia5MLhTyJICV2fXiCtk+kuPlYXt/SWTFvF0\nfLkzhtwcLrd5SkDmVXNbzbVdebwTtg62vaj286MXi5HQZ/Z2j7ic8Vm0Z3Gj\nh5zomV2amextmnfZtL9SwtTHEtoa+XnHqtosx1JkKdeUuwc1+lcCQ/gGFbuD\nVf0XhuE80Ju4sllUAz40zM3GFSJsH9IyBR8wRu+O+BqSDw1/H+a8uj34jGGa\ntkcvF9CbLhb02WGVFQIH5q9weCxnbsM7xqTtnNydJICJwxvg6oPg36Yj2FeX\nl5QWNebUL7ErSPfZgr26MgxV7tDZbYawEFu8tDjBPHfX0GYgLQz7QIUjmbAP\nfmzCTrng14zAya1uenQVZaUTN6/ZAzbCNnax4zr2zExrYuQokZzNgsU3Bu3m\n6UrQ0SSW/MXg6bNQqrJnf7YTW3+14XUz+G+lqMbFQuODwvubrfrJk32+xZVs\n9lZu6ThAm24Dn0G/DCItjx7pkAtQkgnzM32Ju5XzOipToYlRaFGSXrVC96tB\nfscL\r\n=h/Ae\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB615AZAcVf/L2p76M/m27uOr2HkCWARDEFrF3s0tkfqAiBGsJRfVfJtp7Fj7bSrAK2ICU66HnsmVZcRZ1zD2umbdw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.19.0-nightly.20200505_1588662470662_0.8488352722817194"},"_hasShrinkwrap":false},"0.19.0-nightly.20200506":{"name":"brs","version":"0.19.0-nightly.20200506","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.19.0-nightly.20200506","dist":{"shasum":"4dffb9435aac17c203f1d2fe0713e68f1b5aa241","integrity":"sha512-fJf3rWwl9DTWWKNsbxdw9U8kNI8vUZb69a9oaQODqsTzt4VNuhawQ2LfKKFmAAENShbwhsiCQBDiqkzhJrogpg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.19.0-nightly.20200506.tgz","fileCount":160,"unpackedSize":1005744,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesmIQCRA9TVsSAnZWagAAhzwQAI0NEqZ1oTqyceVypjWg\nOd9VK3PxXPHj8JPeQxD+XBs/Nq9FmzpD6/CE06DFVkfhubOYB8LWBzkncgg2\nevAbYLOTDGMHuiImdXtAyO18HKYVAH1LWEoY2ghyum4TNPO5roaCCeqJjPgM\n92//1w151swmmSgwx4+bevGHe4HLDLh0cTKOCa8Kv2krI4tul0T4ZIUe5Eh3\nexKusVsp7xTi3yxeBYD6kGvTa1tYLAlsInry0v6PLQ61pz+Zvk3F2Qf4dXh3\nKOmu9msgVipZj87kbX29I+koGnyuCdZhXAIFYGbGasnqY/ytPsaMvRX4qjcx\nl2gXEY/PfG7y8/XZgweUwZsiAsshlrzVOrQUiHscfWII923beSXXtIF8QkMZ\nTpZkcN4CZcjz/EvptS4chULcb2ftHXd6cNd5akLGi6kuqlbwCAuwAQfNpObl\nf9QGbm5gHkOEW7uN92EzdwmpCfO7Lxd2M6qXQoXOTrhoArL/WiUDGAgC2hvZ\nRat7H9JHLbs7uJU4kuvL7Zsjk5V+iTtvddV9bx5fh0dIC9I05uYHjCo7ICyJ\nlOG6XjnabmLaZtnF/cll5ygL931GrcTRR27SMDgNCnidPEyDpuCug5CTbAOD\nAi1tGYzCbXCefMGpzCgtM1mhpYRiP6aFRkeXzN1AOoWqVL3DFhxWY34FcWqg\nkd7L\r\n=2IMO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQChRJd6vjtshWmMeeaJQQFtzBTAEb8pU/xw9e7+j1axTgIgMJRKikPrYkOisua9XC9ovCVu4HUx/dPcxLwDNQ7x2EU="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.19.0-nightly.20200506_1588748816442_0.38557690852619464"},"_hasShrinkwrap":false},"0.19.0-nightly.20200507":{"name":"brs","version":"0.19.0-nightly.20200507","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.19.0-nightly.20200507","dist":{"shasum":"f9f7396eab861dbbb08201a4a4292a0c2931cd9f","integrity":"sha512-ZJTFoPiwZQ00pLD6hWPlHecIWA43O6ieF2KIe4NYaUmixporOJ/aG34b5aqFhxSpY+hxqOB1L1L6kCITjeBAqA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.19.0-nightly.20200507.tgz","fileCount":160,"unpackedSize":1005744,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJes7OcCRA9TVsSAnZWagAAFigQAJxvOrjXLweQXdUuFW3L\ngp8BCOgKiOHckeU3modr7n57FhkuS1Wcd0HKHjvR+EiQgHQq9dLfKXBppISX\no8SPHHOZPeEwNlUfZ0oYlcP34vW56UJgcHzvVmuyERCKuf6QYHGmquor6Kuj\n0iXzDLxPQ1nyAAVek89o7kr7T6DEs5d/xSyEUMb1DqVckGH5VfgHVVPAgbr5\n6ZaU+CC5mCJcGGI36bf07KIkJlbXQpR0i6rM7QW1e3IEeas6BwwaTTjZi0as\nv4x229SSQ+lAQtAFFCC7ehDU3LCkGZfu3BCEOreBgNGY9eRhRZMcu9Dt13fv\nBOsaxKaUx6t8HiXpjWMBzadYc+cWo+g02t1dmhTSr+UUwdlH1cmlmLSZQC2K\nskUymmSjNa38vmQgCMsGTbgvamDjhC4DXT/tm5mAFhSNEj9QxO+ImKqswtGt\nJ4guTz37xpg0aoouMz/lZcHM0Zvg6HorUh/CoQg6ftc80bAHjEhLrp8u0B34\nPuLKe6+051sRlTg9zwmvjKtZDrgbpWPTD2pbS3bNUAV1OREvOgVBqXuuJwN1\nFFvqFb9GJsvRN91PU+LnUpFWFQA20WCWm2v9nrLJSgfPQgGMbV7SAdZYQ88Y\nTTUOOK3aZaXunIDjRJt3dAoRjqMM+wNi/B0mCtywvzTa5LKuL+8uCN/DWMdm\ng1UK\r\n=iQVK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDN1qG2XH+RoYbS4aFXtaulzLSX716GW7FuHO/h2synTwIgHCKEmMLMrjqvDGreex6pbzNcMYVNOQbHWJiP35f4WY8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.19.0-nightly.20200507_1588835227439_0.9698757275546523"},"_hasShrinkwrap":false},"0.19.0-nightly.20200508":{"name":"brs","version":"0.19.0-nightly.20200508","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.19.0-nightly.20200508","dist":{"shasum":"f1133391c5e8ff0c6765da486aefc9368d35588b","integrity":"sha512-YpKcKmfecdR2/B8Im1+cVaNR9AzO75ujzs9TPnX5PZCq9QUITLLlLUljrg70PUZGg//h5FqCt8F85cI8qDnBLw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.19.0-nightly.20200508.tgz","fileCount":160,"unpackedSize":1005744,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetQUNCRA9TVsSAnZWagAANkQP/RFo1IVLyomdVlB1qE2t\n5v8opU65LlaP3/N5NFCkAyjXPj9Auz44fDwatlFYzFcUeCZmzMPnIk6d+Ng3\nwldzIa3aZMGaEUwC0CMG1uFe1ypzQ19bULONGY9f8mIsJAkkkAcvdqyvcZl/\n/HNhghUrnjP566odKN5aNo4ytExMnNixTYPnnYBJErBlPA58ZFKW9O8hiTGN\ndF0wcHCuh8iv5Lkb+DmQD/x9J42sHbXklKwNXwmAO6An8ULtF3j5mzNTp8L1\ngQQCrvjlj60DG03TO8IgPFzDED3zfYn4qsKdzULVEXrSlnGsIpdZqtSVMCI5\nrIQWA5+wyffF71eJRKUq+WQuvi9X9wKFzN0eIleuJHcY3QfBmk1g8LZSne5s\nFNFgG56jsMOJjFpunCVNhD8NsLCT1MZ3Ys/D95fcEKFkzu+X/TRYzlNusAP1\nk0BSyKO/DIoVG4T7s0Kj9y0uJiL7vQpaHkFKwprUXqsFwk5Kdvw5A9H0/zPk\nBXx1VXMpZWSNArcjHLbxeGYOAysQSG5haXYwRMkOIxoZqcB9f2qBfYrAoyS0\n2t0lhM4dy5LZecxPDtC8CtMbn07XhCqDZnKF5x7Ed8cuteIRiKGu6EOtVhyt\nFepGsdJ0YndYs62Qiuo/V+2+VoJ6pwBqFok+uS00we+dscE2ipxYAO9kD1CQ\no6/O\r\n=AOlP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiBmWNH+wtkP8HK3S73aNsMripHPzH7oGniqmFGUKCKQIgNV3bLpVhDYHdIcpomx+3Av5RcXrJFaNCs1WW2x+Y4IU="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.19.0-nightly.20200508_1588921613122_0.4168107929955207"},"_hasShrinkwrap":false},"0.19.0-nightly.20200509":{"name":"brs","version":"0.19.0-nightly.20200509","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.19.0-nightly.20200509","dist":{"shasum":"562570e4696185ed9981187d4e21c3454f88c9c2","integrity":"sha512-cErbxW2Yoliq0PuHBjGQ/wX51dJfPSR6Y9lxpMU4QR1SBW/PGAtYoqZEDm7aGU8ufwoeNjcKA0ayAQdF0/oXfA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.19.0-nightly.20200509.tgz","fileCount":160,"unpackedSize":1006164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetlaQCRA9TVsSAnZWagAAP8QP/3qKwXQhHWZdiH0UXRsm\nQvbV7HA0DnzsnwAVSfzjn9IaoRe8RUJItr7z5ASuw9KsA91YqwB2mD1xjlVO\nlfz5tinmcA0jPcw6n5izEuP8uUpc1NlN2d1+S5GN12n45NDtpdSRI4CtGd31\nqbccOFMhq/2rhxlHGFC81x/e1IR6SErTX3a2lHSonzTftj+mFIjcfOQB7Mvc\nlg5GvQOfrbE6EMuQNhRTztu2jyOgu41u1Ac79ByxukSjEULFzLjG5IUUTgeh\nTnrJ/wJqvURNAOdwduKpuNE6QjQ+6cYnycKmgTgP5Rg7jEjN1bXFoMe94jRO\nLuJSBAnYDECQPsOsgSCo+0DYGa3nHjnDEUi+/jIEo9RIrPMw8AhadnpI2Ttu\nGem3Rn7bkhC9kw0v55GDBNfEMDxj93VPZl1H/79m+pmTv22ZcG7WlijqmZKd\n99qIzVbF9fEahxdaCp4f4OldqujicPl2rMaw2qCjGm25d99b7Hgc/9ZpkAfA\nCbViveJHZVuNctnEtez/EopG2yHcrWlhbwwnUR6xK5Lh37tLrpGGP9geDMnq\nieQYlglxKcbuJmjwGQ9L8QvlPdIzfwCuxNcYlshWXS953GRfoBL2Af0zGb8l\n7tymU3RrZ8RlbYySq0N9tlV8lV1uTQRYnBulOsnUXVG/1lt+B+W3XZtnHeCF\n02yz\r\n=evQP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHSECvckc6zSxIpGulEMpF6P6a/9WXUeHVsPpOu2pBeuAiEA8lKjDIbeM0iBGMEF7ouT8OZ4mVdRcH1FbNSFUE+iDXI="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.19.0-nightly.20200509_1589008016134_0.48481202155166137"},"_hasShrinkwrap":false},"0.19.0-nightly.20200510":{"name":"brs","version":"0.19.0-nightly.20200510","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.19.0-nightly.20200510","dist":{"shasum":"1377bc0dc18615947144b01ca7c59234579c302b","integrity":"sha512-X3kOak53bJZ5QJxqyiCZJTkSO/t1KXV1H4QfgUY1ne2WbhYgcfi8jPG7NsQXdSDD/vJOvSPSSulW7929VljCJA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.19.0-nightly.20200510.tgz","fileCount":160,"unpackedSize":1006164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJet6gbCRA9TVsSAnZWagAA6DEP/iTVQJhOczOVVyK/OgXx\nS0zNNjBwcYaIjXNX06na7X2yHHmBuCWXVybl6gJYI1jfZYlitipCRSGP81V6\n/HzY10cRl8vPWRoG+TG1Xpzh1o7K4mGeevT6c3F0Qz+w5ZDIlXlMfM1H11FD\neLG7hadntFyDrQiBdksPKqSe7IU1Wv5FbYoCUYjds5jBfjkb/b5+++d+jiOt\nCs0X5Y6QlE/azlifA7eXgGhJQpghGUHI0odBl0oq6JrXpltuH9t0OKgGxX8J\nEj/7bBdMX48A/o9ZssOUZItAi3pu754x3EXcc40h4/G8KAV6z3XpgsoYb3ta\nS2hUe2kTZqtfHY0bCltqjAy8vZmOmBPYLkLG0wmztMTre9cLZRomP1+CCWmj\nWzY9ftqxNbmwhRMwSIHli4bDVYLo008XigmYRPti3bpTzTeGpWjGrIvHFSff\njlSXd1yNaRsvg4h+GemRwGtmS6ucfNh00QoEo8l1Y0SEj4TlSX77Nxm3ercf\nhP5gcp3MModKWzSY98Uu+Kefyhi1rx0QzJSbYAplKzpPEJZL1aq9DyDqShME\n8Yq8ZvrMJ69YCVvYi9wCuijqyhC1W6pzA88A298waIr75lnJYJ2DjZ797bQZ\n7OqDVlhcSXHV8FgI+QcmOzJ2YGGiBgs034O1FUeDatPqtNZpb7RTUZ6gx9Al\n59AH\r\n=OJ0C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDgcNdWSTJ5FbCi+pASUJEwSdkaH515DC35mwvb7ZzWRAiACcx7tS2oVl9pI0BxYrAJwSY1FvFNoZjw2GD+cCDmiXg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.19.0-nightly.20200510_1589094427052_0.4946571266726665"},"_hasShrinkwrap":false},"0.19.0-nightly.20200511":{"name":"brs","version":"0.19.0-nightly.20200511","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.19.0-nightly.20200511","dist":{"shasum":"2294aa4ab831dc3c98be6cb97e7b0ad9767757b2","integrity":"sha512-lo4Ag/ij+pzuJYWy4iZDb4RAsEwqGByzXgy8NFH/B5duVOwGnd3UImAuwzOKeh3IBj62U65Q+YVY/fmiXQwkAA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.19.0-nightly.20200511.tgz","fileCount":160,"unpackedSize":1006164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuPmYCRA9TVsSAnZWagAALIUP/isQywuGPWkMj13AXRyH\nBb2qbkKJI4/9SPqPxal5VwV5a+4n0QGZSVveL2/XHDxpu2hFg6z4OOmJPxIp\nVc1ts2c7MbTmkZBQz6WrxO5NyLyic3bB0Y2AOr3fVVdL8km+3VfykkUKbKpi\nk5fs7vtcwHNQoxuJstv8dOsGn0WQnneSzPXmVd8r2e0HV4sQZ+tx40Jt1816\nbCL5DBJzOeXSpVGcC+TrU0N7oM4f9/FWHPxbLoeI8gQOLXUGAuYxqB+55H1M\nWFClQO+uFejOMlsHNYl9xJKD5tLnDM8pw9tAYFyQQ2hkosJw2UzBgolmkrg6\nsLvy9Jr3zKzA+dd1P/T/fD2exo2USE1zqt9UxLieb1sr+DPBcPzsFZSt0G4g\nxKIzJ9B11BUUGDYMaeSvIJQoIymAoUL/AcY2InI//xotdiazw/QJLJ9XZ9Ei\no6hPyPxtLoE3bj4H1mjJPMe3JUXSg8x6YzZApBF6SkdXMNGRmxeYRJv1auY3\nT2qJvrbOjSSpllbbZb3bsh2hnFV9QM7/3e09JPfwPzj60U0uNn/Rxs6v7dH5\ns098iz7FCaQbFrZby9WWYCQ79o8U4EFwIL4og2UJoJitPyDg9k5AUmZBif7s\nUWRNARbpeX7KbXTff79Oo2QPMdrxD2BK5bk+aQptOKs0j0xNRwLljcrx76/m\nV3hq\r\n=8uxu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEE6CfE+/rEq2UU1kRa4zwypdJKlVNTonfiX/Pur6pTTAiEApN4RLindI8PUqZEg047R5ba8ntODpURglLRyOb2mq3Y="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.19.0-nightly.20200511_1589180823824_0.32030769292187555"},"_hasShrinkwrap":false},"0.20.0":{"name":"brs","version":"0.20.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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) 2018, Sean Barag\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@0.20.0","dist":{"shasum":"0a35c974bdb6827276a012b9b2af5b5f8a7dcc5d","integrity":"sha512-WdXFw6RB1ZawFdH0AgFfJT3K/5eXhRlAIryYUjcgv6Y6CFH3RQIl6R4UF4yv5vX846LYBDorR7ke1Ndnatfm5A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.20.0.tgz","fileCount":162,"unpackedSize":1013707,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeudueCRA9TVsSAnZWagAAnPwP/0M/ZJf2sqnz+on6Pf/y\nYlasa2qIJhFtGKr/rjsI5WEbDe5DvT0JFFD9lTJXyTgP7lIoUjUK/f/VurKJ\nljCyJUzPJ7/lA7g2gtCd3Fd4vQyDsCi7TwQRbijxN5R7S/9gBGP4buIGFy4t\n3shZJmaxlts9z0GJ25svG2gCvXaOr/wcKGmlZR+x9Ye1VfL4+kggsF3T2bt1\nkj873Inym4+mLfiVPWbcBcyQF7EtvFsd2vR3WU1wB8QmOOpRlV/VmyvH4j55\nDyLKF9myiEADivnkoGgiJPOBg0rJPr2aZoLAg/tLb3/xQBHRiLCis/Sj+EMI\npLvIeCe4di1jJ0Pj+MK866mRAsHVxGIRQhxA3msHrhYGxAYO/fVg6ePkxmo1\nXxebHWVddlMUME/goetTEsw9Wp/Jqftf7vxPKAI4rWokx9EplGkblRsXn3Mv\n1LeKpjPwEQoUKDW4wCiOxZfQ7+tM2Xialq98QfQtgRW1NU48YtmgZOcxps59\n9ptN0th1c87q7YftM3BsxVbo6FUIXnwCNoINvqAgsd+UaN+2RqJ2XV6kcLlR\nv55zNvAa0O8sY44pSQcBMeGG2btGtxL/BrosLBrmJlwyDl6cll+UOQ6ZAlMv\n3qpKHYuJYPjbX0rEc768ulGyf0E6suV7sl+79ksCIUnpY/4zjWApophbwSVo\nyQuY\r\n=xyKc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCuSavhUnq/GAB15GdDbESg9/iQTGpg1T7JD2H0K6XUhgIgCF9zfsBdIyVQAQ9SpNuIxrcnmhZSIZWW0D1nQrk+/VY="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.20.0_1589238685643_0.8296841190286786"},"_hasShrinkwrap":false},"0.19.0-nightly.20200512":{"name":"brs","version":"0.19.0-nightly.20200512","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.19.0-nightly.20200512","dist":{"shasum":"1d29ad7e67fb7bc66604b0cee4454c6602d1c140","integrity":"sha512-2hI+FcUbkAk4xapHeeZ/QIylAV8cuX2OezsvaJ2YVlS8DMuMN9phUDJT5H8upCmVCvv6VKmoYMZA6NNh3zJtyQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.19.0-nightly.20200512.tgz","fileCount":162,"unpackedSize":1013724,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuktMCRA9TVsSAnZWagAA7ncP/1lq5ZjuSMGsFre6lv3P\nBdImNlsHXAjM5OpXeiSdphiMv9N778Q35gWnBIpmncYIyQtzgO5N1rDfVIQk\nHoIru8CXZT1hwgm5lDn63Rak4P5Rvnjw5Gvf+rbANJ2RGkOA17G3ZoGB2PTa\nWnSWiBaxCEcS7ZFrexVWrGubFo401FMXK+RbEHxft3gvFvj481+KyArr4KYD\nimzZ9/9vk5RK64azoPo76V5O/RMHoUdn5a6WVRPL5JC1b86wLAe/5aDE94LR\niFGTD701gVFPXDDPE2+U5ev14l6JvmFwgTdyGcbJgwAtiS/Ab9dLErml/hR+\nCndclpdR5/+kxPhm4Dc3Ne6hJYTS+2aza4O1nIECUBF00bviD4SlWDkYKCi1\nBbBKgegyegBekjtIMf7moqpqZ3YiO6/sdSjLdmZ8jtfqD/l2zZe1eAhdkXSz\n+o7FoRTiEkJTKLpS60Q15hjfRG02kHUTT37j3ZCra1neCvv+ZkemNTX/fJNO\n4jM0jByX4QvFUnGfUeI6OC4KrvHSRENWMbrSvBVXDtLgwRFN/WVe6ghfC10i\nUvY7OTBgUH9douExtDpf4rEZJhRoGVKZliX5DplFvRPpZ5tHmChs5n/QvG/J\nCQPRaXQIMzgOljkB5HXoWwM/3lLnf/mvyfVJ4tSQNsp9cG/n/Q30ndk0cKsB\n5tQI\r\n=tU4P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICmm5EVzEy0pWtOwCxCL+uAuK57fLcVPlcGIsZrVh+woAiAD9ScJtrm2bRo7F8vgueF5OH0vCQ1YUKiAT2xwzSlf1g=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.19.0-nightly.20200512_1589267275835_0.04687709376196669"},"_hasShrinkwrap":false},"0.19.0-nightly.20200513":{"name":"brs","version":"0.19.0-nightly.20200513","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.19.0-nightly.20200513","dist":{"shasum":"17f9c22e0b2df619bcf46314b51218fdf5cf5df9","integrity":"sha512-i5U8nkAvLbHG1Tj9l7Q/QKbmmwbANur+C1rzB7vU8bvWNMHOM/dE8GJopf6yCxnRfcEySPupe2Jmd4wjs0IWXA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.19.0-nightly.20200513.tgz","fileCount":162,"unpackedSize":1014243,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeu5yjCRA9TVsSAnZWagAAeqMP/jhWO426LATdq/vYDVEm\nJqhZpfCCICeOOzCI5e3Bq69x1I+WUOMixZR5mIk9rO1EHYpeZormt1plec2W\nYitPF1eN+Ax4z0H+7T633u6Dzq26gRuTL2kNYGwsD9PdIawSSTVBk0nWjwFx\nT/8CRNBfVJE8Rwyy4XRrQE1Fi/74d8lJhIpfdIqt8VgmYwvAxRfd6nknHXHf\nG6v2wFYeSlNj1/Ct1gsaLIy4aHYvCLPUgZhi2nUts9sDQHtyU6uvn+8sT4Ee\n/b6i4R+SZ/Y14aQ9Y1v1pcDEV0Y/d4dU7Ss42mL42IRkdMAuot+eAyR6IKrY\n/2agaLU3OzfuPhEMmpobv9d+HPRmZ0/a02p45hZaqfuoYBpI26YYt6qt6y1u\nYMZE8L7zMO1F0ZNPkMj5ZRCBm4EufKts/zkOPzsuqWoGDPQIvUjuddTqAUI2\nZvh4IcL+hOkT5Hd4I2tlyXhoBL0nf16p7PC6UNwTMeXby9mmGgt1cV5wu1pU\nd9NGKgQjaR5a4xyDXqqQbE/h6Qq2nVQRgS53ELke95ewmQM8HHetZyyEeGdv\nbiE5o6bbEqpFYZ0NNC9M+WCcecHOfdOxRYTKMpNK7LNGoqA0sp0Xsm0PfnxV\nk+2cksr/1jCi7H3ijph6G9mQMF27jQkMJQKKUDTtpl6z2ugfI8Ih6Ab7bw5h\nWUiZ\r\n=cmgE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDn4wB2Hk6LtX5MilLla1ojC0kUZcv2UwmRZ7eXWHyxywIgRevpdS/RabZmCuDKugjspqLIFeIG2KSAuo3JQFEdxAs="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.19.0-nightly.20200513_1589353635052_0.6209670051453311"},"_hasShrinkwrap":false},"0.19.0-nightly.20200514":{"name":"brs","version":"0.19.0-nightly.20200514","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.19.0-nightly.20200514","dist":{"shasum":"56b5b58adb13159bc1c5f45581298704adc6947b","integrity":"sha512-Zs9P4bo+saGHuZYjgV0EJx2HDMr7sbnXH2kcBgAduUBimrHmw1C0bkM1TfdFGr4syt0uH2UkRc2DucTLPz1GWw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.19.0-nightly.20200514.tgz","fileCount":166,"unpackedSize":1018390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevO4qCRA9TVsSAnZWagAALBQP/it2XN037DEmVZ2xTQtT\nT/jfHmAbc1LN0dJJ45UWkCYDN7pLupa/bbKFu1VgSdOyilobQkeKRMyHFa7y\n2bVJ1OpaueUtyic2ykU8IPGzuPGD891NEkmDCPemg8MyRRf7d0FoQVYBlWQT\n9Dfpv+/Ow2Rh+FDHIKKohMiX/y+9ycos8p7CHVfHGrr4RKqD+8LLgzMNKJNF\nOwXOEXwwyDv363pmct0Flx+cCJA7LNqubBFeoA4jA0YpkxhiQTbmkneJcmtz\nlshFbPrP5rLjUYMX2NSrjcybGo07T0UFJ3fyBHJ/+77XVJXH81xKJ5XE1gbJ\ncwfVmjYWzPXFhZBJcIfkb36pwIVe8XM7ZWBUprb/8XvbgfpcOGmgQJtB7n2Z\nmnG/up7FjBmZvNDQ7xiimtpQ+/t7u6Q8Mz2dZ5jXEMBwKLjFP27WL2TfB13q\nSV6v21CEmfP1CyuVwm6hTPIyLnp/obdsAxyLb0MTrIIiXTsnlaq0T5TJ0j9P\nNDkEtLRhhyZ+tJ4eMjDMqT3LZVu0pKRStBNwS77xW6VGfUieKLwDS+ieBc8J\nHwFAoEVu+jxpAJ8KT7e/nrYc140rIbE0dzlyQX++mmXt7OnykewMV04fkVnJ\n+lbyEgqgvjaqCo+GjyTt7ZR8n2w+w40KF4JYa7yd1TDhFWpF0rN989B+T0xO\nqoOQ\r\n=cTEJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3mesOxmYet/RYAULATSKtR+gkuT62kaDhryavjNMF0AIgfPHBlHuX4G4wNDxXo1Pmn01M6Swz1Y1QN3RiFrPEalI="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.19.0-nightly.20200514_1589440041496_0.6121701855058652"},"_hasShrinkwrap":false},"0.21.0":{"name":"brs","version":"0.21.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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) 2018, Sean Barag\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@0.21.0","dist":{"shasum":"ea512926db7bcc6b4d86a0a371646da72bcd5129","integrity":"sha512-SOiuTpSX87jRx9ONV85fe9AobGw2KsWf5OLnaqSlbS8/YUiHUJTH4m35XfnsXfKK4/hUmZDjvZW6gfDqsCwUWQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0.tgz","fileCount":174,"unpackedSize":1033460,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevrvyCRA9TVsSAnZWagAAm3YP/28STLR3TYaI2yKLjXHu\nqgv4qSR7hcJcIEL87BBW74lVnPfLiRl16g7B3o2tBUvelyB4cr7pm6+Vp6B0\nyo2ZAJXoQQZ0XxA+Oqq+gz0iSXxS8AVbfElKDPTBV8iptdT6Y2/dn86RELC4\n2+XjA/OL8SglcbOADmsl9soh1xz8k8rIbzB/9QcOa2Ea6D+pDp6coXon62XB\nCe3Q6keXojKrmP3HcJ+0Oyq56WAp6k8DWd0gGulwrsInlCfCf1nMvUiXPZ3g\n+THBz2zok0dcuibtblF4WFLVJrYFgFVobwunGHtaiGXt+lRz+T66LwBG3zvA\nT6xZEYuSnOVPMrbGSXscTcXPk5J2MwJ89WBBBeN9beU4Rradn2DsoyLxP38U\nW1wnxpzOdccw0gUb/GW5OddPVETg8ZwOe0lCcWBbiqm4I9bHntZy4gDo5y48\n5pxzD6lzzRO8F8ticwwSRcnN4/0jF+qkLqwTBAgjmTWDR6hw13xx0p8OxENr\niC04yWlEfzUk/tyP5XvR9ZpmRsawNH7f34yPhda1a34wsYrEJMd6QYI06tRZ\nR6No/8Z8QvWkFwJdS3KQUD8VfrmEAE88oxLOXJK+WWHt+NFkU6QiP7kUbHoQ\nVRQ4zvw78dJMXrMZ68fcFyhOZkWkiar/BjK7HMSCrwzg9rBK1C4izLQiFuJ5\n8/MT\r\n=HhBO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjGc5OsaWXwyZaxp41mqPUohLIxFm7N3W/V6cBmEV1RwIgNbF8owNGJ5WJViZz6U8H59ms5AWY68JhPQYmpESTb+I="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0_1589558257726_0.062167311403859005"},"_hasShrinkwrap":false},"0.21.0-nightly.20200516":{"name":"brs","version":"0.21.0-nightly.20200516","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200516","dist":{"shasum":"0816bf21d639014cfb0affc5054770df0f36a54c","integrity":"sha512-DCDpwa6houGNTb0AO2TaUpi9N07YeB6RhPAJTUGfggXxw8cBhTTv49o/jmEvpM3yigCgtymTvKxVTbL62E3w+g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200516.tgz","fileCount":174,"unpackedSize":1033532,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJev5FhCRA9TVsSAnZWagAAnLcP/2oN5GBEtBkiTse5akSP\nLM3+U2E6WK+j2E7izvf4a6iGB76T8rvL5UzR4LyI3yW4d2NQqyEU42D7N7rx\nRgf5dKgWXqZIXwuLDg3V8AEOI5owOvFJ+UoSamqXRdF4nHfJeDI8m8T5DfR2\nsYXx+KiBPwTo4OMDSx1EMIHyrz+g5vcUUQCLl3av9sGHSGh/mr+enwdyRB1F\nnCSZKWjj6lPaJ3tYTbc2EvP9Rv6c/m3RXHAm/SWWexmeYFRTV5tj3wMeKmdB\niAfGp3zXypwfdzNJgTMat2GR8y6jDe1YzH6hkCxdyvPdwG9YTmuYvaYntqT5\nhD4HD/isZdLLBEuM9lDDcMHplTMXcvpT9NA4L2xsNswQxh5v3kMW2ritffXU\nDD0d0hLcc2FpFE5u2nt4r05ZdvtMYICVvfdvFRIhvZl5cxsjeRB9bYmGp+GO\ndWLz9T7PGuzAM2dnz45eU14TQAJqLriLaT8ddsPrcBuI+7N548AS6DMZnlvM\nQH/CbZWG5jp1tYMvZHD6WGHEsB3Gdj+1TCqJO9F+nFVcBx5f66rhrGHtPiGz\nvXb8QFluTNSvT28uvezIfw48PWfsmoo1ukG4pR67noGbB6LRImGTbYK1pVOO\nJyKtCqIyLccbhWGvyGPUGfrRZkEurZHgMKUZCdi7dMebYLFI5wSs/7MfxlF8\nVIx9\r\n=leR0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCN2cL5Vf+60W2ydSmFs/m2TaiNgVgv4dVcwPkp7kWXFgIhAKYhdyL5zl2aElmtT9puK7LOAvhBlCWWumpby82oQV/U"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200516_1589612897355_0.7028694363850672"},"_hasShrinkwrap":false},"0.21.0-nightly.20200517":{"name":"brs","version":"0.21.0-nightly.20200517","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200517","dist":{"shasum":"b229cfc52b8fda1d55a32168e5c5e1ddb3127da1","integrity":"sha512-mRzsQ1Y//RO9OfLGLyQmRU40lPo9W7gv/XRYmhExw4TOyXTW3g0ZHlfBDH8PRLHaYnBFKvn5mKwGks+2Q/4JEw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200517.tgz","fileCount":174,"unpackedSize":1033532,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewOKrCRA9TVsSAnZWagAA438QAIr9oUtjqEC4XnKqSuHj\nwESMWXog3CHMm7DLJ4eiarxf6fZr2rbxAM1PFU2Rocn5eKZCi3DSo4rM4IGI\n2WdmB7dlqvc9qaOAqmI9W7WBhmTx7sZBh9T+l+xzgiQAkX5Nz+m1ZcY08EIR\nGVGdMsMzxKwBrEXRL7fq/zKSG5Lw+j4GnI9GbB5bXIP8ayL+VYkE5n/QMXhu\nZsv96Q9QPpbcnv65787hzmO3NLmPW2PIXDCKs4n/69SgVgGw1BHUhpwY+kYZ\nx09Io2bxR+OMejU0cxw17vCJ6IlvTDjmuATKCqNI3+fSTpMbtI9znBncK5u1\nupmBmLAvDe6D5FrS8iATOlHkGaPr0uec5ZWzTslXqC3frj46+UBRvBkAp2e5\n+gTa0n6Jq/kudmYeQwNiNQylRx/AXTILKLGIYCJWlrBz3sQl60iyw7XC8cyL\nIKd0O69gTpyKryrO0KVYvYL7WkqBifuRYlVOK5D8ZjAhQZOm/k9/3Ky2Hugf\nAJEK3G4fsabiXtRf8rd1kH/eTK5p8ff/A4nB90avLudEcx/Yt1KzJ5iGEb+1\nYN5f96ZMaFSmdiJCErcINvywDTEIFz2QGaoBQm2Tja9/ClgC6r3dFFJcXJsW\nYpi53mCm7dA+sg/nc2iElYrbP2V5lTtFlCrhifmnP6DCvHcpGDAl6Sb0KxD1\nWga5\r\n=K4/h\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVNXAKx5S+BGMhaBKDqa8NRnKCRoEtQsqygpFOUpBt7AIgEolrSUMmUpcZ5eBakzAFoz7YdjjYoyoSZNNZ4s+0ev0="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200517_1589699243140_0.6666989655371771"},"_hasShrinkwrap":false},"0.21.0-nightly.20200518":{"name":"brs","version":"0.21.0-nightly.20200518","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200518","dist":{"shasum":"21ca260f991541cbde0ea15bb8cd26b7ebd5d3fc","integrity":"sha512-y1iap4S2h3oX0VVLzzi529kLBiEp3b8Ww+R3aSuI3kVxamTgvCUMNehi3UBGi0bmFUB8xIsWgTtdDoPd51m23g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200518.tgz","fileCount":174,"unpackedSize":1033532,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewjQ4CRA9TVsSAnZWagAAsTwP/1UfXGOcVV6rcrUDwBHx\nSkL+AV8cr0v13ZFDkI699DO9QVjhXWT4DSInRD0mf3ohb2OMfKCOwnKmte78\nNoePZnrQzmj9UYmN5c2lsVPQExM+kxnH4inMkjESgj53ObRjQBYLVRiSAydb\n9N569wck28ATsPScIoWr41+BooD57m+iSqJlH9EZc3xHkRxYn1VJvylZnSsI\nrkV7cMlgw+dx/5hkpZ7ssSkFppLGDulUiuz14Q0bRyOyVuXvg29xxrlC+mlp\n2REi0lN+4sQrEIM10oOXsMOW/yp1pIQYS7z5k6uCNJ5BQLEQr9nCiyHNZsGY\nGh+2qT5J7guR+w/Buqv/stqktqDT+Gx6x18es+0XstkX9AQwI/J359/DWu+I\ngkBZWz6+ax7PawGly7lMJBu3s50BxvWSUVo/diLd0kIf6mSEU1nbVEh32GrG\nLeATLII6txOwzerLWYTBB+/Mg1htVnnVapDaD/8vVKIc/AJd5z2f+Afc7ft8\noPfr4aLuix5JSNx++1JJxJKj8rLffcbOUU00Y2Tto/PU7VIZz/A2gL33uNkj\nMA1Tlza988NQlP4PVEwlI6M4+Ec33Ty4JUJ9E25c5Kng/bnukE3tttBMlq/F\nAjZ/Kj55FmVfjquyASoscOB3KVf+ki8ZYUrZ9WnHMDzeUCF3ug1/G/Moqkou\nPoAG\r\n=/9xu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4zFBulzODW4bCM4kZBw2f535Urey2hL0rj5ml1C/OJAIgUbLykdPeFzKvADwDPp7lSDNlVaE/PxyBxYsfqc4RxnA="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200518_1589785655866_0.004217079170270033"},"_hasShrinkwrap":false},"0.21.0-nightly.20200519":{"name":"brs","version":"0.21.0-nightly.20200519","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200519","dist":{"shasum":"a2c1b9bf03b966a29e646a5f7ef08920f6ee7f38","integrity":"sha512-QaF7c8Qko4FGVj2Fl97Mb2/1msCqv1fzKekugX4cDDHsqkL50AYLZ8qAfgjpyNUkXIGpb4oeGwK9TDkjljxsVw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200519.tgz","fileCount":174,"unpackedSize":1033532,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJew4WUCRA9TVsSAnZWagAA394P/RcIrqQzOoHV96Waibrd\nybYGSSwHIUe7dN4phth9fj5xEgvYI1uDEOKTcNCofY21rJijJXmSy7YG5dPp\nvRWRHaYkxOyOdWhn4kFffI6etavWEASsunDdNVR8PDIrg3WmnyKxRtyi9Se6\nT6Jfcmuj5kX9dNMdDxCqzsnY8dncEDLzZlHHU20vxEONeVrIXAwNtF77mU28\nRTP9h/gQKBHtzwdpILifihK5Lq8t2UDTQNhbsfu6FFw6fnXth9yeC95FIsXY\nNfCpSSepKe6FpiAuLiZkr45gBU2a9/H/lxaWoBCXLzqdWNumXTPC7CY/iC0z\nPnEJFwl2GjsVLfgqAp9CKe365JsJ/zWD54j/FoaBV2OzMcvimf2BK9s+rmip\n6ciQTqtLk4rBgzou3wY8CIYjHXh4PXFozFpgK3hm3khWB/ULCKSpKrM3xaug\n0XkmSVw2Ebdk/f+DHIKr6eIqKsUI+S/ybA3GMW2WA48WVNghMCnQAd0SQBxa\n8rhINsrIMEOXSBQfWyQFOCnRWwcpC3WxMO/RGzUX1mOGSs8yIC7ezdGbOIjl\nQg2nwe4mXQ5RbNis9dar6Om78QmvH3puzyBNnmm2VfIompynJTc1Q/9rfGaJ\nCM95WzOgYcuk/VF4pkPy9N/dATiYL4vyzngvhmBUy8NpFMTNKUl13e6kReiL\n0zlv\r\n=MshH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3JWdYeOZPPHOs8JqRhIV9lNf5/2pe+KS8ezahCVBUgQIhAPglRYvuzFiBWfvq5GLHAVbATnzAWM9YPleUtYDc8tZ2"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200519_1589872019767_0.35155164374596626"},"_hasShrinkwrap":false},"0.21.0-nightly.20200520":{"name":"brs","version":"0.21.0-nightly.20200520","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200520","dist":{"shasum":"849f683641b67428d055d8e51878c24fb66975d9","integrity":"sha512-R53BxwNiEou47LvRb6mzC3tOVZUMyo/Ixo/vFiQo3rPvd+BECIvfH+jFzzM4C/0LmJkWB4WADxmrcUifElXNlw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200520.tgz","fileCount":174,"unpackedSize":1033532,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexNcrCRA9TVsSAnZWagAAteQP/1Qa0tIH65zOPHVj7OZE\n77xVrerBdXJtJB5eDqAVCZeTUT6Pcd2UFi9C5sdbNbttYuFAMzVuC0jANVIW\ny7kfpCIMeK8F583Vi9lvVELiHjI3NMU/qv9Y59cjDk9FAaxlZeO/LHsLn5E5\nsdQCWENrWzTkBj4Kv3DaG5ugy9hVGC/gtTGqu8RDWy6vptbypqr8FUCzEWld\npiF2+JxIcXLEl6B632vVFp9cNwyvAH5nbaZ83zd6evhxH036KUQMYVn25N/a\nHtG3vzOhLWmrtHFcwn6oyAiyVucGTpGWrz+ycIHsnhG3fcGPCIkdpw1icHJW\nanF4SUMr3qwbcF91HR4xQtNCJeZkI3hdkI4OgKXm03MgJbZIJMsIfF66jGHR\nb8qryXQJ2l/Ae4taSku+DOGrqgCitjWKuajmStQ2zYIdNHPsei3JRb22nEY9\nK7A1geRF0GxoIvxaL1/mt2gY7ZXTxuneOsLUfICjmiSLCYdMLlW/M/5gCOU4\nY8qEFqRfADWiDkyPM5svi6AeXqUESJmRvQTjVs4b02/LwxgG9rMFdVZ2Rupm\nzi+nnKD1Zk8aLBKwtwGod3+I89k4LKipvDygTwvwBuNFH+0htYiqyT57Bkr+\nbavaYKXKHll/4+naJQKHSe55vgDnyRKl/E6P1wZAaclebyQiZUKZn4wVT4W/\n9ZXg\r\n=hWJW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVmMGZOqSDO7GC651gZDGmIJIN95F5U1Wo5GfE0VXP8AIhAKZBAdMwsiFRd8zgqsfuDVET1bSTC6H710z2Cw0A3uWy"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200520_1589958443091_0.6915533557628706"},"_hasShrinkwrap":false},"0.21.0-nightly.20200521":{"name":"brs","version":"0.21.0-nightly.20200521","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200521","dist":{"shasum":"4201b5f3058003b4dce8cf8423447474f9d3c646","integrity":"sha512-qudtmC8Kel2iO+ZjBiMrdf1e+5aB79z/KFvTBTMvVMu5cCVmvhlMalxEpPD04GDlBfrT/LTaQtjivpM7UsXiRw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200521.tgz","fileCount":176,"unpackedSize":1042492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexiiTCRA9TVsSAnZWagAAv1cP/AgY61HYpE85HxSAEYUy\nlKRbt9u0nRsnrnHuHXu5Y6nfZbVa0irYfXE/08/dQKfved+FGu0JutXQQccI\n0PF/1uDInTb14no/duYL05tXEONk8ez2KYTkLtccPRSdWl8NaDSDYJv8xrYa\nKDSxYzxUH7GokITWFC7F58e6tVQ5y28mWskolV3qBEon+hgPhQ12EE9v9WZM\nUuGJiRUmgiT0f00WqlndBTl5ldT8OKtuHX9iFJdr1GUB1MD+7t8iCriyrmgN\nc+8vm+CHi8jXTe3xAqxG/ijP6H85z3Gd5W3PgniZFGhNNP8uLni3dI5sVrbI\nX64R3b0by+a9cK6FryGn4MYHfXhRwbM13PUCyG5VSCLSrUZ6T64hTstUDRo3\n+bnTy5kcva/9OWDkVPDZHMAaAb+xJXXmZj8mco2BOqQH0WwFcm6dqkQ9pW5l\n2TV8XPLrqpbo+i8lOyQr60wd5tGZOD4UKWCz8UuxOoQLo2XwGwS6OqML4Hue\n/rzdIb3Xt10PBmboHiU/occQU+54AAvxg0T6UvR2S/CyyN+or40PImpjWSsy\nZ0Za+IfsYYSfq7ywNPB2SC/XFgbvExUn1u36aPdcsAza4ZvvsC3P9PBse2D9\nAAmrx/nL/5xhzPa4zoKv3KB4ZbjbjJ9MkA4piJI9+vkWJ7cgwZLL3ZgPFWCt\nB5sR\r\n=+yK0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClYyOlBbnFIlvwMN/PYTpTH4fEPBpT0Ca//k9FTVRUiQIhANNULWGGYhShtUDRW59kml5BDP7VPX9cuuYQ9aibUna8"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200521_1590044818491_0.8944546158367956"},"_hasShrinkwrap":false},"0.21.0-nightly.20200522":{"name":"brs","version":"0.21.0-nightly.20200522","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200522","dist":{"shasum":"3c12c2e18c89fde944094c6e8d048dfa2a5f8c0f","integrity":"sha512-+nkk56Ohzl6rSnfcABHp/3c+hsVXuWMOHXJwL/0QE0RhCMrs8ju+/ILu7+jlc6w6rWHpbny5JLmpsg7Jeqn09g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200522.tgz","fileCount":176,"unpackedSize":1042492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJex3oyCRA9TVsSAnZWagAANRQP/1pCoIi2oQDrB/9QCVpg\nX3z/b3z7PHsR6wSZae29RQaRchfNQJ2XEMf23dXVP8sibTcatliECp9QiRvF\nkBbq2yIirIxS6JrkeDKKSVOUBnPsK38zYpCkthrzJRGp/cx7ZiQsoPe6TRlP\nGDA5UubuMgIqpbTrzXm59258yTJUZhQSM9P2yFln6KiVlbP/rmEZASMmAAf4\ntCoIakBgYMOXD2O1k9yh38G80Yv7thC1eKGmw1W/uOUmaUlDz7AV+42cqc38\nCbXyaSTf7Q2xRmcv4+rZYO6p5CMBrtMzN0hGULTg0rblgRw0gHIyC29cCCbB\nFhZYUHFjcA6WcaLXfgl9C5BScd1sqL0RbUNbzrjJ6B09FSoLTD/hWmPn8Kve\nA0zKhqdIqzv1C47WZEnBPsU5RBdNQkTAO4dvGmn7yNezd7NZxfWkKO5oEmR4\nzNwM1SCqUfVIjE6uWVG0bPn4TRdnGI5b1iwEsg724OAF5qwv3k/EmNlMJ2k2\n/l6b/df5jP+aAr1VRVAtTY/GNLqLAX4fhNtsde/hkiiJRZAbPgAwiQpa+h1i\nq9docwez/gTZigelycEAr8fqxc8G8YejCkyhsp0vMdaZ0MjdUb3GgvCS6CiG\nnqLp79U+OBE6xYcKfO6U7tYcdgexxkmL+gs1BhPLkDG34V7NVk/qpOk+InIr\nKXTu\r\n=TjvU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEun1uF0sBtmXx/2858CzodfJWekkC7eSYLWjjEp1SY1AiEA/Sm7mdbeBH8iKFJWEgzqrcENHLEhCpGAWOUOZ1xrNlc="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200522_1590131249690_0.531134369165732"},"_hasShrinkwrap":false},"0.21.0-nightly.20200523":{"name":"brs","version":"0.21.0-nightly.20200523","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200523","dist":{"shasum":"4d82378038af265254348a762280886958daff0a","integrity":"sha512-l0+MxkNEAgpDBkg/NxlSRCy71g1HrcPhMuTQKHr0B5mZvEAKcf011oxbhlm/bEMxFkHI890S25uY+8H1/AzWzg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200523.tgz","fileCount":176,"unpackedSize":1042492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeyMwGCRA9TVsSAnZWagAAbEoP/ilfNhFGyHg8NOA2vhPV\nH7212uiAODbm7/k/+ub9Jv5RUaogdqDJw7gqsgYy4n8mtanFjpYztP07WFbm\nnAlaMkY8/Uc/e3QcipeX/5bPw1FIbAb5fIa1usz6qhfOB4E7y46JoY3FLJGK\nAF66jojJXjtdMvaKvU1kEINfMzeyyhTs+q9535R7UfpI/TAifb9e2FxSTUnp\nBlXU6hrOuT/zycOz+IMgJQJrREeooyphMv5mjtznknfFE/Ocknp6Z1zzwK6P\nuBKMtQHZAYHzIdycgP9KNySf3D/M3n1TYeLQ5cphE7oMM6R9KVIHS16mhTQK\nNQZXQULuPHmGcDztHOY9B8bNfP0geifTT8NK6JuUVGGnm42Tk95WqgC+v4S/\nVDC7kdeUZjAZWypnecDSHeRw+/URvsB3nSza4xR/N2RST5uRkNJc9IP1dH25\nuV3QI1/VU/ZaYP0SEu60KOKePHD3b+gYe+PwJ2P6QcCNh9ppT4EC8Z9m6/st\nIaBsvl09XpbxRe8gJS8yI9SQvIVmJ//svD+ZiN11R/ypILE383rfE7/NBhAA\noz2iEd+GtmHH8CJtrcnSHB20SdRyd9wwyg5h1EAy9JfW7cdwAjgKvPGunmuN\nOhT/e0M5WOGHzNWCjc1ZAJw14LcyanLzLLrrxBYBZ3D65CCydDxmj3/6rG+0\n18KQ\r\n=/pS2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDgASq0sVMbqHtqjUlYtAO4REB/qH2wN8R9v6Sw+FymzAiAbyprkUVO1R5SfMcNRNV+hyrKfazR4CUJn3Ht20xb8eA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200523_1590217734264_0.43915842903244307"},"_hasShrinkwrap":false},"0.21.0-nightly.20200524":{"name":"brs","version":"0.21.0-nightly.20200524","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200524","dist":{"shasum":"01c09f8aeff449a3995221a8794ec1637cc5ced3","integrity":"sha512-hEAxIF/rlGZrsipXGxkK+3xAdb5yGEkxh1oCdfagzRpI3xR7Y+Abga2olWkpsr8XIiR5odXYaaSxWxWYrfmV+w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200524.tgz","fileCount":176,"unpackedSize":1042492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeyh0zCRA9TVsSAnZWagAAK1kP/2mTa5B8opyyIlYFtYDK\nqk/8kO0LrjTcmd86pmX4E0g2SEhnh6cxpn64hPTc/U1tcbULBT4aF7w4R5MM\nze4wKzr4EO1ZxxkspJBO1W3kU2uWD7qECHj30pMz5+MbBRsNY3feY2j6L012\n3+nQjPC3UpyKkPbBAszj/b1wd+1T/jQSHBckVQWt2aRrO1AEQ/JUX/I4t4SB\nwghxXNBhgtjaXwEYwA80yIaBJu2U5QYCoNY5KqMXrntmwT5S2Yx6vGZbBSUQ\nhEldG4oPgylKkhx7FDHmGWnIqv2U8ccomWhKdYhZ6/Xc3za3ymdYdl+DlKUY\nowL/OmIxmUbhHlTe006nTv2aNGz3rtW5Bx7qwkXEWviuK5YKwlPPaigbj7LC\nQrn3kR2G88cHAl4GLGXi6PDbAwdZV/Yk1MAy26n3k7ZPRokBuL5q/cLyWz8M\nVUKbYRsSRerB4W4FLtc/xm2YJF75s+1LA90H9OnupO2D09uN9KsX9wCu1oKD\nwUwAa2GDnRENscXOKnEuK0cVCjnBHBy2RzoinXEJIkyJiKsr26tGA0pqAH+c\nbMVFGGp7r/8mY9JGqAI5DZN6Z5Y2xm1tVW9NfPztOvxzsBcSX58kiVCWNofE\n/Dfl6yZBpg0MVucrYvAwoiKwhVpvR2qkZSwq/CHYH++Uier0B1WsiFoZeAgz\nTW1P\r\n=c0K9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZINNv6Np6yqfCOKuzj/LRwvHhAoyfMOfz/vxKXpdL+AIhAMt45AwwZlLbWZwygcLgUKuVsbvOaRuGnH11Lu1WoRpR"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200524_1590304051252_0.19150792391263827"},"_hasShrinkwrap":false},"0.21.0-nightly.20200525":{"name":"brs","version":"0.21.0-nightly.20200525","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200525","dist":{"shasum":"feee8192e5c948c711755a54539bbda9a863f113","integrity":"sha512-R+gIC8cHynkh1iFvoSbGReZ6bktFh6AXfDYLEDDxue/f3VawSaEvlADxB+W2cJ0IXAprc989OzAHJk1eOfg9Ww==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200525.tgz","fileCount":176,"unpackedSize":1042492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJey27JCRA9TVsSAnZWagAAMTYP/RyvfdI2VyjM9gdPNfld\nYireNJNAGmBDJyVnVIomh/P6zqQAiXKVHSuNrlffHnokjH/GQ0jyn4iw7kwb\n67t8cQsipwM7UpGavMt3hriFWPJSI5mrBtX5gyJvAqoEumUPKpoFQHA1ZVVd\neRN6aCJ9CTxz0iOv51OZegpz413y9gBXTbg3WAszGFEP/+Am8VrclB0Pedle\n9G8IUVUDEeCMobriE8iVahQnIklR7Lr+yeEshU7rhoy7xAHNOjZpdoxMun4U\n0v3EpinScKmqKNlFG5aWHsvYkKH1ToRA9k/MWP2AYdpId+A+7KH70yh4ClDU\nfDalkII5vVWFCs2h/8Ri6NLj/mYpjkyAqFDgTarcQ4YW2rzIoHfp92GbbwOn\ncBmvEYbqTzRZGJERjd+ik/tZz0eXm5CAl7MjZJHadz+oCNvfWRMzmuBmBdio\nHw/IUcIDtjbkMy4K6ic51jfcAYe1lupfEKgAZ1fRRo+iUeIJRvMyJSPjArkL\n8f6i3vlDBL/Ed8TLL6x7GwPUopwG0TkfDJarwZNfW8HUPftPMVU2q3FoLwFR\nOBXDhflGxeUlUugbK5Fdcj9Z8yJpePexxrUnXNNZNi8x2xAUYwjq56JUWp3J\ncWWrVk7yQR1w61F3mdI47/XIw0PoxT9A/l5K7Jg2DoQY9ESNHbA2gfOEKH7/\nSIWs\r\n=7KDj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHlz23+Ca/h6NOS5zSj3sFUoEeo8Oa3PW6oaq5iqDm9wIgaPkWLH8rHH26RLg7lwqcfQay6waxBeIm46DIvBFurSI="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200525_1590390472962_0.10978153656002765"},"_hasShrinkwrap":false},"0.21.0-nightly.20200526":{"name":"brs","version":"0.21.0-nightly.20200526","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200526","dist":{"shasum":"4c7e4e21b72d84685e01c8ebba13da516d61dc8d","integrity":"sha512-WqEC9j6d9FlXVGE/GOjERdXNo5A0dIG2U98wwHhAZupF26j4TkEM8rpsN/u9hbI/CbwzHhSMrSoWKU7Jo6rrvQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200526.tgz","fileCount":176,"unpackedSize":1042492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezMAiCRA9TVsSAnZWagAARn0QAKC2ZBlUjFQhB0XwdZZC\nE1CPSt4qT63FJ4LVF34/i6y5QmNxrGJtiIb6n4FSTzz7qRLEK2H3T74dGbKU\nHCsbkHFg1i6GFSfe+AXReCfyJUMih5CjSPkTYR8+zrJ7PkMbHCmVmiN8HMX/\nzJz+8jOGXCIrggb1OLLlHxTCynwaVuFgkaS1it6dwHlAFxxHqoE07EPB47MF\nnVh7hlZFNqDoytYSlvVfyQaeABHcPv+0fKjYaYTgVMkXQ2XATz0+HJUk2JAL\n9UTr+BQhpCWGtSzS2eMhIX0n4sesSn4gkxwyDO9DZrGXJ7FeHJt7WuODusi2\nypL3xdin1JFs5Zdh+FBFCb2OZHBIRoaU77jdJrMTLvvBYNyZS/6GCT1RPUHp\nfU8jfkr5M6lTNWKZKvWRDY4BYN92cZ2+18SA37mrCJPBIuCtsl5xN91abeTD\ni4JpxkN7KFFkFgJ++VP3ZQnmdz66fdMl0m9DYHTh+0NoA1FQap8ZVtjuuR/i\nXv4lBWL7heV997gU0vluA8SCU/59fee4lsfViBQlMzELGaNrXxNnraO6+YG3\nsA3RLaU7hulKhLsc2wmjhQehX93nR8WIgbhKkOJODJE/tPTAPKyDzk3K2IEG\nQBlhWAHhlja/YZX7FZZlIwlQlVK1vT6NFncBX8GtUutus3ZNSr5pjmCDUfJN\nkZL0\r\n=+347\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHw8xpwc4Uny/Ef99SXvywft+GAIEgV0zuVoZ3SWA8SuAiAtizdLy1kMYsYkg3DxgJ9RtApcoR+9hh9WoizsaQpVfw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200526_1590476833393_0.42481520958594987"},"_hasShrinkwrap":false},"0.21.0-nightly.20200527":{"name":"brs","version":"0.21.0-nightly.20200527","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200527","dist":{"shasum":"1fc4c4a0d8766354e4bd5833b1eac1055e67ef04","integrity":"sha512-7rgr4RxvKIsqqYl1GWgSyRMRpEhtXzVT0dbLt2ZLn17VEI7fGfo8CohW6mcVETJFHwA+DEb0aBCbvruEM/rU/g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200527.tgz","fileCount":176,"unpackedSize":1042492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezhGKCRA9TVsSAnZWagAADPUP/04YwfZN4BIbLKT2UpT8\nle63Ux5hfTeHsew3thK3+hnRtwsH+1/oshuCbZtaHVJ5DF8Lail8BN/FTp6H\nFJN7pRVqBiougt27I2kO6LxlXr4qxYLcqqt4t5/PdwqQoIAVJ/W10K1tRDPi\nnbHzvOC/wolTVlycQtQHaYYYw139LCokDAXeCLR9132rf4KqJ1lxEts7Redf\nk/a6zPMbQsGIHLR66aHe74mQmEH8ATWk4WD0UckJ+2BoTIJmR/bkPb9Wl0J2\nbj5hSgEmXDeVGE8gNs2IcKX+CkTPcIR4kKOYJzh00ZOHSYmFJdXRZqCZz0lh\nWgnOA5FpubMbzb6052wQCGziENpa3hpGDED12BzX68uE7lFY8+vEOeoPtpV3\nzb0zQvWxysRYVIMKtfy6mzxTBm76by/eScmVFz/1hDCoILWLsGHz5eYbiMF1\nem6uEJK2QS9DQsHBMc9LvmV3O90ODXLgPPImXXIUfkCJn0xjXQN798fvcEB0\nbiBTQ5n+CCZeCmUS4XOjyPplrgnlpW2ieud9GRmBcaqvrNbmpAoDn29+QDck\nimX2AZeoLGACx+CLs+Y4zg6ylfy27yEcK/CjtF635BefUb5FNJB65R2JjaHy\nhpc7f/dfoTi8GKGsG8PYMehEPdTj3aaSOluzSEpvHN/BJMRwKAISR3E4aj8j\n3Xoz\r\n=eDW0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEVlkutWP4r5RP0DqBrECgX3p0d2/JprBktsvpiq8mgkAiAmQ4iVpGnWwzX6InqKWrqoNE8QG75nggIUIqiWsn1rMA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200527_1590563209841_0.805822400597124"},"_hasShrinkwrap":false},"0.21.0-nightly.20200528":{"name":"brs","version":"0.21.0-nightly.20200528","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200528","dist":{"shasum":"8b2a53e223ee562809c2abe35c78dba70ff41dd5","integrity":"sha512-d1LlF3dYPyqZYNvS/lMImqBuhrKkvmwZORkPJXiYfiV1665WsZ1NDvLP+1FH1RF2LYx43tqaWYzy0j8WEVnpJg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200528.tgz","fileCount":176,"unpackedSize":1042492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJez2MaCRA9TVsSAnZWagAAl2kP/jgJVDDggoHS6RAmpABf\nXXlfBbUaPRX39XP2QAyH1YXpcDKm6Ru3LGoZqsTbSMtpWID0u3m7K/vviB8e\n5CNPX5RB5PuN35O5qucfNqno//ivllFOKYDpJuf/WIHngYxQftP34lwPgk6A\no81EudB9IxEPaPt/+/fikkC3mMNhZpYgkypJLRUMzb0T1yKUZv9dMTfoIOPf\nyHfiJ+A0eb6W/Jmn4vkXPgL9y2q9PNjUQG2qet/gxxCV4oa4qMGWdjpnVsZL\nj6h5fZ0hVXFfGgXGSieYvyZES2OPq3FtKc1wKDfneZzqQ202H9wJBAJ6dNGw\nEmzL5N0JXXwg4opYT6xav1wnlgQkJ7j5Jpjf2uKQ1A/Y4epjQp6gpkcR6f9A\nv2sQ1Yqwyn4vw9KFqAQC0tzicNE5hM8wSVkIUVmNqR5Tm/2PxwIz4vaWx0FD\nVYKyjt2wrd0/lrgz5ABW6qnXs6Gj2Edj9rANubYofPgUlNln9JB4VJGuV+36\nX+THhkubdVKHCC37pOz4swYXJkv+DG733NmjdoolBwka/eqYZuYUrWXWdtSD\n8qoA2c7iDPpKCKr3GqQ3umYoPQbvtJhsMTy+4HEFysywQASnd3BbPm9zAaer\n1rVjcq9eH4EFTTdEyVjnM29hfbAA3CZingWeXg+xyWSnAaG5w0rO/w+QQCMh\nR9TJ\r\n=6W8X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGV3kvn8X5en8mr8Awy7HjQQ+p9rioikQCv3n/9cyg/gIhAN1uh7jFoGjak8nc7qazs6ZFHQyX3CLF+QKaS2+Ohw6v"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200528_1590649625630_0.5858266471715781"},"_hasShrinkwrap":false},"0.21.0-nightly.20200529":{"name":"brs","version":"0.21.0-nightly.20200529","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200529","dist":{"shasum":"46bc3792e5a5c096342845990bf2b39c1635779e","integrity":"sha512-orBPUEJPFZJ1rXDRd+S/ioTU87oqLDvd8UTirs3PQd1RT5IV3QD+Wsyf7veH+tVmQqOBeGOGRQYoGkqMNaoiYg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200529.tgz","fileCount":176,"unpackedSize":1042633,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0LS5CRA9TVsSAnZWagAAfsUP/RiAP20feAHxdyij5uG4\nMXxyoSit5wRAKLhd66XJEEkCT1XrkX9z9Guo9vZdxOwHKsAMQJjGl+l8TaBn\nk5tDQoNz/Xa5W5N1fJDW7F13aUOFyy59ax0iXrOa74riPYlqXYAItaYco9o8\nxj0R3kqMSzpKmMWcFu9eMMC9aVjFNW29vIPhpcIv7IlQd+UdOACm8sygDIGN\nPekHvDZtrYSQaZLycbuyRKQXZNWGopVmGUqH8VGViV9V8gJWHJOMQHliNEC3\nRuxOlU0+HytLl5jGJT4IxW7yPR4Wz0BorgVTjqE2uvoaI5/hBDOSHFJV/O2q\n7YOkhJ3jtqdn3crcMowADWkbPsKSsIpKFVaMOxAFRVPsRBSz9aQEXo5G1M1R\nafDBAHW/nu9pwygEK7o5jfpK4b9MyZKujAFYBokUB+OlLh2Rb1KDDkfQHoxw\ndm7B5OAnJKEIdJSogfElpjy93A4zNWsGrRLwMLhpC9iq2rQ0V7ye0PbmUj1l\nIDHkl6QqVYuzTyuMg7QyxKblOsYFZMRtaD5h4LqEJ4HsrRWW1mO+43rznoqZ\nwtXDcUWPJvpkr7VnF0esN87IAQ4YHRKsGexaitrlwyHZqvuRlB0vl4GNT6W4\nm64mJYaLw846dudzGwG7d59HkTNgUwN87hSoQdZp4UwDx2CEAUb8NpvnKwaq\nmtCF\r\n=ZKAq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHe9IXD22WEODx6qtjlOnvg6+NEYb78d9uGtaRKJOqIfAiB/rXmQemUTyXBbJnG2+uEL/wRf/NmdtRtbQQT9TlKz9A=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200529_1590736056948_0.5084785198531738"},"_hasShrinkwrap":false},"0.21.0-nightly.20200530":{"name":"brs","version":"0.21.0-nightly.20200530","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200530","dist":{"shasum":"e857d9c7c20d635f117e5319192a4e5db224a479","integrity":"sha512-TFNQvCwHXLsa8ZtrV9IK0Bc5nY3x3GWOiqcFL47bKlCpmysTQXV3Q//2rdvUXOMmX/7U0H5os4FufzvxeRnF5g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200530.tgz","fileCount":176,"unpackedSize":1042633,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0gZFCRA9TVsSAnZWagAA8RUP/1Ti4qbNyQD+NxMYYFXr\nbEgLAtZk3aNbnlVGiurY4Gt5BNsoUINzxs1z8sj/p4uTcwX/q7/FVz2rnYTU\n0CGarjMAZu8V33nzvenTXj1thy+T5VVTfQ682UZ2+zfeKw3MXESlxYDmvl9P\n6B6xmG1A9+/MNcykl+gVN9vjeiCTXLxF6MGu70/ynlhg5l5i1wbKTCFEt+xU\n/zpEpdoCaC95gjVD4roZNKkLuqI9lm69HDqIDszzGRpsLlIK3kk12aEkzUbi\n7wBl8nv5bprdXe8+g5X/X2mSRO4A8yI5/vQ/ocSgiq09U4u58iuPT4fApg2l\niUITWlbiTh9wDVOsABjLnYBHfbHnTb5Nbca6AVdFUCfOJDPOTlfV2Obp54cp\nFM4Hs9jxCgeSNjyKS4y2dUM3ewNitEH0Z+gSEaHbIiGhRJNCoqqUmo8NBQZA\nfwNVo+ioJB0P46OMfWOXusOh6bLoMFMgIEhKD68lXCkm7T6mp4u+4DRKF9X7\nja8N+jZRIvMGg4S4c2PTbZ50Hz7oB+xfpNA6KFVrTBodd8Glhw8DP9HRNhg+\nOLhRF6b7L1saNSrvtu99S7DHz/xhJJ7XJXgIC9NiLzicTWrWSYKGGcDKoyN3\nAiKlCPXNElhv13tkY26lgnNiPQTDU97gGKG+oR3EkqiWzHmYW1ZIRVt0JGry\n/Dyy\r\n=QHnW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFSls6yxUVk6UVYjJAbPu1Bm/v0NWOZ/ciMs7YDICtggIhANRQyaKrjc2uK2pmjWYDhtLO+/3Mfmz89sI192cezgZa"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200530_1590822468567_0.8675297293705"},"_hasShrinkwrap":false},"0.21.0-nightly.20200531":{"name":"brs","version":"0.21.0-nightly.20200531","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200531","dist":{"shasum":"8dffa01b02c17f32c401da033e8f7fc7ea4e41f7","integrity":"sha512-m42dPRcuw5yp44uRAiaynzZKgWZcJs8n5pxUOPlmNrGIdLtzhHYdWo3wMNTCeC+ycM9P1KjssI1PKEy1lty4hA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200531.tgz","fileCount":176,"unpackedSize":1042633,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe01eKCRA9TVsSAnZWagAAtrIQAI5+8sCdjlSeCw7v/BFc\nT+gFB/bRSpwKSdfHvq9uEvpeQdnoOTj4XSLeeXF5dMkcxZ9+IhM85rVbjadb\nPmB716BpBg2yrWJsDvZbjRhJQEIoLntOSnqaYMsBC6Hhgx4p/upkXfYN2gQP\n6MOGbptvt/vuvmT+7f+JEXv/6M7cLAe9iGNwbA/ocLqrCvUDfJ4//QrzWH1B\nckaTDh+iIdkct8GAk+cxdD3asLSatSXnMul+m6dylxaua76cc0L7EiCUu2As\nL8RU8w1HAYgKwUonEbP+a42w/9Ei3UtuDVhxSp7ZxlN1Xbo/kjg4LyHNy1LA\n/gte9isuyQgBDPnMv2Wp22c6msBVaaIKu+q9HYrrGLD46yBpv/wcCGEVQ5Mu\nykF+r+aZ1JR2ZfK+3rO9cYptDj4h5KvxCHAYRaLlpthXZtc77ajecHqN7Iww\n6ZBKfTSiZqoyohq7yBqvtL0iPHHZlVB54+zUZazz6YBaj8C/3gOzKa2QWWW0\nRDSR81wlL7vTQBKqf//1o5qrchPlkeP6M0WlljsU3JMAgP9CO5aa8jvLTqmc\nL7ottMnZt1J3reSyAbkczJbyPIwGDeaZ35D6QxpXvrqujdW0wJEG1WWPjA22\nh2T8FyJ10RqJ5PCfQeuuLE8XGWUKYXaZKf3fg1LHdlUBYdTPWkGnweAghXUX\nrhdK\r\n=kpWt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHSm/N3CTIX3pefIQofHWHRc/Nfz+6r2WU5GmWWhg0dpAiBkQXhV10MIpGEjQz2/EebGt/l5o44Gsc7j9SQhzoLKyw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200531_1590908810126_0.0808797353245394"},"_hasShrinkwrap":false},"0.21.0-nightly.20200601":{"name":"brs","version":"0.21.0-nightly.20200601","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200601","dist":{"shasum":"693da7b5a4ed05a377a6e6b851a29d8922c54acc","integrity":"sha512-vIvhsB0RLjt61S0GPyzas5shi0Q3KAlbKRt0MPJt+XuTIwhevoV2SuodGNP3bmQf3jdNgltgJwL8m40Ng5BQjA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200601.tgz","fileCount":176,"unpackedSize":1042633,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1KkJCRA9TVsSAnZWagAAG8AP/3rhswr1MHHIjoIDi0GG\nDzid0xhLzL+78CYkuLbk5H5ydXYWMtgsGW0msUA+P4XrN5oLJ1EVnFJgu3eF\njFWit2gHXgh8zrMNCTUM65ULpL8DOf26Y852bHUCBCCmde7u3NinWCcD3yLv\n/694j4fLexPwuJ2IZK1jtGW47WhDcUKYtGrZ8AZxTsE23q4Z8eiJ5XrP3YQ9\nbATgY9bptQecUSibG2Zt/0Dpmc/aQDLOpLkTD0eHFFqH6xNliiPdw2/2Jad5\nIVcREKBJnELXO1J1Y0ps1+Ha4lUN1X6EJWz99IOHKnkv0OEHX/XsCxjmEvWQ\nNRpPRU4n5c+7gIGQkjKT27ZgdFEWe/YD0YM2uHd/4TLxHoIh5uWQHSb1Y8Up\n67W/HWGoHFZCdn61JvkvGI22WcOcCLaM7mIHjo2xyLKaA9QLYAmMSz6o+xWj\nrcZ+DslLNyGoLU3cdQwfRSIiDpZawvhfU8AFsguKlXhgrQZBDuVaJRhEg/FL\nk1TM3mv+P6LkxYBO6EIEAdbxAtubIu9nrE24U8gEL1bUXLrfJTTiX/AWak9Z\nuiqN2ijZHsw8Jxb5AUlhjlhZI2TfkD1Q6VJVk1bdl8L73U5wgVWyqaNS09lw\nkaFj+1P8IOSv1jjpZY33zHckfYoVtGqP0CvnOTNfUswgE1ZDjtfP+ySstV3f\nJJQF\r\n=c6Lq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC67rss/ERhc3ztVjW/rRoyIVyCXICGhZGVye3w+zrAegIgOIWOs4gXa1WlkSIHk43D5zeYaD1LUUP+o/eGsYBEagw="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200601_1590995209164_0.41539275228786243"},"_hasShrinkwrap":false},"0.21.0-nightly.20200602":{"name":"brs","version":"0.21.0-nightly.20200602","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200602","dist":{"shasum":"743f88007106a89ed590439204667646fbfe64a4","integrity":"sha512-OpqV+FRyeFZ78jDatD+ihi0K6sXkiJRGHxtBHU3KdK8ow/wAHf+1ZjrlimUHMPxv5OlSh7NsTjOlwDgH49y3Ew==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200602.tgz","fileCount":176,"unpackedSize":1042633,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1fqpCRA9TVsSAnZWagAARKAQAKJlxE8mRGSiLKBPUQyP\nG3MbeLV8utBravcO4h8eZBXf0Bz4piW7swsqlf9hRtv3fBHn63AnwyCB7CBN\nIUlN/xG448X/jiC1fLhvkMcqryzFGzmQnkQrZeVCSDz9Zp7PzPAiOwJCjYVg\npgUZWmT0+Rq0upnUJdIhYvwMUphpgTszS1qmpatRJy1dDTHmM8g1cnWgfjCX\nTGQaiiHRo5SxD99YZUKNE3glcmNWfuJ5+cUCslNR17LR0uCNzBAUtnUOWMJC\nHbd4aXuXGU4Ug4rO0uVXWDZD9JjF2ZQjvbuGnv3SR2SaTKCdImfMh//eguIR\n/Xk5JjDaDWGcBTb2rESXRYwwMGFiFbIW10EUEa1zH32T3iYtYvullBe0R9+f\n2/ccHoH909nON3iyfLXTz0LXK+75Xenhu/WFbkPD4VjT1+Ev7BwJ3bfmMzIE\nwk6NVaxu+bEIVxYnwVwvaJe5iijHJC84iT4WnRJf/MBwnxcM+9RmTmmktNhe\nBugjaESiWWC+1NsTEMpHjdxxKs+6WCoDodry9u9KXroTQQAA9ZxyB4Auj118\nUNzODWLxTrAaDgf8PQTz8WelanexF5giixO+2DPJQUQs7M9L9KAP38QZMEs9\nuAfEalfePrGDf9vr6g6Pyg4Jat/UGwi3EvPL8CkwNOdpuaC1RisugqJ0skm0\nPnsk\r\n=aUK5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCaazDJTeV0P41gtXZV+QA8RwigBNt1x01ZTnNff4kB0AIgTaKpbowakADt98t9G5Rpu7KGfdV1IjS93AZDaziJc+M="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200602_1591081640533_0.24012081703701038"},"_hasShrinkwrap":false},"0.21.0-nightly.20200603":{"name":"brs","version":"0.21.0-nightly.20200603","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200603","dist":{"shasum":"a5c05cca7d57c68ee343e27699786276a7ef1b29","integrity":"sha512-HfXwTX+wrLpCLzpTkh2ww/6eKCVW6U296AHZaB/H7R1NxegwdmkbYHMIHN9Y5zTK+N6E/wTA7vEJ1MQ40QRp8w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200603.tgz","fileCount":176,"unpackedSize":1043108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe10wfCRA9TVsSAnZWagAAuCQP/0bFY5V6HKXfVZhqlvPH\nsieLaCIkeJLkGgPZy+8tut9VMzeU3Z/aLIblx9QWGpQTtWvGyfhhvk17DZEo\nzZJ30Vzu04heVYHzzK3TPmczYLTrp9IF7ROWgDal+X5n9KFNX3i9+wSZY+n4\n7ctwMh16q5zkSG7c+YVB9COK1NcEuV8KmEpS5gZIuW97R6CmyjltUMc6W9zh\n/3S+BcenlXomBCFhNFGICkwJwYyrdSuiXtFc1+hMTREAlN+hvtyIXmZBNErX\nn/sA6aINNgqMK6lI61moIPCvSXLYF62L3abSu0xYfqxE/t1Us6aOhM4ZHqnI\ndDEcXqUbPPM6USakV72kGjFXpp3097+0TaQIamEdMqrs1afDe/1HPctvbl1b\nRV/Qk4yJlUWzv52od9zWskdI6Z+8yXWBWUtl0ITWQYAG2vUcZNpRDxjxtkTa\nCffR6EPaXK1HWfWaeAPbthyNRBKAce+Q7DFC8xGF7CTnvGD0f9M9nWEF34vZ\n/AgLN7G/lDEoXxpoV6yXX2yN75z+gHBVAyHqtOr98PPExnEdGb+2wkQ0m6eR\nS94LCEkXuO23TvZz8cyAKJZQdZdz92mvYRTJSBYq1G+yEm/cBaHxY+wfB8Q3\noVdCg1Pg+c5sjf1ou6SDZp8Y16+3aGms61shw+qUB9IDOC80gqV5XWWHQoFn\nWFyA\r\n=Nwzm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0z7NwCzfKGulxkhsv9R9dlUrXyE96YKRippMeWbLz6QIgcTe6uGdRGKPQ1Gat7sP+e1HqCstvAoFg0wf7g85sSaE="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200603_1591168030285_0.6245323670954563"},"_hasShrinkwrap":false},"0.21.0-nightly.20200604":{"name":"brs","version":"0.21.0-nightly.20200604","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200604","dist":{"shasum":"04874437b4e6dc39857c585642b7e4061ab18496","integrity":"sha512-rY0VPLOBFYGX6pUvXJsuj5NqNuxpBcllqyUEOP6FHUNMxTeIN5wBJRqeBMoNA/zgQKzBkKGOU44N2yr04nfmHg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200604.tgz","fileCount":176,"unpackedSize":1044811,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2J2JCRA9TVsSAnZWagAAID0P/2OYud9MCGEsLHuC+t1R\nHMps7fAvwZgwljS/L8Mu9N1rOt0Z5K2B9N/d1XiPD1ktBDnQ10tpg/KNio4r\nk0WjpTz5u68L4GDtXuvSTFKKspU734uQD+qDYVNCoBm33mABbguCNkjJ9OLF\nbd08Z0Mt1vTKdSO+lyexgf+FJ4b6fQqykDccdItvbHbX9tAQUDgFURRwjR/m\n1RSAmB+vw70xAOM0uZZ1xvTk0DVTPoVZM5Fc/7nfZT/UJFIAt4XS0Sjj7ACZ\n3u3Xwko5LW9pMdmkCovJGqNq9Bv4z4i101rhunSMRb881fbqg9vetmdPRaJR\nemk3faHAq7YEyDqCedbNGxvZ/2bNbW2jFb+p/zOcNDn9sFSpFZbpAmKFtUpt\nJjA8jgIIsi3H0vh8Xj17ZEBfwXG9WslOnGPh33p9oBzJcb1tXyc0+wGXLEx+\n7Lrxj1MfoguDdKkFVINnNdAAOaiUQ+r24bPF1lc09VLtpsf99IW1ce+N0BX8\n2PVa19dCfVnUri7ShxoBSC5xJitXu4ECQrG1nSJF6XZ06RPEJ2KAih8DfSS+\nAA7p1PRY7d7k2QWfPS/LZLFawQR3pElmCJCVGddzkiyilcfKiZ8k8kuZ5dcO\n9RNz8SQ23UbAdzTEOw7dxpOG5iHh3Ij/F8xIeT+4MXaIhG+iAAXsmGXrqkHM\nS0ZU\r\n=Fikd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDoUIz+gFdz6hkFES5LxKih9s2Z6MaBO3Pfj73pFbE/+gIgYaxjxDDd5SGrBeEr1i0eP76v9yiGHtNGiTr/wAgPQtY="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200604_1591254408635_0.8274278150206513"},"_hasShrinkwrap":false},"0.21.0-nightly.20200605":{"name":"brs","version":"0.21.0-nightly.20200605","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200605","dist":{"shasum":"5154352006d88285906d62c713e04957d2955bbc","integrity":"sha512-Y1fx3DWGNFecQZcQZYuEBYTUZ8OGIzGhKFVWsL/0gHHdmdntSb66h/kcMVGYpd+2k4nY/PUJlPCTE7FTf+7cgg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200605.tgz","fileCount":176,"unpackedSize":1044811,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2e8sCRA9TVsSAnZWagAAoBUP/AojNebYrZIuzw0stLNC\nDBZO4wpginkv2H9QBFIN3BVgBPExYC2fLFDZx1sNOcc8zSnLbktO7vmYQyy7\naK7I3ZGbH3fk+6CbZSrW4H+WWbPtwlaPPuwGvn4gHlvxuujT7BrST7crEsaN\nsSLIPZhkKGFCPDOGBws92kOwoMbvN9jCzU29cwAVhe5CVLTA3DDgWWSFu7dX\nBc/LfnJXoID9UV+5Pp3y9/bYJKBC2EIYasMqaNfXgwJKBPcgJxcT70m39WX1\nmN4Et6F+TrLAp4Kj2fmE7uenvfKlWvafvTe7fsE5LJS/a0Ja/5BdIdKRxOUp\nzEmYu/6s9fSL96zmu1gdKCked0yydakHS+bkZZlM9xoBXe2Dk6PMn75Q3gTg\nhNEl74Kbro3DE/kPvZ0D0MKdC+3oRdJiRFOtlZPe7IN+4oQM+Do9JACIh7Hy\nVqy8n7k9ERbwH/In/vPOgP45hcgsMgl8evKM3CcIPubRd+FIa7iq7JILIs+j\n/p6aR8nafVUYugTZWCKokNoOiklE79p1WPM62pWYMPfXp+jW9fLYuI6/g5vp\nGNoiHRKxITPuN4dkCcujkJ5de62ul3uuq6+jqvCJluNetxxS61XrYAbPd0te\n3s8W8jxZ++KuiUgt96f11Fc4ir95L7G6iYzaQs+Kv0rHTPjshP25S0aCSp65\nHL55\r\n=Uj8Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCNBRn7poYsOm8pIFH4kciHHlqTSyAU+gZUtfKMt7MwNwIhAPjS/12P6dTc7MOAAYCwvNb6oq+0TznYkQpPoJ1JMmji"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200605_1591340843568_0.7952104690015578"},"_hasShrinkwrap":false},"0.21.0-nightly.20200606":{"name":"brs","version":"0.21.0-nightly.20200606","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200606","dist":{"shasum":"379ca16b252f696dd1469c43aa1e0a19d2180580","integrity":"sha512-u/HCJGuGQI1uDQONl9cYu/n6G+nWL965zQgox6XZbGO4aPOywTecPCHuw0W2cY9Lgstok08nsUbxBY9bJf0NPw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200606.tgz","fileCount":176,"unpackedSize":1044811,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe20CaCRA9TVsSAnZWagAAnW4P/jOswbpHkmKh884kMO8O\nQyJThdqHyRZcj7orTXqked3gxMbbDjHcfmi342/gmqbg96HR/eTL5HuIvKSR\nCElFSQI68FtvF5aT879GHRimSIjj1qpzhuuS/ZUsJ95bZIEE7BXEjPtS/gEw\njkaQdpGz3Ggo1QNd1tKAXRjo3DQ4YyaiqVMiQukewzwnVVwekNIdsp5Zts3O\nC4AneErBhJ3QCPOjr8GW+EfnCxR6jaZKzUsYpmWXfBXPNJQGtn4kBUGEZg9Q\nhG9sMuBlcfifWCIFHkNrlKLAogr2eISr7QlcjlWQBJg3PB11PRqKj2wIzWjA\nn37LnngDgibYigBgXhDw/OoZpbsRbJF3kGxdBmSYSxTsfLKje18TQKn1nyq7\nW+CWJ7WnbKKy4hyDmgNyQkhjiLpHQHS7Lk9e6QCc1/0aYLZ34peyKjgfxS5s\nIEqExJek7HRjL6rdMv0q1+mIN9ByI94GkgCObDysqygcr3lqWd6eY0AWROVj\nHjIy8ytkVFBg+3SNMIl5UxORLGwdqrOCZZyrNpNj01yEb5s7l2kHWC/uOquO\n3Lb52lzz9rQW+6xhVCO9W7vSQ8NKo6haQlSn5N4IvBFwsTp3YDE6d/n9J9VE\nlTn43ipwkdwQxC89uLHmT3VWDiuJndV2IPjD1hkj08X+Oz7L37Hr6DOJAprs\nKg7R\r\n=KLCC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH0ldQ+goKJLXh2ZVngGp1QG7hWMjbfYF/7Y4JZyE4AhAiEA666ll1mtf24EamOePiEK8+ASx+TDsFJrMmTZjy9ET0o="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200606_1591427226098_0.41993237932504246"},"_hasShrinkwrap":false},"0.21.0-nightly.20200607":{"name":"brs","version":"0.21.0-nightly.20200607","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200607","dist":{"shasum":"b866bc7125cbb3831a448c3819fc6ee0723de364","integrity":"sha512-ixklzt51z8Nqyr16kFbPXcPtK2omNsB7eMedqSCfOTasgRNmCteLVP+kSSBh7JAn9lwzdMWYwoDeZHTkVMZ8+Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200607.tgz","fileCount":176,"unpackedSize":1044811,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3JJfCRA9TVsSAnZWagAAdpEP/jUnJQPtggiQzLQOx37L\n+JnwyzqaEC9Z4sAIanZ8dpn97p716UYEcofCWwLZvFUOGIrKwi+aQ8bWCNQN\n6pl3Q13dCNp9S3qRcmuWoYmN55BDLx1JxLMuwrj54czVSpiptuuxd5704FO6\n3mLMYNULTiprskEuy3gcJ+7IFXokuZujExAFXI9rF79F10fVwjohL+C8sKxV\nNzyyW80Bm0jnJZ7vWH5u9iAoEfRODHtO8EONH/f241jQiUeFT5zlM78b7PTV\nRTlXD2oojrq6423Hq2j6UoTcAlIVYtfoEVifgF9zd0xDNRvSOeqA0Wg+Ir0y\nGNl/w5eWdOPHdpi0SXrjRhx3/+xpxGMoJLEb4MLiuWqSnmfmYeFSO6IGYjL1\nP2iLy7AiW3h/aWx8xNrNhUvnYy5TCx/Osm04/vVtJhSca6QTgq0LA+mTINUE\nccS9lS14pAHhLjeiFw5TIT4pkkJ43yGvkxgko52voocWmj+FTZLooZ6aSbqv\n4ZPRS4GoZ9Fp6L3X1yK71VLNtsuRieFuNIH2hu02UI3Dgs33t/1TLQSSUNHo\n70JLXi9CkdBgAvYAia92IPOSuNr5MHpHvqspmjhAMhsuaD18NXaZniP/3k8S\nOyKiDMfyjubqL7xUP+KHSjoMmN72kFEN87CCp15qsphPHzZiLE7yEMrZ1aS0\nHcp9\r\n=yhNZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3M5gadmdIrvm9IW6nLUsIVjkneyl0pp/CAiz0q9aiHwIgTp3wFqbitLxm/9PuxvJsMP6/D/vuYfd4rb4lpI/7/gc="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200607_1591513694458_0.06842604984670331"},"_hasShrinkwrap":false},"0.21.0-nightly.20200608":{"name":"brs","version":"0.21.0-nightly.20200608","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.21.0-nightly.20200608","dist":{"shasum":"cb0bb90e2edb818eba7d2cb7ad44d3facf07afa5","integrity":"sha512-aJFoyIfkoy+C7wpQkT7FBlHLZV9TSaXWVgU46tMUtWRhvvmWAoifAztGP5cVi6x2HuTtecykdCpCcdkNpOXBEg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.21.0-nightly.20200608.tgz","fileCount":176,"unpackedSize":1044811,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3ePwCRA9TVsSAnZWagAAtXkP/jk59X9XAyO+LpBK8z+B\nXVZ7Kg9KrCmOg6wuPnLwDDVxYSjubjhjmU4kb5oIG1ArIL3HLJqK4n9fQVxA\ncsYkJtvMfyg1G/dCxKaFinz9gaflQsE4gvsjI32lEDSBA8SOu7yRKF3HeMo2\nCIOitOrcvKkfO7IRMRx6ySylZVcFHv1xu41uw+9y66oqbs6BPsvqe4XuIa/G\nV2QsR2lRzbny+kVP9/A0T7UYjkb1qThx4MmgsvqnR3XreFKxJk6WttNx23xT\nSKLDdzGL8ebgqq2bTV1yKTmGZnv+YyXBX7fNoqGIA6q7ZXdau1vGAIIymzU3\nsAGxOho3huFXmzJMV17gA9pxWzpIS9hFbvulsU6t35bjFRKLoK+FCiPZLodW\nhvTtJqG85SI7C8ZOgdRD77yOuH2u+iZQ8A5/AYjUA3ZTHro6z/X25n8D6LAx\nGh69ZslhOFtBa38/kr+vyt6m4j5+7RB0i5VNt1zJpbUK40FYOvRl8cXJ4KoA\nKPVubd2iWPRepv4PZ15azeLkya6SmJDW+qY9ZnHTuZoF180M3qKQXfBFifhL\nq/dMe4eq57465pTWLGSQo0nYultSUzoJT61fpG2CzCsnBeXGOQCLo4v3VvET\ntgtSPbYMSLVYEufuWQHAcRcggipSnPnmURf6cojEKuD3OrecNxi54OTCY++R\nhWUi\r\n=Kfgf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDflT081MImC2DcQ7DAlQsGLpcGGj1h76pe4fIWACWCFgIgeOyexQNUewrtcy+VWGNDwOBpaQ58jU3jGEo8WtxQYPo="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.21.0-nightly.20200608_1591600112357_0.8163555291857927"},"_hasShrinkwrap":false},"0.22.0":{"name":"brs","version":"0.22.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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) 2018, Sean Barag\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@0.22.0","dist":{"shasum":"72a2f932e9f719b047faa2990c8a082251e686ae","integrity":"sha512-xfn357Bnm2wf2PgPkNFxYeJjTQnF5oKo2hy0gw+26vcqlU5z0yZbDVAlJd3GPmOwE/wRyeHK57w/OAKmtO+/8w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.22.0.tgz","fileCount":176,"unpackedSize":1044794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3mrwCRA9TVsSAnZWagAA064P/2S8On8RF0ROgrLbHi+n\n8sa0w+1G+I0v4Q9SeYVAEwET9Tym7iiTD1vTa9MoBOdLLO0ACLL5LIuqfVim\nks0NxyG7ICA3UwGfVycmut03fp4GYJCtbXIGTznHBSWv2SzspKfS7s2IomJG\nwz16Sn0aEXC3xS6jZoOFV9N31TmOQuBu0b8c/pziBkaNKTzDR4oI4se7vjg4\nI3zlXZj3JfR3gYgyNzwseUEqHivctvbhV5qKiTQW2OTQRlvUrM8meBWhtxN7\n8BShh8PXN0tyrvpF6vpjYLjiA8YX9EGxoRTi0g/fJ6YiOsOjSctvG3SLOomg\njoLsCJinxts5IvDP/bV+XzhadHTTXWtG/RRgY95jAkLBboQwRSjCmTLpHcCN\ngttQOksMeyahGHHokVWo0SC5ggV37wGWIzbsKB4Pcbf4QteySP5hbBe3UYLZ\n5uhRW2/yki8NXCXNn+pxw0vDbitS7dqlOe1gU09Kq83zUJrjsHfFb9jn/jC+\nI3fUuLFVgfnTLQM0jAzdE41qqLknXkInzV11Li8eqHMq30rdDkdl/v1iOQiC\n86V4rbnjfQIl7XeBKMp8cSJkeKaSJUaxFgXIZ2uDWACNIUm7Fp8qSxfx4now\n8gO9Gr1vw0vF7vksgHn4m+fHKNGJTIEFyw7aNzXBH8pIxA0eH6xMme4gSoaP\nAQj7\r\n=toq4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHn6mt1UVJEqvqv+bKLwHGD7Z4pigyN40+ZJhmtChHBqAiBjdGSzqRmh0N6Fy7ghZm4jcZ7RU1voY34VlK8Q895oOQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.22.0_1591634671941_0.7200815814004711"},"_hasShrinkwrap":false},"0.22.0-nightly.20200609":{"name":"brs","version":"0.22.0-nightly.20200609","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.22.0-nightly.20200609","dist":{"shasum":"3a18ad2d8f1286b667a12771a5f75406e84b8443","integrity":"sha512-eu8ezjfSJTeOD2c3oFufTdnv7/94BY7Z1nj4sbdNI7QdYrQKwpfeji8Y4MNX06q6VLoT9EM8BlzG2S/w358DCw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.22.0-nightly.20200609.tgz","fileCount":176,"unpackedSize":1044811,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3zUQCRA9TVsSAnZWagAAJxoP/i5XnWXMmAhP7Y8PPxSq\nfABzYr/RtNh6b0C5R+BsGHmLZZzQuVTQXTJKJfVRqpUGu8AHBIVcpQ1OHAw7\nEnLvoJ5g2NoC3C2SBrIFa/yHT0f6QKtZt1X16REomc5wFWBwpkNxcFBQWcdD\nfpllqpuN4tHSLWVnLvT9+d95aEnO9Nb/xY2XOFXkJSJhOLv7VYHPqIqXgVCk\nWJvKZGRy7tYULVXFsEMZiV4YDha8hnseti0Y+FbHRxmdUdG9mGvwKxveetWM\naOqSf2NFdXxnvwV/qOAI1WuXTJpHNFvuAkT+jXXdCiq8djLio2SLh1ORX1na\nBgQY6qAOBxKU1FS89POI16iv3qfAIxuRbORJTbEXnii/bmF+pivgzVekTRRX\nlIVWzypar706aBhOHb+gIFq0oLV5LpTzejHESsK5viG58PsaiyoFPL/3hJTw\n07uC11wgVh1YzZD4uMZ0HNZdxV3MBNEPg1SxTcqRbyCN8xz/qhiUEAqR4ceX\nhVQ2jtoy6qUvlMyH7selxixMnzqv4BFY0Q/6OsItslsw6ObYSwalfWiU5oyL\nE7OGjwocTVyzCQ5lgouJWaGu/fy82vjCcgYeiIYrk1w/rakBitLiMgkcUUhe\nn1RlsibQqSeC6sqs5FPQEtuKqVg5rU6DtePK4MhIDdJwz7vb5JbqGcjCcfD7\nPFgr\r\n=rA/Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFREyUrG48aSbwnhnWipnU6gCZsCWmfviRaNZAbrfkkoAiAoBvGXAIyQs1QjaBXsGoi29oIJLOhtP5saxMgcoCrL0A=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.22.0-nightly.20200609_1591686415719_0.4653806864989376"},"_hasShrinkwrap":false},"0.22.0-nightly.20200610":{"name":"brs","version":"0.22.0-nightly.20200610","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.22.0-nightly.20200610","dist":{"shasum":"923778db0c99150e3faf03007de225e1d9bae005","integrity":"sha512-TSvgKrpakiin1Etu0FrtLBh0hdh6nRFh2gyQcnmzQV0UIdi/cdOFdpAFarZKR2R7oCrAc+oYbE0o2Kq5WMCgvQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.22.0-nightly.20200610.tgz","fileCount":176,"unpackedSize":1044811,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe4IcNCRA9TVsSAnZWagAAPqoQAJ1syIgiZWf3nnaQSe0V\nvfmt7ppwGgNj5OzbP+0p2dAqmbo37R7EbEvs37JMJFjcgmcgY6iVQZWvJn7I\nSxVq2XEcbesfpyeAcMRoYdW8zxPyoD/BeLf4K1YY20Fp6Ep1iBVteHVz8Hmz\nkb4DHVpZThYHR+pCaF7tG/sS4q8PFeDhgO9mcRK48q3RXDoMzWsAOlu1hbQi\nBOeBlhJFNXwjeJ7Z//bQUdbUo73w4v1h1bRR0oWi7D5OTfjaYc6oXVL5p5Lp\nRUqYh2oqym1l8ab0GHdObFRQkrVJ94OH5mfiUVMB/A3XzbOjKEniVhDMkL0X\nZ3eDpMSZtWwvbcDl2KpdyhkwSYNo8EBJk8qQdVEq4nrbuUdyx8z8HbFgkz47\nVrfObR6Lg9H9p5CtcK6LJBonzzFG3H9uRhIVNU2Hy6C02iT225CsOASGaIln\noKiA1B8IdeZ6z6QoZ7TX2GGfOjy9ijfBIlVdmRuMW9SOEQv3N+2582umTdP0\n64/TlLmqzHIg8O0NnwlikioMWx3KhJPNnAye7qwQyKq4w+Mjj1bmx+rAQB8I\nRiPSmyZRubQYhDNQZTNvaUyAZMQOQsunHKwC6m4kLDECvsYdXLR0x42DymGp\n/fZ1NbcNDoS3HXkovdhPP2VAitxBpoo1YB6dqtKbAN38jsmAVjpQYafl2ncc\nNyuB\r\n=ogYB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIENMo0ev1JsQs+Qka9FOmRgYu0UNwM8zOaRWOYB8hVTBAiBm1tLUIi3UCfbAshg7vFfXJnxALK178x/vOZQcDY7tPw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.22.0-nightly.20200610_1591772940897_0.3945109836410523"},"_hasShrinkwrap":false},"0.22.0-nightly.20200611":{"name":"brs","version":"0.22.0-nightly.20200611","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.22.0-nightly.20200611","dist":{"shasum":"a3e04f0b49eb0448121b0798adb2e2d7e3ce93b6","integrity":"sha512-94zaL95nbz/np6MTQ8n30hiKVL02OiQS2hSlfWnr+9Ux5O3k/OdH6eZPXdFsZSOIiqSGdK6N8gGNSMY/56bx5A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.22.0-nightly.20200611.tgz","fileCount":178,"unpackedSize":1051889,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe4dgmCRA9TVsSAnZWagAAxh4P+gK+feHnLX1cpiez2RU1\n3CFQWaiY7sMnw7hDlRd6Y5MbPJD+8hircca0dY6EkQl78by7/lNTGKn8tBTa\n6Ke5PcNn80UkJz1uOHUKg6EHT+cbjPmYkoNGUDUZGfOY04q55tbpzynGGVWC\nwKs0CJme5Ki5dAoKIam3oG39VmOSdUnM5vP7Faw8cgwkeNmrLjnO695QnKpj\nBjwEZz5gEQsJDcJmtIoZzG3HD1AF0N4RiQu3b+qh5wOkb4XBHGf6O/97IjQt\nGJD4uXe+FU50xSQfM90w+SS3oebZ/7AvrMbz9OUiESj3F86exjugq9bOm8rK\n7fCcnXe+FReuK/C1mlV1vhyR5RiIZDo2TDdhoRnnh22jZEM9ReI5hS21ZdR9\nIiiECn50aoby6gstpBxpYJxuS+D1i7TMlsidQodgzdOJDXXoNwpOkNQNZVZh\ngHP5UfHgWZILdgb9xQtBx26S5ujPVgeQ29lPHfJnlwWdw20l0lt/FXe+IkhG\nxvXkyz+orJCWDBzLsCPx8aeMAmRZVZMXEzw0/rLqzcP+7VzDqce0ytu9O4v6\n7uC9xWScMqVEu5Uyl5+4AcA9uDmZlHhlN9Ny8wA0K45+QyYLG3tqxDAlhHhQ\np9wITAUz/NWhlojSwLHoId/LbJ9xr1Mx+n4rlmfog7EbX2aoFsb9CP1ywpJJ\nqGho\r\n=+Ize\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDd3zcV7PNbwzasaKmZZ0jDgm8TE8b9vhiuskox+W3CgAiEAnWkaOAyN2HfCr7QMRKmbNbpFb8xn7aNFUHuXDk7C0WU="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.22.0-nightly.20200611_1591859238061_0.1640489807690746"},"_hasShrinkwrap":false},"0.22.0-nightly.20200612":{"name":"brs","version":"0.22.0-nightly.20200612","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/jest":"^23.3.13","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.4","husky":">=1","jest":"^24.0.0","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"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: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.22.0-nightly.20200612","dist":{"shasum":"6b6b4033b3b8b5c83453ddd7f80ead24c07bd2a7","integrity":"sha512-rz/Fk0PIKLrlVq7feSXJreVt0IvVU30C76b7KQp0kW/M1Z5PGrZJjFfbgco2a6WON0qbQbH9h1fue3DGcX+juw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.22.0-nightly.20200612.tgz","fileCount":180,"unpackedSize":1063771,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe4ymyCRA9TVsSAnZWagAAh3EP/11duyNuaTrpI9ILJMSC\nn/PFUL9AInz7DMru3ylBAgRylUXsk8tV1JWFlE89WpB3EWkCPQktxYQ6l0E7\nVCE7NW53d1QX2/03R8h/W3M477fiNu/ZhivB0rRyh29bGZh0WXeW31g33QGe\nkN0SRVKjdG64rqpy1pU77Lhlb1axdoCs2cHe2HXojPhQ1TBByEj9yTAz26eL\nmkyVuQiblrIpUsQ1hYUwkGtL+AiruvKc3eI8cgJ/BzICn+h5vkta+o2Mzf0T\nckKEEF4fnvo221rZPh2AdZrJKh3HzE4jD+Rb/sltgzLgaBYuefg5jZDaDvO3\ny0Krd5mpCAbI7Hvnl2j3ZiNCA7CzGTgp4MDMuIK8OP+YA3GMAcXlYJ1PwYK7\nfhFH0EjVSlbRjESF6G9Cxe/VcU7PvZL+OOLzbiDoZ0Sdq/RWk6tq268VvH7c\nNv+XaDfHudxG3cj9w764j4b1iZVvcTm84xyjHTAAZ7XKeEIMVg93WOVUgD7t\nx5pKMoQ6NMNlgFkY1bI/2zJuabFZK67w4bvDpXvvcxoCYH9WULnN253MNDnF\nkY8w/uDgGiDP5XmGGAF3jJgYRDYH1+BHsXuuQFHSGIvB8XM3BXP5v28F8JeP\n6Bd3R/KspkIBJPkcyAnrZciuSC59aBEV/cqwC98YXsRBorkr2fKgHh+pvaNm\nfife\r\n=hdOV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCoG3Yiy3Ds0o31nOWTLdPshmMRTp08QPsGxq/+EEEG0gIhAOnF5hvKWvTmCFEAeKI0pGtBmflFp0Ic2SuheX0gr/wm"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.22.0-nightly.20200612_1591945650298_0.013246227140280675"},"_hasShrinkwrap":false},"0.23.0":{"name":"brs","version":"0.23.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.23.0","dist":{"shasum":"a80f7250b90e762aed70f54ed5cf96b00ae53d17","integrity":"sha512-MWTUVUF8/dL5pjJLhqFQyS7HEDLQWjpF9Ifhtf7jXdtEMkk3vaXDAez6EOo1UBDeMY1PaYAu+glRuial932XVA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.23.0.tgz","fileCount":182,"unpackedSize":1105811,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe5BTRCRA9TVsSAnZWagAAXMAP/2Q8LpYlqWMM9GDYWnuE\nuoKZVOadvK3ATpJDmJlNqMPqS7mGPn1o2DKbawOBYVLBOLmmMiOXGkAas1fB\n+KOMm8SHkIu+N0P4eDNqTdm/W3U5IEOkDiioZwqnE3u+ROqp1Oa281hfle1Y\nofcA7w2HMwJaTJ+rJVY6gLGDwZcmbdZfupsVnidfS2mZ8wJJj9Oh9meX4OPA\nomzLsC8wBRteXidki9uyAFtqicwWjBWvHun+jHmaG1GBvIEMTLxphM8D7VYK\nL3ZIaF3RZ7nWkuFtodCEftGonWnzJp460qATvKMLZ5BDbYVuacsELa/2aMMz\nRQ8Jr9FfeCbv4174io2nUanLkhVSHzoIugwcOgR2FR/8Q+rEvDuV9Dgs9mEr\n+NVQesw9azVGGwcSXsFj9z7HpGzB82WKdKPw3cepZtkKcuH+zCLZGDHiXhr0\ng78pjihjI0nBicsWPGdChBLcJWS0Dulyh+5pzGLOunPlpuq4aqUzxIEiLKYa\n2sRBC2HfANEObUw9AUtvPTcRXG/427GCmby14b7S8aAdzZmvOce5bfarAICH\nF3PTtqg9sixAiI9Uzz1BNUa6A/PAocwX1jkn5Oc3Ja7cwpkA3vVudD2XU8TW\nxrbNJHsHB6QrRVhmkeMgaZ3htdU1jiWYtN5ZDC+A2VKgofiSKOEWh/Hvoqz9\nncWI\r\n=X72+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/W8/hhMzFrrPHghs6BI2RD45pgPb8B2bX9f7Sjp8NgAIhAKsekZ+hIbXbx1CHSz5Bh9S8SF/zlTNkvqAPtF2l8oBW"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.23.0_1592005840954_0.3652437675788589"},"_hasShrinkwrap":false},"0.23.0-nightly.20200613":{"name":"brs","version":"0.23.0-nightly.20200613","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.23.0-nightly.20200613","dist":{"shasum":"6d6cd2a994c187e1f9255e7016c1cefb0a181e2d","integrity":"sha512-iVibQWsYePqG9b0Fe7CUWXExt68pL9rwQONtoX5zmLiQZT9xpHY/t6tXOJuw7mutXEfI/gwylOEBHIkMvsu1LQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.23.0-nightly.20200613.tgz","fileCount":182,"unpackedSize":1105828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe5Hu+CRA9TVsSAnZWagAA43QQAJtyGesX06N16+G/iaK9\nVWl02/a53SGBXAGbJV35qoUFig12Bk+G0a3OSJR8VXxzaiWhttB28VLCfvht\nfaqR8+GMExvOzv5lsIhX1IlUD2PJrBvlDKdE5I4gxVsgJmvQfmjwpl2X3AUo\n6hi78GyRp2Ouunr6OOIz+BJddHT+ZPnJn+R1fgtZVn4s+i6a0e71JMqB0RhB\nKe1Ski/YFtmMug++HvEsIr3XUzWyWXz7D12vwVIxwntLgspQw3l2G6h2cxBs\n0JZhDB9ti3ZcAYV4wsnMsfdaOHtr5c4KzKW/3phmfQp+SWgd2Pu7hrqxIpo/\nTEVj4VVWyZytB/VH37uCTiVQP6/9/ZClYE4+MDyY5RYDTx+BN9wRdT0QBRwq\nsGCSzM1q468jwvkmB8UnxftHAVSFku/RFittbAbCyovsesBpcx0HawpGza6B\nLSOpXtGNR3Cf0mokSZOvJ2UpVlZekGPI9/oP9J4MrF5AM276ZgWGwvgdeWLU\nlkLF0mebHOORj0MOUX+HyUmmUQS9uANN093EfjNuD5hocf3v92ViNfq228HG\nqoerUKKM8UaOLkHQlcd0lHPd8ZFVyQowEwzttET50rYfcF51E2Y879Jrhh2w\noaEyp1NH0QtCV46Nb5qek7qiuPEpxOHOuUCY29+jrIpHTxy/+e7n+36ekGYS\n+nSc\r\n=a0yE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQJ9M2VJ2n2blMk2bIZEWqMRb654zPxeNquSzFOr4VWgIge20Ivd5NuoCU1aD4mFaBHeeOJ1ilGFAci+CyxNPgyxs="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.23.0-nightly.20200613_1592032189820_0.950354563502928"},"_hasShrinkwrap":false},"0.23.0-nightly.20200614":{"name":"brs","version":"0.23.0-nightly.20200614","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.23.0-nightly.20200614","dist":{"shasum":"5583f6407d4bf05534cd1e26b9492f00fea3cdd4","integrity":"sha512-Nunkl49RPu1wHkfJv3X3eW/GsFdQhpdHkF8SoxcwY29gKbVY6L6ZOE8aWKmwwQxxLDxzgQYIYxg7LPJjyrNrEg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.23.0-nightly.20200614.tgz","fileCount":182,"unpackedSize":1105828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe5c0bCRA9TVsSAnZWagAARy4P/2SqDy01Qyq1uuiodDjS\nleuaU97zABctEtGMSRVRaFBXLeNftHs99CVXB5UnjyoF4Rq/DmrE7F0U+Pgf\nfK1COkPJukn2NKf8XBXD5QLbeajPoLoURI7BryW47y9ZnE//27P1iYyCIE0b\n7j7CwmCKzoC4RFmusECT72tHFHaRLoI6FkCu4rUk/Cb8DXBdnta2VrVJ3brF\nfLLnkKi0WHQqA8jAPgkwlOC1t4zyUh86mTZywm9cfPkyzrgaPMWGFAUiOXgK\nH/f1521hXLkxbhVCKkMdAaahitLxBSOA9SvAQG36mq1MwZxs7ykhdPyCD+0v\nucktKYAG2XdStFU43Tnwbd4chI80NQgktpPggKl8YVN4kTx2GoXldQiW/dOP\nHJQORGR/u5GTXRPF4nQqBvakYd+uBwa5Gtv9CZtGGaBlQF4h1WiJuNqpyLJ8\nBF83cXOKBnk+4qlTwC167yGadpBU/1JySBAwRvl3IYlWCcTW5nxs028O99xi\nLvDfW6n9isR2qiy5FXsgerQaMbYMB6H6FAoKQmt6eqx9q167GbxUR50hD0jC\n2jlqCXdbyMauFCpUH6CH5k1r1eb580RJsK4vdbdF+yW2Im20fXCHu00FWv8e\nTMR8uX4U0Yk9AE/JRLAJa/Gbxs9rdOVMKPrbrDlyMk56ASmx949OfUx6aMK+\nAtlw\r\n=yRC6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBDVEq3d5/WzzCI2yMfqgIJkyzDuz9UMi7vX2Asn624bAiBSLIUE1dAZcA6ICUJN4BVjK/H+PDs+KppmgSqPPe23cg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.23.0-nightly.20200614_1592118554852_0.7217105677382287"},"_hasShrinkwrap":false},"0.23.0-nightly.20200615":{"name":"brs","version":"0.23.0-nightly.20200615","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.23.0-nightly.20200615","dist":{"shasum":"4e1920c5c02ab5506dcbadad81d943f2ef8c2fa0","integrity":"sha512-kQsg/uHpcktv01auyojlkGD4LLnp5pLq20Lxgvl60SBbFrEEStU4+4DoDeMXHCPb5ZSjWzBOv6ptCSxItv9wpQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.23.0-nightly.20200615.tgz","fileCount":182,"unpackedSize":1105828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe5x44CRA9TVsSAnZWagAAQaQP/R+T6fg0nyrLEMVQ8nju\n3GfT9LWQjp92eOWFnDfkK32QmIykP7iZgWox0axR2q6Dfe5hZh9uK7OdaQEp\n44aAgXDtGkbT1ifjHFxxeoITaC64X9q0T5MEGlqkNRis0czwtYcDJuarL/tR\na07UUwLGINtzGuifcWaJVAAlCXbXqxTwvWS13W2cA1yyh5AYvARs6mCB4AvP\nP4bkZTTCREqXXPEYGr61Uf4n2uZ1WhLzGj1ezwvR+Hyl7n1sbrLVziuf3QO9\n1lni1BNiDEDg9Ksf7zwMXBlaAYKNqHuQTegEH7gq9dUTelZyGbd/98Lil5Ik\nBGBMeU1tXmwd4KwFgktvLl/L7fBUyuFulBZEet772Tf3ZtEzXXYY7YnyXClt\nP2/4PUDnV/pogINtgOUfbQSdtWL2LASmhUAetMWCn0INLKqZN4vCNQZQ1w7v\n0Vry/CidRann/+JrWISk+NxxhuwpXmFQiNFj0FSYkJYd33uyDwA8ZjPznNNE\n20qn4dRJaZygTD+BPxsT9UiaSk6etG5YrD71drygyd4dzra9T4jBAA8NJRT3\n/u/F752567OIGHmLrWGODFAmonWcsPK5/uSIitJbVSP+2A0WXV5QkyQPtyo5\nlf5IGpaPuqLg8Wx6dNOTHC91ievOc4KQ/GRC0+oJJAcV4ddaF+62K+k+99r8\niaXo\r\n=smn5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDIZ0uXC37m+GcejXWL9fjI07WUWJcvUgZAI9rj9nI+HAiEAo2annXyrRtR5rNKU6At5wNcc+E5PBiSsHdjiYWYVRbs="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.23.0-nightly.20200615_1592204855271_0.7496364641655417"},"_hasShrinkwrap":false},"0.23.0-nightly.20200616":{"name":"brs","version":"0.23.0-nightly.20200616","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.23.0-nightly.20200616","dist":{"shasum":"a5b2f9b7d0de0a1df8f49b77fc9fccbc1ea573d6","integrity":"sha512-kb6bYlmFQ6JMCU9rC3cuSR41gjZKtIOX+mWu+Z5yIuFxmOs1SyA1sl0J0BWZ7jHdurO43rCRE15RWOrTILrOow==","tarball":"https://registry.npmjs.org/brs/-/brs-0.23.0-nightly.20200616.tgz","fileCount":182,"unpackedSize":1105828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6G+1CRA9TVsSAnZWagAAUBkQAJCyV9+Uau5c0T8V59be\nP+P04yaH2waTiuGAJi1hoSdpSvjleZ2GsQbbWZ393laZALkRZ9c92ncQO169\n0LBCYa6lUfinwFGkaVf+F9SOkX6+HicJLMfcekxdoNqC+1HCTkOOgkQCuHnB\nqHEVuSGLIrddrERnhdPECjrMQDJtmljHl6dpThubfQifyuPrLDiCmoFBrhvM\ncJ8oPCMuGauyles4nqINO4800EXzFi3f9Scr9WevhgowSr/gxr8tKmAhx1V+\n97mpUsjR1z32ZI/YkJBC7wywkBkhs1m+0GHnmQu+YJOxBI4UTSjKmYpuoQTr\nSarcirDbs06cctz3wWSd3PiEpFeUL3r3DXoz89sRlSBH0pcVnC1TM0Mt2mD+\nudaXPbTDS/Asp4Kft4RdR3oshEMLOYRVmpBruJP26TWR9YYgQTJiJqgGBVXW\nx6CeSuWbFdibYzp6hw3doxnE7CpBexQ7owIxc8Cc//aBAaTIJ+KbRWt+e3hj\nlOdeNfCCUg3px8oYeqyIUX8bNL9rPYEUreo/MJJIIhUyJn1FaTUbDOK2++bt\n05tN1d+aZ3Z53Xl5S/mzK+Ik9U6+9Jt+pne//xynxcmB95hbTecYu+4b4Zje\n0Fpml0eIVVEY89L9W95JQB3razasMGOTBFoPBCeiK4GF0dE5EsgCb3T8YgPh\nJxhB\r\n=Ofqy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDedmj55z3Qlzw0Uj2JB17yaUmMSuZ5n0Gz9B5UBAz4vAiBTbLgNxOT/Y5PvALGVnB+Uka/Qcv/H/AehHCqtxGCECg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.23.0-nightly.20200616_1592291252360_0.531480497478076"},"_hasShrinkwrap":false},"0.23.0-nightly.20200617":{"name":"brs","version":"0.23.0-nightly.20200617","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.23.0-nightly.20200617","dist":{"shasum":"5691bbf2c170faac13840ae00ef9285f6f8452aa","integrity":"sha512-lGHgrA2t408e/55hmoU2Ikb36eERFzn4DDmWkAfON+J3lIfQqzztdjdtlepCLYcAdqkPnpBlggDja1XaYM/yzA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.23.0-nightly.20200617.tgz","fileCount":182,"unpackedSize":1105828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6cFUCRA9TVsSAnZWagAAo1oP/3dO4e0LSfNzPXzRNeYU\n6nfmah4hOpKKePb4oZL6EHkDpdwH4yNQsQTA8h3vji6dHhWFCzl18suWz8fe\n5B3xaGDQhsZKCCFc5z2Ot820Y+QqNRrFiSm1rXWJt9RVpjA1iT/iSEYt3vjA\nkwI7UNYeQOqCNaZpzWmLC7NPY8xIDLY/3m++21Zw5bsdSX5PEza28QZ1aJ6f\nAHJvIgRYa99Vx1kCGzty0Ys0RkwC+Spl2my+KZKC2dWiLLFYzZm3No2yaaDe\nuIPdo9jbfOOOy9rj7F3sxjcZDj1hVhGEoCx2Im72+RxkarrB6aUNjQ7iQQx+\nNQNg0AfQdktwaRlNFIvSdyG98nigX1mKyv2KZ7I6Dg4gMLxk3LlWJ4LeebSk\nRHiySCHwtk50z6/Q3/LwWCZZ3JRbzcGsb1wDbKNaEyTVA6EI5MwQ8vCmy2Jb\nnlctdbdWC6q7DhelIEdGdybiKcPgmwfHVKW9rsbvij3mVwDYoiVW36SlJoKk\nGsdTTwKP+G9C8CqCjLxQb+KJqIcVCLEhEO3OZ3azMRXaqF+x6LdccXNxNCXx\nBvzJL1EysD4/2KcLbjgPwKztG3KRDJdfNoeGwPd2byVj8K/8FuwS8Pk5Agdh\nC84nCoHa/KZe3nL7/tfLrjt0my0Xcr1kIHWnvdfy4GIpCUZqr7Czsfhswn5d\nDfvE\r\n=oc7h\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBJbu4Ljzf0At4k0oXW7Qjm51VHdgvoTMOgeuDby6eO0AiAY/MxHmln3W/VOtJ7nvQ3nnqubFQbA1PCatGsC9jCHlQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.23.0-nightly.20200617_1592377684163_0.061346404322561554"},"_hasShrinkwrap":false},"0.23.0-nightly.20200618":{"name":"brs","version":"0.23.0-nightly.20200618","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.23.0-nightly.20200618","dist":{"shasum":"46dcc9b649b86170c9ecc8d8f0ca5f6c0a91fb55","integrity":"sha512-ml9oP+rFO3Jnwo7UqeJwbj9nFQ95jj8KiHrJZ7jR2Ju+llkRncYxRfmmslVVxSelf8T9a7kLcAyFRe5EZ10Cuw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.23.0-nightly.20200618.tgz","fileCount":182,"unpackedSize":1105828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6xL9CRA9TVsSAnZWagAAyxIP/342ZLM4nnsECRUidGhl\nUiTOe8n7HranpziR2U8OWPlGidNr7ODODI7YDZPmQ51qj2t0VuoX5oiz3lld\n7BxwGBdF3c1db8LCuAi7SAVolivydsHif4nJN9eY+zeofomqtnOKmWoa3QqA\nQG4HLDa3JyS4QdKHsTBtTn+EgzeWaIBTVTd0Y2f9LMLEIXY2WDxjiS489l3S\ntE5fX9kaAu2G1J22MPxKVlcFQiAdL9h42ZrkH7D0LsSojbQnWgSRc6dLVuUz\nAe574fVf2ZZws8HpzAb7GwVmy+SZb0riW4tfVyAFzvCSXgFbB0d5lqJtUpX4\nmvEECJAcAS0N3eE9ko6DrE0Kj2kMJZeDw6F8z2KeegPgJU0GtQPAh5nwmxOR\nwzl/8AHuxbdFfupVhpDgUYaghB0ZAhp5vL9hFS0+d6gVSlSKTqSMzyDG7MbK\n5PJFCcCOYkblC9jq3LyllxFVa/HYJL2SGPtt3IKIUTarYa1YNd8+gY3UpTWw\n2xGRHlhoLtZtBbWK+QdUa+CB5bXTxGPiris5qtil5JnUWByyef9/sxGDe+kr\nH3AzKStO4JxXD6QjJLrtkU5nYiHj/MBTTSoJLS6jT5RrEM+xaGWNc1kX7slq\nVINYxAsd5Ve8orqxBYq9SUNB1mQ924lLfp+cOYw8FXaGzP4yOtnkUEAE/9J5\nvl+N\r\n=T/qO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGaewocbI7SaV1CkWYi2loEySNproBu9E4mlIlZgtBCZAiAbILiw3rn8KFkO9+zaD2ecCH2n2FA/QVz8jTFmlmZSLQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.23.0-nightly.20200618_1592464125403_0.973402689526786"},"_hasShrinkwrap":false},"0.23.0-nightly.20200619":{"name":"brs","version":"0.23.0-nightly.20200619","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.23.0-nightly.20200619","dist":{"shasum":"10135226bc77051af09f3c5540702d2ad1ddf428","integrity":"sha512-1IiBwmH71qsZOf/y+v4GWJHjAu9zUfFeXfJ79tvd+KONLb/CWczZoMv28UuM0IRLa6APyGtDBOGKil/kj6ys2A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.23.0-nightly.20200619.tgz","fileCount":182,"unpackedSize":1105828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7GSeCRA9TVsSAnZWagAAyMYP/iiD2VCGDA+JfmBMNQ5J\n1PH+VCAifvF4BilILLJQCKDWdrmXPiVinWkf5TDyq1UYqTt6g1HI6PyBLFux\ndHVDFQ/lFo64hNGNHln+imqp4OsvvBZikgqnu8LoPDdbEhKAMOewTwJMSqbG\nWoFIcg6v7z1pyi/ads2aR5NsxMWWJ2mFNQO0C4VEpvFcBvuQTtfeQxs0IjIk\n5XzUHyfv+HjDBPSR8puO/mKgodJ8TM++oHH6c1XUp0Pf6d0sIa143SGX0xO2\n7+UTw8q0X6DHamV7POCH+ILq3I1AZZnluQzXrdxC4mvQZrtJ/gmD0ls8tB4M\nnvH0poAX7wRgebwvRb3Qk6Ju7jLKGPxacElWapMQg/lbLIBz6uZiWvMc8FgP\n3d7XVb8dT4CReKfNgU6l0o0L6tmRI9DK979xHoqt6tKBYN5VbNpKAqJE24Sl\nd1LOTjpDGqQ9j59q9UQSc27uZLKvZCCn7Q4+bDTSVU5tI/7huHLXefkfKUSu\nYLRkOjLyAeJoFEAV+vAttd/qosGcKRAT1vCqUNq5T4JN5wzv3HpQnSJyMeck\nA+Afx0JnAyY7mzKmQe1xZxy+pqRXcV3EkSQLd+f1iJQGTlxOrOJn3q8c3REe\nISm/S5MnAB3QmVOrj3y22koI+85AOeaVEvOVg++egS14dWDyA1arMCFrPP0L\nCN8j\r\n=k3wh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtqnDxry08GXRR4Ta3KhhQP3WUzUS6f2eODP1unoN7UQIgWKj2KbT3/mrOl4Xx9j796hLACNZ3dFJdYZuMPFfyotU="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.23.0-nightly.20200619_1592550558087_0.3452642498971732"},"_hasShrinkwrap":false},"0.23.0-nightly.20200620":{"name":"brs","version":"0.23.0-nightly.20200620","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.23.0-nightly.20200620","dist":{"shasum":"fa62a7e82d7f622ea44fa96481d5e45ded06e6eb","integrity":"sha512-qR0QXEuheLBm8loo/DWjyo3Kr5YdoSoABdJIqapqcVfziObK50TkDHEicg8hzUpO6vxB8lx1aTdaM/hTENailQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.23.0-nightly.20200620.tgz","fileCount":182,"unpackedSize":1105828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7bXVCRA9TVsSAnZWagAAl3kP/2T0/ZwuDZxSEIBw+1ke\nnOcfq/7MAhdkTt/lrJbxD8lUvSZ6qrSF19OLrxrv3BXiboF/lasBI/pzcc/i\nAZaQrPGahfs024HF+1SXirz3X5fBwIrNBXHen+LHaTk7D7A/u1bgrQZ9kEzQ\nOg3B/bZxUjmpmsmG7DgnoKcRVN3Wpfu9yBvjmw8Q0gzryE9XVG7yImXejkuB\nVxq/nhipI0SG1LZlMVRl2RWjs7zMIIoUV+POXcGuH8ls8R6lyaqPyGqIGmdn\nagR0UMyIAHyBSiy+vUHb8vD3nrrDDWNHyWvQVxHCDIyFKmXgqdgvIUXw1FI6\nECGu+E+SryFlVyQ1RQ0JSZbL87UEHKC3DAH7PzVzTe/aaJq1Py2c6Z8UXzYV\nODIts8Eq0bQpORDv7ZUMRiHRIgGsIlox4ErUVqbjylUPYGh+JVnI0NG/nqfV\n0caRN3CNQaA1PCaCnU49GsQWIwUB+dUXNjn9A9GtFxK43wKEspfrMzjWwuMK\n2CP/0I9j94KNnIJMZGfRg06gvmiIg3M0jS2eYTBopJvE3nO/pEfTf41/01am\nc2zsH5zni0saz5dgLWvv9xnf25I9T1DA3a8fTdtbNEOuIHQtTRzmeJBHTbC0\npa58dE74uZP346vfuBM6tSahqaYJGN9WaCy48nJlMKQjktEWOSzw5Wa8lfCo\njXWO\r\n=5Rog\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAJZVm8eQr2kchw8sXenST5GQWUszm/vzpSXwZ0Rge6QAiBYAgw16b4pCAInW1z5+PLlVbDSio/9SQnEsb5xopq8UA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.23.0-nightly.20200620_1592636884999_0.8101990683460027"},"_hasShrinkwrap":false},"0.23.0-nightly.20200621":{"name":"brs","version":"0.23.0-nightly.20200621","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.23.0-nightly.20200621","dist":{"shasum":"2af61e0882cd0b2db748d838e9789e55885460b3","integrity":"sha512-p9p59rERak7hHZe6Q3jyZx/tzVoEukI24VEwfDgWFMyB8EF/gqKK7SQ97N9dQC7yIgUk4RMuEI8/CMRF5E302g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.23.0-nightly.20200621.tgz","fileCount":182,"unpackedSize":1105828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7wdyCRA9TVsSAnZWagAAgs0P/jZq0PIEC62RMNMCqVaz\n5sCjD93DHtO+BoxqNiy/kYpAk0a1086NCNZOQK2qYfH4I9gQ3/R9V/ZeXyvj\nPRtFbou7XZiO7WBZIWaZUCIIQX8hBAWAV8u3U7LScgF5UEdhSQO/UyUgXByG\nD1seh29dVvzQt6E7yHUSoRMSChWXFqMvJ/q7wO0tTmQXtVUYNjfH2nGLcWvV\nBdR3MDR8knr59/Lk3z9d2fJKblqi9+BK3pt02XzmjnQEqFZO2rfI4hUbHjvF\ndZX+DzOkBCLVWKYCQtJhAWc8Kvy30qb+wU/0+Xw3SSXG1MSVObL1FpBHa0rI\n10wt5TQh25xnx5y8UzEyzJXpELp04IxegOTC0O9T3EQ1N+Jie2z9sxfPEVmb\nAbndmFw0SizUlERd6NufD7wSIkQleGQp6iyAkj/GftC6jNEkhY3/+J9rwS4s\nOzRb6DFLAO+SwqVd9PqDUiBWgvn+of4KsUzpP/UBL+fsXPJt5z2XcaQgd4Aj\noUuhsvc9tqVoP34JC6aOi3dqKmZc9GyDQSNAerjc7zelaYAwl82oIuXM1b4E\nZDzu/qvPuDoVTaA+Pr4DlkVIotr3DlE6SihuXLzEZ/UKYW5mZ9GjfV4QGdqe\nsS822owecznvQZpRpccLRrECVbYa18yEG9jPP1DdXksMJ6HEZpvRZET91oYJ\nGfJH\r\n=uvnF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE4HjKE3K4PyRiirZGBBXSQzQrBMho2Ht5Y6kH+SimKHAiActvJCCr8pUwGdtQ0l+QwMPDEeWbgnaelV1xoCz6xwxQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.23.0-nightly.20200621_1592723313473_0.16948208075737914"},"_hasShrinkwrap":false},"0.23.0-nightly.20200622":{"name":"brs","version":"0.23.0-nightly.20200622","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.23.0-nightly.20200622","dist":{"shasum":"4f2f26f9098d5e71b694d407dce503c0cbffa840","integrity":"sha512-kAPyBdyXNp3xTHQ6X/pi9N2bmhU0fUiy4yRIclJCFjVRdSNW3Tbo2aC1qegQ9OxyeujfXDepD29HPqVDOqIAJA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.23.0-nightly.20200622.tgz","fileCount":182,"unpackedSize":1105828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8FjhCRA9TVsSAnZWagAAjEoP/A5Dgep2bbvFfxXESsiY\nNXlRhM9zVMYFTgEuGRZDHw6qbWc33gAGOc7z+6u2fY9iu/MJCmTaHdtU7Bh9\nrmxjIPbvNVaOTxSdI5oQFpIXp+vcWeTrrVc17eRMyMgeQFaPwVt0f//Be+sl\n6f8kWa+vmHcluoSk9iJzRYBgvJm3q4992Cs1CTyZgwoOKKgQn4oLxLr5bJiQ\njOiYQtPEkSG0BmwgGqZFzSzHsnIdsS3V8jhd2nNIr/rwGOb0coJmGRa9/zH3\nhVZ8jBij2YSTJxPSOSleSKTl+xhz+zIG3R8f0r58Cpt71zBQiRSHNBXr0bbv\nULZAGmzGLsgjmyEi/W2PiIaCDMNetwhvAMDCwY8FgKcaE12WSTioIw1c7ynp\n7I0jqd9dlqhr0unlTQpNIOub/ZI2+mfylG/d07BBMrNQTZ/38J5Y2DKYWb/K\nwp3tlkK/sjTbTJpy41uz4W8UrDu8m2sxfNJ0MaT2SRsKQUlzORrbNXN/UJLr\nDCe34u+r9XPzaSb/0Xru1vONnybHTAosPcl+Uj4fgHw0ldO7HmKuJ3vBd66G\nEj7pNZHBbwVSslAO5pfWy80eh5e1cO8R2uT2NxFf64W41Z7mNjWIY3PEr1sZ\nsPh5hnlXkHrayTzKhn1g4Bzn52qYt5v2Y47XU7MBzJ3+RfAmFi/AilBmrB4t\ndJQ0\r\n=1dCF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGpmjdVLpCgjw4mbgZbkO5cWRfh/JPuX5ugyIxLfoN5DAiBrqVADP5XYAkFhqx+WMUx+sT2dqUrtbVx3vbvyX5pYLg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.23.0-nightly.20200622_1592809697149_0.7648950312506391"},"_hasShrinkwrap":false},"0.23.0-nightly.20200623":{"name":"brs","version":"0.23.0-nightly.20200623","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.23.0-nightly.20200623","dist":{"shasum":"b82e44c87879dd51c1e16ff03ccaf58373b712e3","integrity":"sha512-gXv4pQgCtyXsVuAzF0MGaVehkvd/V9cat8yZ0/RB+Rr/Ks7twWFkTrGr/2S8ljTc2PCZhm0F7olviDeZ4k6qZA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.23.0-nightly.20200623.tgz","fileCount":182,"unpackedSize":1105828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8ao7CRA9TVsSAnZWagAAZ/kP+QG60h8vJph8TAjEuOMj\nnx3weRDGuSrFrGIUASlxJp03r1WSi5MybC3tatxM19BYekLxr7T1OzFklgNJ\nhONK2CWoDy1KOZ77wey255cw99BMd5rZ6fEd62+IjnBNq6mFCjwWtI4BQAjt\nOk6bWPfeUDZUfDLWLf/gpnEje2lxfPNG+oJRwOHsM3tKPH95FkG6Lypr5BAc\n9tQX9CyGR32LZTnfApMjgIVEnZOg/0yHqxtuJjw2SLQxskqdpXf3xF/rLeMl\nssFsNf+SRCq21xwlncF6lrJCfudE6fIF3fkdDoXBkgjzsa6EU7/t7TsLD7ag\njv7I0HUpcSIho7eodhqsmSzL0KOb/HuDmlIrqJTFHc5Anj56xoaCUnN3ZTQv\nouxdUUqQ1O+RBj137s5mrqGeNDyScIaKsSvW5VQ49hYjEqF/2aechr55aSgj\nEHXoOiJ3oZsgFGXzVwePmhtW3r3BZxQaVAcSEGSCw3kY/bsEOmwrkEUWaBUL\nyyUzL7VX+dlW6lX+vR9p7x5jGPzd5Vf5DQSb014U1xIzGjm9J4Ylm7LAvVN6\ntIzfH0ppWkTRFZdIgz3gBCT34SdbNY8BGBWoDbSKa0KvmK+l4mwrbLa/mTY4\nlKm3Xp8vyAv0JDwQ/gKzwtrEFv0ufgvvzLHgb+oxREnqS+p8kQlB64WwnpLa\n00kY\r\n=AkrE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7vcoJ5HGmIsaFLMop9vbTL7Zp8SwtXoGo8w/zyGiBlgIhAJ+JlsXxClIkUlgnWEXlvGxc89iMactgub5EZDbgyl6j"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.23.0-nightly.20200623_1592896058974_0.7220443303948914"},"_hasShrinkwrap":false},"0.23.0-nightly.20200624":{"name":"brs","version":"0.23.0-nightly.20200624","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.23.0-nightly.20200624","dist":{"shasum":"2058f423beaa34cfc896ac7109d4db7bfc55ba15","integrity":"sha512-wyk8QkrUPsTEi/Bu0ue/QGYmNZMlNEVKjbMmohkH2sMfZmmLMiX+Icl2HWXQB9bIGM8sofuEHY9Hzc1hon+MtQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.23.0-nightly.20200624.tgz","fileCount":182,"unpackedSize":1106685,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8vviCRA9TVsSAnZWagAAvK8P/1nDqleuDUSQrawtfvl0\nQw7fDt7fAPt+CDRbqdvw0YmvCyjBO5lccxgTl84PClg0DpimkghGT4HjgElq\na2Q/TtvFPvtTHNfZS1w0g+wsfXQFXZvVXVtgW7kd+clVbqUBZ0Pq5W5XYOrq\nI6ba0S0mtKpJNolSDVYXqwbqeX/gPKJBgxEA+lgJCaQpb+F+hqZYqaWh0TED\nVeoMMp50Y78fMiQlwt6j1zd4m+yLMKS1uPF2YwZOEvOPnQ42xpmG2hd7/1lr\nvByjLXZkCErrbkPPj9mf1bBq0yLELJ5oYGULFR02Yrg1rKrSlucJQViCxJKj\nFY77a63SDEF/BbWKueykSfF1cBNhRawza+yGaW5tKXW3ry4hyzLLTGNvcx2a\no4PZLJ/RIWZnVcF+pGcovwibgG8/pE7S2QX9pdH1BwTyyQSiauWK9lHLBug8\nDNJFq8wezmxH+GVtpBvfs886tsihuqtTnCbVjqi1zPLyMV2UHVDWMcfeXonu\nx3mfksm33B6TcGYqgmvV6yW6xkXYCMCRKPwsafhyI5Y67a2yNx3EW/CSqzCH\nPrl7mYXP84AHgOz/rqQzyo1z1ooX5/Bq22k7GjuvIjZJguiR2QGosLYmvVrf\nCEDUAiPxwvZq6yQEHocG/fwXUmWp86mB1UPHooQCelkyapauajBv+1BStH1/\ngvMh\r\n=Bjto\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICTfgnzj05vLbMvWrAtr/7RKkbrTzd8vYnauKxrrh3hVAiAaaBK4ug+be6/vzUAQK+gXDgwoYXHPki7abG5+PSHAfA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.23.0-nightly.20200624_1592982497618_0.34539233415878834"},"_hasShrinkwrap":false},"0.23.0-nightly.20200625":{"name":"brs","version":"0.23.0-nightly.20200625","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.23.0-nightly.20200625","dist":{"shasum":"baf3c419ab3b088192bf051cf828c462eae70cec","integrity":"sha512-WRecJmqt4IxeFPyoAVfiBfgODWKymHj1b1j9AzZFNgwn9vSon1homOk5ZBbJp5GysIaUKRtJPr6g+7e1Kt3ciA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.23.0-nightly.20200625.tgz","fileCount":182,"unpackedSize":1106685,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9E1VCRA9TVsSAnZWagAAJZsP/2qWNSmEzLxVv1bnfOBB\nugop1aNEWeAU8w3DJZUJW4JPNjXj5fNjJpSdkZyI2nm+JrobVA9VvEYtZITD\noQ1GwydwgHrM5M+wIc7OlgWCp/c2O/RCywdVj4Ku+jMEVp31rB/Rs+pF1CsG\nLV/2z64dYXrUkW0dNA2YeXeUiwBj4ZuQTTpFL4S0amo/8Z8Amr3OlLwcjS0C\nTXQXGqYWBj1ZHzl5CMqwHnPRF8W2L8XG7kZxOETAL2K2udx8rxUYqkkmOFv5\nCGoba25+csymk7TE1BQgDdqcH+xvufM3JKnisysBtdCM6jw3pXZPx/zagwyL\n3RwwBrUM7fucz4pB5lOioZCMO/IKxon1pmGRfBVPI5uzumtG3kjmrQtgeRCI\nI2hoHaxbdRRNAR1SOoG80uxQHAUgYJA4akDhO5vvWFNctcgbolHP3UVDKIgb\nB9klncqWhDvp18k4QNzrYhHOza3BQpOV5tLmt8dNUzJn/NlMpQoVY9ig2lte\n11H2QN7etcZPW2HOyV/ZWJRmUscsLi9IYSXBHrabkHnXpCJZ81C94XUQ2b5P\nwLwPSSAvNu5xg45044oyNwEAxx3+9NmRiIsIZCx0IdBkggh6vdR6qyS+lCSj\nX4w/ksaC3fldQ1Ro9vJyqapZaVsx1vbmMnwhoFBFnG+hLz8O+gMjpHGlcidL\nqzFM\r\n=VSTV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCy5oGhnQU5kODEPIQU2ITv5nnXngY3Gs+xCjb8Gt+opwIhAPtoKrUNvA0ZTfiO3tFR5q8dBl0Z47Yggo/H6uFwnqJy"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.23.0-nightly.20200625_1593068885041_0.2454709994281632"},"_hasShrinkwrap":false},"0.24.0-ci-sanity-check":{"name":"brs","version":"0.24.0-ci-sanity-check","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.0-ci-sanity-check","dist":{"shasum":"3816b3f5c709ab2c975f79b55c257abf50b0a715","integrity":"sha512-8FV5axlxY+XOMdW+G+FXLh67Tem6wFSxaD4E77bzECzacRGkXLsUcn2D2AZ481SZGw3HBNHh5IXJvb7FNivmtA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.0-ci-sanity-check.tgz","fileCount":182,"unpackedSize":1106709,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9OaTCRA9TVsSAnZWagAAQHwQAIiCuHsTapiuTbOSKW9M\nefb27FEXSPrv9L008oPlT19Z2uDPJ2pCqAKhIsU6+cv+FHwOiiX4JK1B1GsN\nbGJ2X3iFhZ1RK2/7uvsWOmMxHGqE2/0qNLskcL5mV9/5J4xxwedAlO/bqH72\nG8Hq8pFnaswqQ7yG7mnVHDEb4fZ5Z6W/yPCXaG6/ibLr1dIQULhAH+3wdWUR\nVgyOG0kdg0jssaXE7pnuLDRKC8mmKh+p//51LFrfPYZBVeV+8u2MbKhRkh3v\nTGPgPjDk6cvHYcnPUyHKxWHWULxVDLL4Wjas5mSybCdmc9FMPZdUMsy58J46\n+cNhOUc0U71p2XSz/8eoQ11LCuFlziQ7Go8VLQ0pk4z4hWW/6Gl1MBH16KTS\niqZRSl4GGbUdU2kCwr2947c8hm9WgbctKLbn5aD50aM1YLOY8rWns7rz8HJM\nhflUK6DERwWoGO8iAdHpUIu5kgWrYN7tD+SpVZjM5a6jq0QHInDoTv7PqVf4\nDvvNWNLN1b+y5n5QkpmIOSFXDgeRE3lr4lL4IIK4YVkZR2lfP0M8xScoapnb\nfyHbNALjr3aKyh4JR8Pqxi6ky3uLSIJB3vCrpGAIRIWfCvc6MPdt/G4AuOki\nHaTihSv5scG81DTM5o2t6trl/Hwj2VoYH9FhY8HDuZ4h4ONz5LEiOd3nRepi\n1JHM\r\n=hWbZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAe2lXdH0Pve8xcTO8FHTKwHP9omFtEFcN8Xl7AHlavlAiB5fZyYUZOVOVYTnq67pDAr3GpJsFislxtpwx6VWB5kvA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.0-ci-sanity-check_1593108114460_0.4481749038075913"},"_hasShrinkwrap":false},"0.23.0-nightly.20200626":{"name":"brs","version":"0.23.0-nightly.20200626","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.23.0-nightly.20200626","dist":{"shasum":"f368c1b743147dd3d43cef75c26f23456f1f274a","integrity":"sha512-5W22ncAPGhDbKYKR7j+H2bueqoYYz9xkPAfCBCxoS2AkuDKRrNChaLZON2L5EwrI0pGp5/u5z3Hd7x5s11NRRA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.23.0-nightly.20200626.tgz","fileCount":182,"unpackedSize":1106685,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9Z7DCRA9TVsSAnZWagAADucP/2UGdgCNBk8PqdkHF7Ly\nBxkvvKllI1/CzZsSef0Cltasdhi+yFl27d9k5KPLfXvPSAKoVfK7eS4+gRkD\nyTDH7/SRA/uDx1RgByoMRks3XR556eHpJEbXFpSyTy/SNPCOuIMVKpBJU7UZ\nToWS56lsrfzkLkl3eWiFWMtYUbxNUVgJ7qCAfDq0CyT6aptinQkO+oeflCRK\nePvJKZ+KEKTUWJVezuZyKTwhpOarIRiwmCNRjGj20+b8fPvKFFr0qJJ7NYEl\nM5hYisNCjVkLj41iJ/cVfg6YKBC8Lw0ixr85m3QtgypGv0/KEHLw5ivZAcpP\nrndOTNXcmYbFNZ19izwDmftNzBpatSGKn/ldE5QO/eQ09DwMKGX4J1EolSMW\nzr13VJ8bVa4yhAXlGHurOba0nGI+zODI1m6tbEadPcOBcDyFK7oHEqTKR+oQ\nUibeuCxLh+OnwkwnBAywsmMgSbe6DFpBiETdS7537+gPKzDJ06iGzemy3wB7\ni9iG51PSUNE4sUm6V7O0V6uffY3Dr5ZDBlCRsaXIT0cehf9GV/f6WQws/ZE5\nEtMsk8kb1M+obOKDTkZzIOzYWEmYUwFbKFKEqQv+S2I0lcAZ1IbYLVlkzPru\nTFdJXARrLhz9w2bR7DJPkcKuerZhlWVCaJ1uSM6whzFVmz3tnOIc3ACwQy/g\nomt9\r\n=sfwq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHJpxE73q7/VesjZpEMLsJ1fzO5r1pYBFjpZ4kVCGMXeAiBpma1xMxndRtXILMbp+xon6eBVnTMQvhpSdPhUadW0DA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.23.0-nightly.20200626_1593155267195_0.5108918092926309"},"_hasShrinkwrap":false},"0.23.0-nightly.20200627":{"name":"brs","version":"0.23.0-nightly.20200627","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.23.0-nightly.20200627","dist":{"shasum":"2c94187a6d8f244e716f652c83cb96087c4d7225","integrity":"sha512-YPXDyQch67aw30CoX798pad01RfcYI1wUgB00HFSP2VmfUsB19ymQ1cnPaxD3qSuiMEW19q0qAW/jp10NNqe8w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.23.0-nightly.20200627.tgz","fileCount":182,"unpackedSize":1106685,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9vBvCRA9TVsSAnZWagAAK8kP/jusW04XFlpiG+Srarz7\nQORHPOqno8kO7pLf6EX35459wFKOiYlFeqXNq1IJNhiqpmBpAu+uEKhl+I6E\n1HAH/q+CbTZ9zSgOVcRhKaktjel/Jxt2hl7MMbGqMQRnSQg14Y9bDM9cBYTZ\nNdadKsfJ1tE2/QIanTL+qgFHkyOHJFXoY1RqJLhye6jfFuEPZbXA6xMxozcJ\nYQX+wr7JStB1UJToeZOEZjY7c7JHVPkC4IqZkStxcQqdTj0BH48WmQYAwAbm\nEXauourkdCdikSTpUIZXkZ5qrtulfW9hpPKF5cKVd6nkbinVS2EmscDkJWwe\nuRSxU3zAsjF9YXcjjEo2EBneVuEaj5jKrmUh604TkLMPqyTiUNLjUlbd+ZY4\nONXNOiUosmbOMX25bZVMphGMgjrKAqK+Q1qbZasbUg7ZMQAsTt1i4t1+lhWr\nMS49YWKYAHlwr7TBhbmHSxEBwWZH6UXgVg7QhQALMYHKnPe1TUKg0MzFUpUQ\nw58beskTpCC7UcVXrj555bqKIPVThTB5+FaQt/G/l7EC6wZ+QspQoztZ2TPF\ncfWA8kK69/OInKQvCZ7Px38lpiaaYO0U0FbVi+ZoLT0ThDa0m1vBOv0kL6Ij\njtKOTqwkwMsSglAvDX5anhOggD7gmPGI5MtoAMSfYkLPaCaoviw7XAbi/XZk\n3Our\r\n=wulo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE/Tg9Zc3C+O4rSICWu+CdUtB40Jz4iBLqkC3h7Dg/PbAiAmLUrQou/Hd488uyhlJzgEwP/oWbXFMlqG02PkBPHbIw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.23.0-nightly.20200627_1593241710717_0.17476339752601633"},"_hasShrinkwrap":false},"0.23.0-nightly.20200628":{"name":"brs","version":"0.23.0-nightly.20200628","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.23.0-nightly.20200628","dist":{"shasum":"5e25fd0a02a44b52608800f875498ac54a6bd66b","integrity":"sha512-9I5eWj9aeTJbvZvtxQDogOrsHbKwyfZjub0AEiIK/MCOeARnQAowHTm/x4nJ8uMM1Fv59M6X12u0RdBwRypZuQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.23.0-nightly.20200628.tgz","fileCount":182,"unpackedSize":1106685,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+EIbCRA9TVsSAnZWagAA7pkQAJyajclfEGVTUeLJGZ8F\ncpIllUl4f2Sgz939+42eZITlLNZiEaA6xgRdQvfjk9WLwAnkXF+RkxLS7evl\nnMCG6UXJcBhKT1IRkRBu891btIJrRI5S1DZcmd6uLyi99rqNwCPBGgzlJvpU\nwUiD/iKkx4xbZtQWowzq9ne5sEwsRSFBDqY1Msx5eoLxG/Ns6O6Ir9z3lM8r\noAD5iiG1wbsvQlbhLPNjdDHA5LiZhE4xNJQsoumxDOnxQGb9LB/MSphp1L2i\nK7hJPeNgxElcWZUASyZqd/NKXwhQHx8azU3h2bW8BX2u50u5ixAp9DGifv40\nS8TYNI2SmUeVr7yX53mnopbbnHCtFRIvSExvQeJtxzDpmC4/Pb4MScAV9Yq6\nyhfb/hRJE7TsEFyJK+KmAyqLU0aDTArLdq/kI06q5IYxLgBGu0DuObwa4/tU\nq22n0Epbri6lkXDVQSvZFF7TdeWnq6JkguRceJKRnf/b9WT/1q31wq3UdpTo\nfW4UhVP+kIJjTHGQW14Gb6V4QnCwhqLovfHvALnjmobPoyuh3wcia35tjWjU\nmv98zOaE/hBBKCnp1fZEsdiBDVsgjA2/WODXp2iPnfISdKzpMWIakRC4JhxC\nsvXrmS+5wv0tWXD4CCJSI5ZNb7xE6JssfgVA9cwvEaD1A+ujbFdKpMS5GdR8\nNsM0\r\n=eXot\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH+a1VhbDSN3X7bf7bg9yVNwbi/+SyCCqAwZ17oU2hz+AiEAxsFOIa0HDssUhGyqO0UO2B1FTo4KXfKXAkbcmcIHO7g="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.23.0-nightly.20200628_1593328154592_0.7425085467572565"},"_hasShrinkwrap":false},"0.23.0-nightly.20200629":{"name":"brs","version":"0.23.0-nightly.20200629","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.23.0-nightly.20200629","dist":{"shasum":"99dd93f3511d121f57801ded72c958338c1a7300","integrity":"sha512-B6HWTnQz7jI7PCKvqa2pALXwpmjDYyh5WJrY8t0ttSiaukGRixCqjSm9wMDP47XmPnIFS62KtvXwLRgrpS35tA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.23.0-nightly.20200629.tgz","fileCount":182,"unpackedSize":1106685,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+ZMvCRA9TVsSAnZWagAAktkP/0KSYyj9Zx+WHMSkTRmR\nNKaPjN6OnsdfPNzL0N87e+kH63Ws/cEpUbfsIvx0Z7aKS3F7tNXlIxIZGu1F\nWwhKMBwBs+47wJOLjhvV8LYAsey1VTIPNKE+i5fnz229NDR8Wl7PtQXtip52\nMiVqJs2up/5qESPtNQ7w9rRZMvTaDMx3Rjd1d4/IZWpXldVUbc0SSI2hClJ6\nvuILQjq26B8QHno0V7lFmJStx4xN+RdURSXKCCDtVHUOapwn9e7WEAJVlJNM\n/g2k7kJV/WqrhAP0QYKrC1R1mUW9XnRsaLJWTQ+NbT0j50A20Zw7kOYmxUUG\nePPO95u7QXzMPYT0auxP+w+AZmCO6gfiEyYGO5CNBVkG7Pu+MvGdG030yTNn\nxCIN8qopP+antuL8JlHBMFycsD3NxRRueCfGBykzlyrRSpze9HJjOGG1wTX+\nATx3SR/v3nO8Wbvlh8yDGMHz3m/zYm+9N/A5ZbnD/lovcSFMZikyLuyvFF6p\nThmneBcENWY4JclKwf5RLKHGNCu8+9DU+uLkTFeF3MewbAyKlSdLebk+ymm+\nTw9TxxomrBzpv8IWjt26shEoHnaV9NnbFMg3wj1UCJhBkPT0sCnkCmIYvZTx\nId1uDxsyfWPml4co75qYieg/6l877eCRcF/kB9XXJMz++g07RMmTp5eX+mxC\n/cV6\r\n=xith\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEXzkprls9TOvdr7ksvQ3Mji7P1J4wuR7vZCRNvyXyfAAiA2IDMyMN2xyGgGZ+pMHHtc6LY7fbf35iMp5fKBeU84RA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.23.0-nightly.20200629_1593414446818_0.14803913425906146"},"_hasShrinkwrap":false},"0.23.0-nightly.20200630":{"name":"brs","version":"0.23.0-nightly.20200630","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.23.0-nightly.20200630","dist":{"shasum":"8b2f6e5454a0871bd6048ce0c708e7227144b198","integrity":"sha512-XRaFgzuJPgs19HZOolBhPxFIP5E7dElR9OxhddB3EhrT/cTcEkrxgBfo/cqTs9r/TMqCur8LN7hVXIIfcvSkDA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.23.0-nightly.20200630.tgz","fileCount":184,"unpackedSize":1108892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+uS3CRA9TVsSAnZWagAAu7cP/0p4CqK58hfaRKPgw+r/\nAlyZGpYxyNSy9G423TGneERiUPPPuH0lPt5uFDwyfp/Fd90UvPlyGb71jtTo\nAeO/I5OcN3E7NJNcYKvFDzj/RV5H8mxCj+6ninwy4jnB1A7nLdRqYdUOCtV6\n5pgxCHRyx7pt1TmmYdnzwnkZbnC6Dil0FYc9OGVuhtRveNotdOwvsH5JKuD2\nV4fzHSC4m8fAjFuI+bdJPaIE00g9r6FnRoy1vYhIQire7lOIEINzJfQz0TKz\nSwDQ5E7FhvP6GpZMRtJsDf6yar5Bf38h+i1VIByVRqgLP+02ZkbD1hsqYz6L\nfNcJrC0lTNlh4Fjznn3o6MiUkXgxaZAx3MS4DrY0aLBxI0MGCOUh0QgqaqqX\nzrHMEh6WPfIQ/IwOdmBxir7uuYnmPvlz8Vsqg8Jvmhm+TuwidCXKSd/6vEw1\nquXCFPpUvLegb5NLqPOUcHCv2wNJq58cASqUIMPEM46+o/2uO+qEuym2dHcP\nVyfHBvMkSFEe+rXZ4F02EfCUP6zuTADqe7MQ+B9sstNLUwAaFZ1XbDnm82hO\nvYEduyBCLV+EJpHJzmgsC+lJ47MfHG5si/DfWEr6j/SrpWSkCKJ9tJnF/9Ib\ne38w43W3ctniGJhNbywJja1BjfbN0xbcXS8Fk0ZSAgqGwoFFJA/zav/mtjo8\nerHQ\r\n=l3C2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEg5adE/YY4y5mb9ygK2CKz0Bl7/BB2/Z6pk2fO4o21TAiAQkZ+5dDFT7Rx6YO/wm7min5JFpWctzCImhwEoJVhSrg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.23.0-nightly.20200630_1593500854874_0.5112373335497113"},"_hasShrinkwrap":false},"0.23.0-nightly.20200701":{"name":"brs","version":"0.23.0-nightly.20200701","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.23.0-nightly.20200701","dist":{"shasum":"ba9ff2498a12be3bbfef9bf92a866eee383e9316","integrity":"sha512-P5QV9MOPOAjMf0eH5YpW83QSA6nQY9MxjB0z3rupaXM86V5C6cZyXOGdTu9VN7rW4/BPdmZaLxukeyF0EthKTw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.23.0-nightly.20200701.tgz","fileCount":184,"unpackedSize":1108892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/DY+CRA9TVsSAnZWagAAGqQQAIgZ94M0zv03IEHGRfh9\ncub7j/VhsgjANaYhIejewwRQS0/jPcdpnA8ijdKhylbvrg0OqYyunNeedWap\nT1TA9QsBQkVdaNbP9ayV+wgYwEhGdMmB8z34UwB6x3moFxtgppk19LaThxG6\ng+K81QXgBQgIusHUN4xDhTG/mrF2wBq6WbPrEr/jol4thJxjphCcObMwaVsz\nXKQ3iawIJMdHBDBYEt5Q5Zi6fJS/6K/A2FmGuPB/1+4J9n1USlJH2T1z8CaR\nq2koB1VO0ZnbZwtY8Co7sEX8EIjXoFhbHbG2rmMt/z61AiGr5H5Io8fGCEyE\nI5w6IpMo44Dspork/pZruw0xA8aoJRNrnTKtMGB+OzDt86s5nD41xK4MWNa2\nfOPDiJm/rmXNcAdJ8AvbJJJcTBBaDYMGC1z9qevxSgZ+hNKnDOZPQPHe4IVQ\nOQTJXf4fFoCtkR6H6T9nDVqe1SQ1q7Y5IraR7c4LLfz83ju7fbL4ut1TmT/7\netCosOYYxDy2xCNcscXB5aN57USQp+ywUcfdoEH2VrWyY1gXAoRr6S7pMtP1\n2H4i596PTBjQloRlUCBPnXM4+oyhpL0b/blMOzrnACrVqwLhl3j7xcZ+x5fB\ny5ORwS7lizRTvgNqboOdh0P9ywJLXfOp1K4iUMgYP7Rrnlh+PZiu+DaWQJyS\nc3q1\r\n=aooH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE1wGjWEUvT8I5Uz4wp1da4F0pmj1roGESO4GcqrVluJAiEAkiOedUVqphZaq8QsNQw/QRos+GmCzCune/sMNGMSPQE="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.23.0-nightly.20200701_1593587261686_0.6597220034138478"},"_hasShrinkwrap":false},"0.24.0":{"name":"brs","version":"0.24.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.0","dist":{"shasum":"fb7c514af916254ba7eda38fd92ca010910af6dc","integrity":"sha512-6d/id2p+WM14+5aSLTrso7FdoiTWpOcPXytWcX2U6IsEfNoRfSzDvZk4sNnCxXn9QPVFaRqC9oe9I91J1rVfVg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.0.tgz","fileCount":184,"unpackedSize":1118644,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/RGHCRA9TVsSAnZWagAArUUQAJKeeqx5lArRl1oit3Ns\nFzxFPFHVUnK+xODnGONLa31I8ZJw86hHdzFdZPDshB777NlzobStvvBL0Iha\nP+1Kw2zCUhYu64s1XjMCneoWF2kbzZKUp/IJnuHjnz1oLmKF09B24hiC9vMs\nkRzDP+1yk7P6wOraBZHUyRDeb8DPtAniaw9Dxc0T+lODXMNELc5N1oByvKQW\n/NMYzJvrTF60wSBczVnkDVjdUebgkvgXB8Z8zxMbLTzznU3zhZLfkctlla35\nvqge+BLsMhGSKWJs6m038t5vu4BuA1B0O0jVxVY8SvQJRoWMFrjKvTcFTMx4\n72p1cDswADQrzaMfbc/2h8IwUmLITZ6A91rcUZCfwfru7PXLBiNb6eLZ1w0y\nfndy09pyDMTGiOdLus/hUW70XQ4ctA4JKAwVlwDAn97apGuZRKIAythciUnT\nCZt6Nz9q+YXDDyiQaKEZVIq6iTbFpYZyfrUlgyhBtD6tjbKANaUKRqmULkiX\nkOzGotl1pVz/47xcbeGQsvmwjXlDNFa8p0EY+9L8g8DAWm6amJ13bQuSN0xs\nmB5JVVjag4MoWDm6LoS3QcJMxcdEurfFfmDqbSi0VXPc0AbRz2tuFTLmDba/\n0PSG6P2NCfx7snJYfrfkF9s818zAz/pr5Da67aDZTh6hjFo5TafZV8QwoyLX\ngVBU\r\n=32Xn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBwAOh6ILasr4va+lpxbt6DmVDsSoDi94nnXgtl7rptAAiEAo9DmvOoHmuuytOZHF/M92Rmjbh4eUYH8gKbkFC6sNX8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.0_1593643399090_0.7506251610614103"},"_hasShrinkwrap":false},"0.24.0-nightly.20200702":{"name":"brs","version":"0.24.0-nightly.20200702","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.0-nightly.20200702","dist":{"shasum":"a7cbe78b19476836c572e0ec18ab10ff4fd75cee","integrity":"sha512-idisja5QUcKkdCB66JAoNIrAlppoVOhEOOhywBjCDFht7vEnP1XFN+URZT7qUUyFYSqpf8bY4bDv+9rFxgvd9g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.0-nightly.20200702.tgz","fileCount":184,"unpackedSize":1118661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/YesCRA9TVsSAnZWagAA7FUP/0TeIaPVP5Y6C5UwzAcQ\nwnM44n115v3/rToMPICbgCSceTo/WiGnFDnKK7EEQDtTonec87J18Cch29lr\n+cwRRf3NAfLlHdmeJbxPK3Ya4t3DK4rD8j0lFMg9qlCdlNysotdtTeb8bVaL\nkQUTg5h0Op6ioQT9fl1UeW7S7PNQpiXwo2ayH22rjsmMj/S6L4Uxjs2zaNHf\n/1GlZ8sbpDlUF8mAd7iA37DxOHlbKSTNAcOW1iinZs1umvE9VnNj4zTOpSLY\nLa21l5B/wgf8aKPTDxgvocOshWSwtGV7B/B+H678OV3ShdR0+PTg1nbPy5bj\nll4HHnfLCTRHoTCL3Z8WjpnyhjbgRQYuXM/7sQHqhgB75B/9rWeGcMTsqxSC\njmcayTJdUZJa/4g3Aw/ke5rB3gwQeHTrJogwThiK2Wi8uyXzWom3Bkkge538\nxRHbSPa8uEwEyt73oKD5eDgV/WagZVhpYkfOfANrikfnG9UlykGijxomNSp3\nkkGpoa0D+FC2D4lPeNh77pzHB0zREpG49pernXcFpj+5MrOscuzsiV5Ft5og\n/pzxndjjEKV5bWMkigm17CYeOMU/QEtZYoJMBkI7z3H0BPlWy8+vHxhuYIuX\nh51Bw0ItWosR6tSCoyeKs2oWEyR1eTlBBUKHHs9QgWZOhcfzUJHe/C9/VU28\n/EFy\r\n=XHgo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdOLf1b4KVkbjMm93oC30arkyBztj6Dff+9633qbUDQQIgQ1PDwJ54hdvmywZnYBeDagf1SsVIQkcGYuskZwFm69s="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.0-nightly.20200702_1593673644229_0.7092388603003161"},"_hasShrinkwrap":false},"0.24.0-nightly.20200703":{"name":"brs","version":"0.24.0-nightly.20200703","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.0-nightly.20200703","dist":{"shasum":"f314f77ca9e528c4191b55e6a9ad855b3ec3897e","integrity":"sha512-K1ZKOsI4QOhWiEdCu3ORjqNmoOecKadzKXWPyIowrOJL5qXpnPJdtKxzcZxV/pa3XazkDtvyk99WgnQCKKBZ3w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.0-nightly.20200703.tgz","fileCount":184,"unpackedSize":1118661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/tlHCRA9TVsSAnZWagAAU3oP/i7gr8BKeUyxyEFoEQy5\nu/58yM9zGaBU63mmG6o29/aJ9uGdhDHfv+h7E0/ssLK9OmxBO80FUJFkDPxs\n5zfAwf18YULY9irQfS6QUPCgZlsbG56TsmxGBLMAFZbOjJc+E2F3VyzZklNH\n3b20M1xqBO4PWdOhVaKCCIahst84mzcFpPqazEev9J1am85ksB7geDQOW7ra\nTdJPFZSIx6RqnHh/DyHbVzU63jgZ7KHOIJlZaOzevAv584zp5XEjRnPLpFRO\nWj7r8ziY2Z2jWveLWnI5kS86DuoSnZ86X2iUQqGWB5BvpMfPL3XHbOaOrw5d\nCiMus/MEIgK8bMi6q61po+rCKOTnrOjKqGuyKim8Uu0q4iwWP1WHuPm2lyhw\nYovzzYXK6QA8b1RUHAuxsxhNyO7Bx0BF4EQz7j+W0R4Ty+D+KxO+mir+Z9jE\nSyHsZgGBF/PcnQSmZ2w9CzPmOCtXXOGodXcQWsZ0SOVu3aFdXq+3WDLRt6Cf\n6W2NzSI+F3t+OOz7BN8f55V9DGJY02kXU5/B7aPOHH4LSjiXvW+5Up99CBPI\nNLLHpLgSIZ3W6/hZRbGI2EF6HtECv+Dr1bZkjKwSmTa0FEB1RGdBPq06sIaf\nms2YXtuWZcqtAaDSTZ1ZCFBhkMcuulDpiahxhjn6jLgUcDQRbNdZtUf+zkLS\n7GTw\r\n=oh9M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOH6MV7wrPMcxqcPmG7KGTlKSXcmNOSSk6pB9/DRug1gIhANGzIxNbgLb5yE+B/rZ8OYuywtvlvZFKfxBnMKLkkdnV"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.0-nightly.20200703_1593760070557_0.2661086542287985"},"_hasShrinkwrap":false},"0.24.0-nightly.20200704":{"name":"brs","version":"0.24.0-nightly.20200704","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.0-nightly.20200704","dist":{"shasum":"e130da14af90147aaaf142ea2cae3bc320f43877","integrity":"sha512-xq43YkNsJ4eOiWY2Olwil9edDeJCtQZOUn7skq+7iczA9romBBOMLUUWjK4VhS4gvUu44vYckpvlJIw4lQEvRA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.0-nightly.20200704.tgz","fileCount":184,"unpackedSize":1118661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfACr3CRA9TVsSAnZWagAAGusP/jn0SnY314RWo7mDBsvi\n7Bbx7qMVQfqVda3VSgCVCX4wO97e6SotLEKG38yrftnKJbnuxmpzxcFaHxG+\n01rziqygSvpAyPTVNQ7/mmfgKR1/wwhT0t0dPbK3P/lufRiP8pE03mqFqSfZ\nyU4CuAmkXjbVutDXF6Bafnb8/oYU5VIS+vRC24/N2goWYqhdSkQf+0PbprH2\nNI0JENlrGBuw/aEV09NLWlYzPUhUbErrZTLc5ptBKMGIIwA1kzI9fKXYcSpc\nXjSwDXKtXOwajRDCZmQ2C6WW57iXU22qhtJUqjKneoSxGRkUK9jJWOQa6sb4\nHfiSSi/wSz6PyLoODuA7T2Ug972mRX5DQvwbn+9N2ikxxtWv3BmyaMeNFhwf\nJaNNq/xytRzi5fM5A09kl9l22RvVujkmL1cf/U1y73QzKLoBqFVzxLk2PJBX\nrGAhC2BUIgteCqQdqu/EMLRGfdh5Br5BFM8+A+2Q6c5lor5gyONV6jrGiDEO\nK7CEecmJH5DOVGz2T4DoZXTWp0XCFJwU0j7h9ETNApuqfeGReD0VE0w0teui\nNZz6vLbpfB1g31YLDM+Pl2HTD7FOpeUuFgUUf7v9DhDkiD7sPjXr5D/eisNi\nCISk/fE3XQYVDUtVFOasppQqcM+FsB+opFnXBlvXuUywmomxPtpmBtWdfJNn\ncHSW\r\n=iwMG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKtcvdmhB8mBJkKXOEWKWall/nKQAC6TGb/NiOsAKeugIgNpdIs/N0Dls5syPQNN1Lc4LUwxnQR7M+WM0OeMxhPcE="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.0-nightly.20200704_1593846519134_0.013045728134457812"},"_hasShrinkwrap":false},"0.24.0-nightly.20200705":{"name":"brs","version":"0.24.0-nightly.20200705","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.0-nightly.20200705","dist":{"shasum":"76e1d21228d6adebf00bb3aa520e2b3951395cb2","integrity":"sha512-MwgGDSozeB/8DdiFBIU1jBofqnDZ3HWZZF1DAEB5CP/utY5dg+R65TKcbxdM9bOOlROtelvRXybiPLJmDRGSZg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.0-nightly.20200705.tgz","fileCount":184,"unpackedSize":1118661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfAXx3CRA9TVsSAnZWagAAg20P/j/y74i0/swpRdvSvKUC\n3smR4Kr6St9gHWZLjn9l6HngtJnRJY9tioLh1yVn5N5zG/Zjv+Ak7h5r+PEs\nNOtZ6hbdU80A/yH4dg62dlg0owkaa3SOgoW3M++/GP47GqkpKt4TPNNqaHuY\nNtl3d+uO8KEtFYIolyiaCMF+Dr6n6sCn4eP2RRlwAMwd4VMNhtjI6MNl5d06\nbZQeVgj1cu0a/ypxcPm3t16OzH1whiDNNIza5vCa/TUOt8oPn0qkySOzv4+a\nLqwffLXeR3txFRwdu/s8BqEOdHZ8YdlqYbeNpz/cGJ13CApAESeLLVzypPm2\nzBdiqMNw+WoGWtELpFFOSNCxrlhc6Ofw1ZgTHDUAGzRgHp69kL4+yTPYKxKM\nEUcQCjgrzF3xA8miAynLSY/uLV+G8hQhV0NMqpskivAk5Oep6l0qtLb8Rbcm\nxdY/EQYcYdEvWfu33Azj1Wk+rv79DAikOK/ojiVQa1ro3lI//RgiLz4AxFjE\ntP/4rNo2/qSrzPY5I7IScdMmOJrVuRJsUspcFmKaC+105FuSeaE1STMH+lpb\nvWS8zSe4JLKaRC2Xx7aYYBzPGy17NOTuzQG01pTK8YLuNnVPrpI8cBjyxkcO\niK81JdvrQWbNi/6wb5iYT+dXnDWrxLH+tjCuq0AwpG3n9V02YcQ6AShAwRpR\nYMH+\r\n=SwbN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF2gv66Qx2a5a/F31oPgUlK7NVD3EDLekSYGcl/wiEESAiEAxKJop/RCyZ9GmWQD97nYWilcSe3+AZZzsoXhO3A8BMw="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.0-nightly.20200705_1593932918414_0.4980996186068727"},"_hasShrinkwrap":false},"0.24.0-nightly.20200706":{"name":"brs","version":"0.24.0-nightly.20200706","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.0-nightly.20200706","dist":{"shasum":"e535ed98722c5a009f946ef198181f55f20089d1","integrity":"sha512-mlO2h3r4wDh68BerbDPC0LxHydp5HmvweASRh5fhKzvP2F2Ni8IVQBN6PmgOF7zEYvfSX+vPjHNbRe+fDy8w/A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.0-nightly.20200706.tgz","fileCount":184,"unpackedSize":1118661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfAs3GCRA9TVsSAnZWagAAxkAP/1wFrCfn2JBhFXLew4rI\nvvJ95FCmELHHm6UxlZw2fmq9t6VcQfFGo4KzHCFkNEdrjEFjYDVlZGHEYoOc\nBC9/1IjeK+tD4IxkSp+5GvhI3vnYsoxf3bCuBou70jcAcq92yUCZ9N1OE5Y6\n0CQa7/N2J16Pvk9iMpI/XalDyIkjAnlBWdtsSgAGEKvk4uy8LZ8SXU8obI93\nZt28X2DqooBp8ijVBkewIVkEvjbwQYel8DquV9naDb9P7z9dxEh8qRb5ZZuL\nISByTXgay4RHZlaSz0fr1UjCrU9C60Ji8tIV/VVWVFovBv+cZCA5vlJFtw69\n3BuJfGtsGW6oWnFO1Io7Bv6IyhQIjWf5m9pvGnxWSXDgXWOonxU3fbTln7vc\nScVhkmG/TT/EjbDFh6TvMy3bIVPf7Jl3iuEMNEuCH2QKXFH1rHbSzgG2Zj4s\nKXCQ9xoM0GTQryXik4Sg/YND3Ohy4l7JjrP8DTu60B0wh+c45piMA6rWRTdV\n9S9m924xiNa0H/L0EBk5/jstIhj9r/z/2iyTf8iNXopooChRy4d8EXqE2o67\nS9vmkGBEIljzwkH5u3B7CrZ1+LQ35JPkQ1F2H8VcXf6K5vee6AKQhxIGnDHF\nWtniOFD85XBUS2AKTEbvXtwurb4If++TGh8cclp2IMOfuLRDNt054BhlGoP6\n+27f\r\n=6zSj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9B+eVKsbx97P3yy/CuCRB6Pvqz4ol1UbNEY4yRbdPiQIgXJvhBhKN5iv55EDgHX/J75+l+OlCiaxAPgfx7+nKirs="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.0-nightly.20200706_1594019270280_0.23765963288420866"},"_hasShrinkwrap":false},"0.24.0-nightly.20200707":{"name":"brs","version":"0.24.0-nightly.20200707","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.0-nightly.20200707","dist":{"shasum":"0c6bf6893405f42ed34c4192f141fa494360eab7","integrity":"sha512-CEx4iT1Rb/VBayVyuoVscssS30sVCWsoIt5QLXsx6zmRG+knIMcY9xKuOYC/UVP1HUVDBVoimfLo1ruErTxb2w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.0-nightly.20200707.tgz","fileCount":184,"unpackedSize":1118661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBB98CRA9TVsSAnZWagAAiHMP/i5s5RtO2RsnKanpdJBk\nZMRM9mYiyvZdcqESiVm+pPKWuUvhagUE9gc2JEcz84eYfL7MYwE+q/R6NZ2I\n91lTnnMhSe+R0H0Ca0JPlsGn08aRrFdZVtn345G5OcH1SZWXzBg3fqebMVwf\nduYMoHNAgO4OdXNp4WfqTYb56d1sJZoa1vWop8Il4AOArUj8mRNiGGQTJqC1\nD3X80tBoSSaK7VjiJEc02QwscGJ0ctQqo7sO8VqJYbjRbhzQqc3Y8iTv++CB\n3OxuMHB8EIRWJmkhKlw5hgWtZ8pgghzF8Dv4owrXZjUTvudM99JG3IKb+NO0\nd7/UUqB/ugmazm0bJxhi8Xzrkp5kEoPj3nx3J0VZZ8MJE9+kWSr9rTIwQu2L\nO4HA78aWdiO1rnglqh0P6u8ZqF3cjxG4G6gYmBLVv8HG6UYxNpMQnZro+bU0\nL2YagqFmE4teP1XEAWbYlynasYZPFeRw5uD0F1c+L6e+buhYf1wdwsDz6aFo\n63T2+wCm0cyTFKtkEvay4PZqwTTcIjHnDi1v0UeVxhRpca6L2vjNqRBndPyG\nus/LdJi83PYKy0kFXSsmfSphwlT5cNDRRexGwMpWc6Dl4g0qUAu9t11Pvz+k\nDT3fi9go4f/iLG6Z/2tcey0pZ8ZDcg9nBYzO6S+hkiL44eMUuJHGr13dlXwo\nzh9m\r\n=RLjv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtL9TIszdr2ZXlH+gwJbpH5VZoJnvJtYIHFqZvLy2vYAIgD2UivW7ksvf2utidNNB2fe6e+zyrvycvlYxnEPEl7io="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.0-nightly.20200707_1594105723832_0.9668681345997285"},"_hasShrinkwrap":false},"0.24.0-nightly.20200708":{"name":"brs","version":"0.24.0-nightly.20200708","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.0-nightly.20200708","dist":{"shasum":"c1c30ff4bae82425bb65b65c1de9f4e7515dbdf0","integrity":"sha512-wvhUVjCOhFGsD6IkPLHB69Q08t7XiT7066hcxM5QAbMl9RHXgSDgcebjG4spdDalfT3zIT1l4G+CCroq9y8QUw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.0-nightly.20200708.tgz","fileCount":184,"unpackedSize":1118661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBXDrCRA9TVsSAnZWagAATHMQAIYFkE4FBiYpm7wVQ3zy\nQhxwYBC250OA8d67YUXqT5MNRwd39nQVN9C13pUHPiGxrhTbJK4oMbnWYMkS\nbndvU9Jbcf0qNAVrTLGLToxu3gFYyfbYxeyIe1EBYJlFRrnYDAYmmwDrqZ3O\n3Pjc3KauS2dTKz2CnLhpf+7q2AwDO6WsbKSK0EH6ROkBXWZdsKUDvfV9Nrhg\nHz4zIy+AiMDJzP7QxjemGh6H6pVKXgzGCFYMhgyOydnmwPV8CGnxe70ZdfVi\n/eJa5cMLdqllVxbP522uEzy43bbvMF7D2+9qMj7gOjVVk+oRFh8GVBV4Tl7I\ndXjqrGjeSlYe9gNU8fjC98RTLOHrd/WefQBTc5WKWAk1uzInTRe7ZeerZMkR\nFaPJsv71bN6l3jNMaTsnk7XOD7BDbvlNbIiHNFeQzloSZZnak6EM73NP2/3b\nRgXXIBfUB9/1N0okuXW3tz1Rlf/yQ5DwVc/DtbKCrgmlJahViObNHbQyvZUC\nzENjQnx/YU0GWROlFYkOTzUeSQUO/+irAPb4HDKogUG3UTFYBNL5NuPTYY3y\nJUGX9bXGD3sG+SFuLuj/bi1XwVIF8cI1BWO9t95qXHcGaUk9jDxBsHnp/XcH\nM/+pQ94SBx0d+66ikSRsZMdEM59cilSi6nnSssRu5isNFh2xOWvLvBEAxKeU\nX+NO\r\n=RcpH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwtSnh3qjpw48+c8ifULLGWJ84pkveAKTLbVZkqkbf4AIhANn2Jux9nbj556GMrb3HCrwyQXNDJX1uyXX6WYAdAIyd"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.0-nightly.20200708_1594192106642_0.4703323885768784"},"_hasShrinkwrap":false},"0.24.0-nightly.20200709":{"name":"brs","version":"0.24.0-nightly.20200709","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.0-nightly.20200709","dist":{"shasum":"1963efbad29955e3f3eb4d60c8802b5d7301cc16","integrity":"sha512-Qv0fr73Pes7/BF02f0zvKD6rPBvDhAl9lPUCAa/fhoaesXlbwhSgDX5t1tBBuW05QCfTt7il+sAPmy64Je7GQg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.0-nightly.20200709.tgz","fileCount":184,"unpackedSize":1118661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBsKYCRA9TVsSAnZWagAA22MQAIqMAIhZZcQP+yQBcQgE\nCBVI6jwT1UvLdb3U0AWe64BKKk4FlJZDczvJlU9C5OcYWtS+qDLddGARSIny\nA7x7S++6fwZT1R41b6E6hCvLr08LF2BF/4I80qUfet0Q39UXs1Rs6QXRTeRb\nsM9Ph74rSj8akVxhdX/L3Lup1tkig3pBG6nLTKQUc058vdnLJvf0YLf6cOI0\niskauGBYnL0jll/aXZBlO7tqao5AsAK8Unp59Quj78dOolbMhXB80tZWccx0\ntHjpkCgsOIkd9AMq0y0eKjFa4ieZvh8wyUaNvB7HifTojF/Yb36VBvjpVjLp\nb8sJRfk+M++Li1dr8XapEmAMPgFz2cM71kHvWWljXcNfGIAV0WCurKsKKeAZ\n4iDt0CE0cIikdnSbY8bqu+xoS7p9eB+d25JRxtjBLZx7Yoo+OmeMPPg+mUVf\n5g74+nKKZuYlSiDR1pbOwpPiMpditwcdiYzyoikQoknxRaaMtm/hlPzGUpLL\n/zX/Be8U8Wem/ejXv3GWiVfcgftTPshslph3k452oADD69esqXmA2m+HGOyd\nQxMcyD0jCmSsKtW8SGfUPa4dF/Qj97KXr7qORrQduv9z4KCwKBI8Z+NUIgNI\nbR+L3yO7U4fbQC2rBfqv7G/BAhJ4RAwvathAnkuqXkjj4DK+0N9lNpANLtxt\nJGGL\r\n=FERG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJ2JjCnmj2R+bwkCL7o9pmJI2+esgQo8zwrFv5M6mmvgIhAPI5c58uUGb81T4yT6QU9Ki4BI8IBlwxCl7UDB9TzkeN"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.0-nightly.20200709_1594278551521_0.7361295414994589"},"_hasShrinkwrap":false},"0.24.0-nightly.20200710":{"name":"brs","version":"0.24.0-nightly.20200710","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.0-nightly.20200710","dist":{"shasum":"e0be4f30fc8315611b111e4c1fdf2482f805667a","integrity":"sha512-qyVMcfZ5d2WQjwbKcl5bSqWaIlDKyMUbYEtBWZ3zCez9cK/6+oenyNQ1JbZUup+Sjs1unjoLLYCsPtUP7UXIzQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.0-nightly.20200710.tgz","fileCount":184,"unpackedSize":1118661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfCBPICRA9TVsSAnZWagAAZBAP/0PjGC02VgG/oxJ1aJAs\nlcUZGAMHuJUkPAVm8l96sh1E4yXYwWMvR1A0iLv1kN8lRD+uSHfCfLBK8iQg\nc8l025/XaxrTS0cj/nEZyLQ/6CA0bOdt32z9HwPesYgJsKV2lFnbmNY5Qq0A\nPjVXlT0rwtUZVzF6HIr2f+rhxWSDeGlKFs7/sfcuIEi8cM3LTXYWFtkA0MCP\nLh5O0ybDazfkI9gqEuJZEcEG27ckXsKHFliHTrnr+811NWKX3idgGcDeYVh2\n0nK0quIEqTtGgGhT03a3Z2SvwsAY51KBAoL7/kzXB/d5E5pctPQKugsgGuDw\nNI9r8RJ6Gk6fkRWFr53Tw/7RIW/1PbI9EYya1uXmwmEJ8JXXg0wRGPaNazhM\nbCLqUX9m+8c8avdA5vUw9N2bAsVD1ZldELUegexlL0R7mBnF+psLdOqUZnZN\ndZNa114XVYf0Bs1Ac0wWhy7FpWQ13sgwuN4imegnxMuSePjUUVCwmqf7yYAE\nQiDahsEJhoT73C0skCH4MoxsXDvKnQjLjVFAIy3e/1Yl66GVFxSDMjD/sEup\nHLwnsB8KB59uRmWITtoaTcTvLxeo2LPqAL0rpHvOkrSJ9S28eJldm4I1aPIX\n04tEU5JLy/czxD6aiW+6ZDEaQcMQM4/D4L/d+xuBTPBxoXqAHOd5cA80aIAT\nvxir\r\n=WGpp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCi1bSj16w2DHz3yoF76Yin3OC5NNumolEnK/riQAl8AgIgQ3xh1CpthcpHv1GpiqdiGXSwx48Iqt0vbbOUXlT+euc="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.0-nightly.20200710_1594364872055_0.41545981361710216"},"_hasShrinkwrap":false},"0.24.0-nightly.20200711":{"name":"brs","version":"0.24.0-nightly.20200711","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.0-nightly.20200711","dist":{"shasum":"9ef3dae790bbd6bd64042a25c4a4cc8cad158b8a","integrity":"sha512-0k1zGXsva+Sc59e64afsrPJ83JuWZohnyYFvGc9WooEYYru7CQAlzFzRtn4ZTdBKqAo5BkwPWn4bd4gaEJUTBA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.0-nightly.20200711.tgz","fileCount":184,"unpackedSize":1118661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfCWVRCRA9TVsSAnZWagAAgLYP/2z4wCJHJKyWQF914+aI\n0Ry3mmdvSSJwTxEpyKXv9dyfL4doXr/ZBXptSY9RsjPUCmZ/w7t5w6FzYyNB\nWzv+M403de3gYdLTK1U869Agfarcnot3TzKu4gp0OWfCFOtzRWtcC/aGSozh\nQDIQ/fCu2qGMuFp5yxUtICZ19cRIJ8YB1qx9K9dsFdKsqyyjAfwD9BBkJtGc\nibmSF1t3pgOcnUBBaTdHllzSikeVIpkdwELfnRlcqcDHz/8Na3rTIQBRlZ25\npoJoKMW9NI1t33jEgJ45PhikbllfNUXI5PUjA2Hx0FVL2KdNg+ga8dUvDVXz\nwLudl+dIVRfhkC7gzsw4218VtLI94kgCzrPdHgeHNuiWJcqIyUWu4/8mjU+o\n+AvLxe5zMg5FD+gYwOmse4xJ2l7GjRxp08UwN/Yf5Qh6N0NUF6ihb0gH1uPy\nq9Lg38skbpgXTTdj66at982D2GGxmfNukYzQTU5duDaXumY4ZchGbx85bwnI\n5fICZtMEq98+5c9q8BhIGQWrlUqksW97D/9VKkH243uYliSnnuY34DVEwJcR\nxjmbfwqmVSBxFWcuBuWv7qZ/wlS7hEMeEIJDBet0jP/wJGj9ncaIkr5jwHv8\nNCkH+uDtVpvvsIqpKvRnpBhkheWsMRJpUq1c9bZJZfJFAUGpwF1B8RUd1LgF\nv6MZ\r\n=XWAb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCK0o3DDN//joFFxR2y3CqggRO9FhrsaQe6rxztZnV/RgIgSKMi4zzmIbIzMzjgfWugNY69UY9LA3gwWZpooc1bT4I="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.0-nightly.20200711_1594451281204_0.4520798742096266"},"_hasShrinkwrap":false},"0.24.0-nightly.20200712":{"name":"brs","version":"0.24.0-nightly.20200712","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.0-nightly.20200712","dist":{"shasum":"a4e9b9d2dc4899638c39368fce6151891c4ab19f","integrity":"sha512-9V+ZPUY1l1EA4EkyCfuPSUWd5oDsJFunbIBjZ2B4k3yDWl1M5WFWSxipMlhqSe1QEnDhqJ81bg3UBOkX8P8txQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.0-nightly.20200712.tgz","fileCount":184,"unpackedSize":1118661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfCrcCCRA9TVsSAnZWagAAIpEP/213Mpt47SHtHw/8wAEt\nIJXHYBBDNGaITvStzIC/lBj2XWUMuIGApgcdWgOQy7ljZPt89i9jm8Sp6KSF\nkqNf0XdK/2SOKx0hXWiaQLBKPF7q6jTnqxuBs6v2cAltcR4fs9xNUVqzNh7f\nYF9EhkIdRDzfMWNGBuEtZI6MdYa8QCDhU/KLcsAy2PQJoHgU9tSPJCb3vMDs\nfIGv4clsqPzTqpBi5K2eVvPQvjtzA8jZv1kUWhJJxB4bznJEgDNIh9ABmh7c\nuAYUzgXcRabc3aRBcvoA1ZUBSM+XD+vUvChskYi4onax12PR18Mnf9A+aMiC\nrySqt7oSiyi0xGKrmtj0blIwAgXCkJJd1hKvT2nj/s0kQQO6E2g9Xsp9YlFa\nz0XovtyjPeXcZiSEz1jqH7D4wkT1u2jbxna5imhbgplcy3WuHiKkd7NHf829\nrNTf/k6tTBKxN4xWOFELPX6qwgss/FYP04CP4H/ppOJHjiV86ZUWQ4elqT5l\nmOAvUGNlFan/oNY5iQIiEj/Ifmo4LrVhjoFdKFj/1Bw3xCUCmalvbnFni46l\nxnA2qJ/MjoqmCsC1SADcvvpdU1brCWO1CiFAxfdgdKp/8apLCyHeZpetAyF5\noRtO3aN4a+RhjW6YHNrqbvNpQi4d6MwzkGtJ4ZdXOXP8FTQE5HE9N6EhDovF\nMGSj\r\n=uhau\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHSaymgk9aoQvg5/5P7YM9eDekey4ufV0HTWVora+/j+AiAOGEFXntBgglvJP8HkGWQo+5lcwa2uckoN/MIdMuedAA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.0-nightly.20200712_1594537729151_0.7059247534756987"},"_hasShrinkwrap":false},"0.24.0-nightly.20200713":{"name":"brs","version":"0.24.0-nightly.20200713","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.0-nightly.20200713","dist":{"shasum":"9661b20551846e3f6a94ed793496a6daccffe6d2","integrity":"sha512-BdJ/rx92YDarqoDP0XJuSLOe67JJXi6eRMXe5eI9OMUaupMSRKZnhYRJNdMXYs7HIu60AgovIWZvGVm6NXwzcA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.0-nightly.20200713.tgz","fileCount":184,"unpackedSize":1118661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDAgxCRA9TVsSAnZWagAAqlsP/2zmyhbjdVCwOCRfXbmI\nboIRXpuKSglyeyqxnnocjWEDhS7x+QLlu1HOjyz+AaHRwAqbjv3Y3Rj9zfzx\nbl7BIh3SLa0qI3HWGPFuDLxOSPV2U/VsHSjmz9Npd3ptUloTiTGEiHc1TiH1\n10a+W0nKzakVqmxN2vDwg3xP+rhZMy/vDVxZ/EXBhnyPPaHCsCCqgqOyKobe\nmISqhv2oNJ2KUHrZQjow7VNOUlqiH/6RrQ1cheRrCnmWVeFV9pqQYySniRUQ\n6NXoFhz7G7UXutgeWN+WKAQ9Bhsf3uqmXV9U+aIQb0sqKYYBV8HSzJudw5uh\nUx7plOEofYUzMeDJYrebvTJDG0KsarmEI1bb19KbB1vgm+4GtbF+jlK4IcDa\nuvus1L/SiJ8bbBQ/ngfGR8J09FnzUiePgJnmI7sE1qTi/gqa9qMQv4z6MzVO\nNCb4409ZAq/mpkPXC9Wkwpz6FyGSIwGUBgcJxuYXyjmUrNBYIzo2W5OCpbrj\ngB49rKC6yLeR7HlZS0bwqd1UREmLzWLFM3e5PONffSkf0WpyocHNv9NM2yga\n+Yo59pnvqFdA7tlvstORWrcbDk59C2eHUVym5gsOAU+2HxfphxRc4Ni0dCs9\nVAyFheku4G47/w3SXCTZAtf95kvDT+oRlzGvydlq+91NiDJUIoBXu6U6EGfq\nVjtq\r\n=tGwP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFglcDiLgjUhxoHDxfK8rmqH9dPXMhANetknHmmB9dahAiEAsk5G9phe9s+0nHNHHHSbah3QVQr16eKufO8xGRgzomQ="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.0-nightly.20200713_1594624048342_0.9146538214659661"},"_hasShrinkwrap":false},"0.24.0-nightly.20200715":{"name":"brs","version":"0.24.0-nightly.20200715","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.0-nightly.20200715","dist":{"shasum":"7ab13cc4b0c8b627481de9bba8a20cc3788d2093","integrity":"sha512-jzRqWnICZkqS8KhPGxQ1k6/53fRkHBqWjsYifY3+lTHcfdQW/nogiiZTxoNvF1hvcHUdFqi0XTFOc+tdfOVz9A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.0-nightly.20200715.tgz","fileCount":184,"unpackedSize":1118661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDqtCCRA9TVsSAnZWagAAyVcP/iBB5J8EhrTSiubaykpJ\nLvkmeMm2nyq8lY4g78+eFLqfnx8I4W1Aq1WLv+BQaiAsAp20Nk3hX29l3kBo\nKNtXoxbGSmkox7IQKh+73Tb35hG0tVcScD7v3f8b9PZ+MTDLsQ9bNzxT8ms7\nCqDVhidBdCbuhS5XIHcZxhXprvbr1+vqSkNJXmYZsMPpcj9KQ+0NNRcl4AO3\n5nupjgRvYk6V0ADSx7HmcFCBYI77EZlXHoSPtATZD2PqDDDnwf8S/yU+yF25\ndtk8j3Y2SU2Q0pvTYANsPH+ZyJ7raFojTEXT7wvkGAy/ie6GEFsXRx6Yk/zA\nYJ8pWYmjPGXwWj3Bu8ik5t/mGISldvDowEPON907uxR+vVXMopF1jtIFzeOQ\n8YXX9sda01cgtTKtZcELBF7TFLztltQg+w6RjOqSeoPgY4L0v+oMmQQsT0+W\nOAbzuHrUUhX+pGKfGqWEYjqBVEhYasxJwMIwRU3/WlaQEe+v0mmayYAtYu3y\nchtFpYsrzm5pxzvS4qoYwLQ/lM40AjYT4oSk15ex/OIDLWwYrpp46+TKSHJL\nJkzg7SfiqrpJyoiPchW101HP4rYerM1i6/K1ut7X4iqU0so4A2QItdWcF8Rk\nZVqHgi8A8tz/TfQuRFkrg5Sdk0FM3imy32dMeynNQ3wWtiYxbUUpnf9Oai6S\nXEGu\r\n=TXYx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGpd4vEIx0+6NfkYUcWpsIDXILn/jCLHgYIk/zUGyCUwIhAPZC9SWJSf0GvKoRKxHg9aKIEr7yOPB2Js3YgCngeUpM"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.0-nightly.20200715_1594796866116_0.02605385095584678"},"_hasShrinkwrap":false},"0.24.0-nightly.20200716":{"name":"brs","version":"0.24.0-nightly.20200716","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.0-nightly.20200716","dist":{"shasum":"3354a03c7d0f0d8d5ac2bdb8f418fa01e2471230","integrity":"sha512-VU3dr5wCyd2nSrbiOTlonwcTIwuoKGXeFav23/WFxRuBcH922Cx5NOn94RH3k1H6J1c9/koRO68+VPT3+Wp+VQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.0-nightly.20200716.tgz","fileCount":184,"unpackedSize":1118661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfD/yiCRA9TVsSAnZWagAA1/sP/1VmLn4n+fqceK3RdqJp\nDiU94Euu0jqcpBTyOeRbW1Wu+50RC2NkXWrCgR7Q6TrkNf0tezMN+s+Lr/Db\nwmokM6Q+Xh8kJ/Ce4yy+xYaEc04Z3nZnN8X3acPqeC9C6G82JaioiPVGG7Rk\n9JiENVHhS/7f32WqyRzqy+vGNe/9Ix+5QqJmX/t1sfuoggosFJLmxShMBamd\nsPF+4QkbvqvDVR5OkG7V0wHYRjYzo3SIKz4BznhKqzXj+Fr/aYDVaOhIzT4m\nESlAQDe7xi8wYnQxcUfasvzIIlAS5h3Fn0LLVqTc3dbepKcZo3ugilJXS9/V\nJYqIidPCPYt21ZdMcHto1P+qe3f2of5mXZqX2Obs2xwwilMQbOKTTerziucx\n+KFKx/alKsYp4uQv+aoRrXTQ2Ygl61+x8wcDovlnwTLxItDG1i8qKt1cgid5\nSYerF7ehKLo/JnGndebeBzQNWHbpPIJ+QBSyqu87EJFv1Wig+ottJfZIs9Jw\npzz9SFOY5rPl6+JMQsbiIWGO1/ncZbs7r1jyo8ii9ZoyJdndOsgoxV28cjGk\nvq6KtKlaogpGHOHx6kHRMqwFVnRcF281PJUtF/WsVgidMWSH9cgMcBIHm8ZJ\nJUarYCsllQofYpkyv8/TBHmYiAP3BuxrmyxEIQ+m+1Re0wLrdJA344+FG9+v\n7xZV\r\n=I4o4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB0qLoi600Cao1Ndp1Ak4WqD0QLx7y0WyQCfcM2RHpasAiEAyN1bA9k209Q0ZAM0ORN1gCSHFB4J0SbLrs8x8S15BNc="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.0-nightly.20200716_1594883234094_0.4888347800966717"},"_hasShrinkwrap":false},"0.24.0-nightly.20200717":{"name":"brs","version":"0.24.0-nightly.20200717","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.0-nightly.20200717","dist":{"shasum":"76251dc887f81a72abf1afb9c6dd3d464cee8e16","integrity":"sha512-6MBkfbyv49LBo+fz2UCypo66xXhKNkTwIfXeWGZgNu+cXdZ5UPyxgkqzpB6Wwo86/y77dBLsGqt/Gy5CNkeODQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.0-nightly.20200717.tgz","fileCount":184,"unpackedSize":1119989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEU4pCRA9TVsSAnZWagAA6NcP/iNQPPHp6Z7mtGBX2BBY\natky4DxJsPPYL0Tf+wzdszhOCvTJ0B6vn3QuMsMOfyoNKKbkCO3LmEQFAAJP\n8tWd8xqDoHZK4yeXE0epQPqTw1sglBMRaZmD2kuRKPoGjS/YLoL2rpqnuUvz\nvHIOP7IS34k6hyTVBdS+3UkUs2+9UeyFVihv35YLejPiBwOFTXiloVrEPFoQ\nl1AxeNJWnVI98L7tcUI8/d5vTRyVoKTVV9PnOpKGuj4scF73IlUGXfz86/kk\neG7Fja9bsaQvK0FzYB7aZQ6eDs1bkLmFtLUaGWgh4iIQxQcj530psCiA/CsR\nJpwzh/HM1xMF8wINtrgKN95sPYjUE8hJm5E/mLWVYt7Tzf8AOWfBzoWoSPE4\nKIyLxvaxeM4jKbBk4PQ3rEM/IR8Vl0mPSNKNXFpgnE5FVOu9IfJ2Na9xzpjS\nimfEP22bGgPiSnFhEX+kQyXKlVMPKaTbkq0M0aBLOx+j5Cev0jpf+JWYHt7z\nwZyxOvCtfcQTUaRY1mp5RxIr7m0cukJeKcwChkr50Hr80fI271vcDdqK+5qI\nFiCoQ681me34qWvXOCB223j0wLmMIS+niFfSzfN5tuAML0bMlxnm8kDZ1hsX\n/IJmmC4oy72pbZI1x8kGPLUdSHTsGeyG0Lq/DJzNN9QkIukSqWDPcDT6hpmb\nVOUb\r\n=Jh+v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID8aeMlh8cfxTznVZSIEZALsLnsC9J4C7ACyib4g7EGTAiEAuxolrl6+iWOMkL1RP9kgThY36Mqr5QG7qRzfDf4mR7w="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.0-nightly.20200717_1594969640402_0.18044919096039025"},"_hasShrinkwrap":false},"0.24.0-nightly.20200718":{"name":"brs","version":"0.24.0-nightly.20200718","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.0-nightly.20200718","dist":{"shasum":"45c8f8cf5ac59c47b29db62b381d18dc6c372723","integrity":"sha512-V4eZbKNWgNuXMnvlSlFk3CuPCtec45FAygXIGZ93RIKQTCNB417a/o5IFvXtsMhVKN47AHYTS+b9mUfFSqL6OQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.0-nightly.20200718.tgz","fileCount":184,"unpackedSize":1119989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEp+nCRA9TVsSAnZWagAAOXUP/3r0JupyQ3LNR0tMYZNn\nLwoCTngSzdvANjHU46ifSiJngyG6iR4iRnxktearITCcyRx4c32VrWgOfBPi\noRLwZ+ELc69KCzyriYwI0nTFN5miQ2L2aJemH0881XEmha2NEp8zC8XSo7R7\nwz0jYC+BQ8+shZHzGcl8yG6sBqLJvr1PgygTpJo1g/nDEvKGoXIYjTV69OW3\npNrSYLmAa0Wx2VG+uESW20l9ULs6Rn1Ja/rvbVptNUs9yuzAmf/Jf700HaCK\np1pzid+hvLxUJ84sKh2wH8dmE1LgPpS5FrRVd0XQOzNU40CM+IacuATwG9GC\njfzNbUm5iP2Lryp3nqNS7niX00u9oBz7v5xIobFezpVMkw1VbKYgZnAKUdMx\nL763WIN/KEVrx3ntfu+B7fla8LiYE9g3v8EPh0hbj2HZNqRjrzH1GsL80vnR\nKez4tEmm1jVJF70Y5o33HpBe2bd01UOeYLtHzvlh9QkBkTeE117o1aan02TL\nFenved1pZ8iVaZtqOkRl0/CTw11TDMhCjnHF75HeVCuwM9zqUY9sDJl6eQNM\nurqCrkL9UVv3PMrqkhsywRx5BDJoUCSfey6lDzJDv5ISNVDGS08XJhKHVxaM\n9SZv5CSqJthcm9cXhYhirppm7YH0PROlPIKwD4Q8bmi7Tiisa0daBUbHSuF9\nnXQ/\r\n=/oo5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWeg2obufuMcRPsIsvO2FNT0KvjX9JwL70Z/unOZFvKgIgQ1jADF+vn05Na3u4FAIjCJgRl7xG5x7wfExD6UduTJ8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.0-nightly.20200718_1595056038554_0.31845274365614973"},"_hasShrinkwrap":false},"0.24.0-nightly.20200719":{"name":"brs","version":"0.24.0-nightly.20200719","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.0-nightly.20200719","dist":{"shasum":"fc8bd98f71ab5d862d8342cb6d5bf7f6046a447a","integrity":"sha512-J+9RpPsoaCtaRNL9CQdCQ5dwsMhm8GmmfGLkyUOAW1neti36S4qi+JfYVOX972PY0GqZ9iQZ5mHx0RqHVZJ4Og==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.0-nightly.20200719.tgz","fileCount":184,"unpackedSize":1119989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfE/EkCRA9TVsSAnZWagAAzgwQAJXPqaoR+kOmlflmRljF\n0MCpIqqdkRBnh4rav7F3XFNOyh0jbTzNiWoUAjOVi7lbPEtKV7wzZ+d9odYF\nt+xy7smSajx7xRkw5qZFWZp6/Z56MvA4ZrxoGXhPI4Xxax9UitRmekJPo72z\nWA3kKA3CGhylaDQYKKSJpiAYhT90BrYaqKDjZgS8M6EsbxHUsEiFsQwqdJ3o\nxZf0jC1LqKe/GtOJGY+eRgpOxHL5RxllL2ARjAT89/CED4U7wjy7ErDlbV3I\n2t7mevUrfig78s0S0CWa+wW/aywH4c3Xhiq7a0CRV/TherR5cFs99PYcIvfS\n1wPkqkCFz0MzbsNNUeF4r5nmGobcnxK6GSMI05fCVISSfCxqFORB0MchlPdD\nyXOveU+yotj6spepoIt/2SquKsnM5StTY/bIv9qaaGuni7ZwZX2Hgqe4SRAW\nLjcwph6g25GTnmUsbb65GvVxM6ukkqAy4a8EJGJjzPraTNbITVW9QkgkMeGz\nnDiuKolJpZQgQu67cOn0mLLiCbn6To1l5f56TLj7iXh3wizLeexETbsU0tUv\nN3RfPAJBdfVNG8k43BATo9GFJ8LIHDQTAplBqwbJD5dr/aqyx6gIzQXoP7ii\nmJ02CVbr/mxU/wsrEz8Yri2mwseeXGPVnJSu4NiY9cWo3JvKm3l+EG3J5c/N\nnAV1\r\n=KzIQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5dCujU02TJOiPatEXStx7ZpACYtyhQGflQh+AAJaHlAIgWCFKRhKCK6fYtXJhL9PCIBG/foBd1lfNmi3j/EyIzBQ="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.0-nightly.20200719_1595142435908_0.057725144459926936"},"_hasShrinkwrap":false},"0.24.0-nightly.20200720":{"name":"brs","version":"0.24.0-nightly.20200720","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.0-nightly.20200720","dist":{"shasum":"ea4fa6c755e842503939359cf2d3e738c33cf5f2","integrity":"sha512-ZTkZesHNwU1EmZDayKpohSEJGxV2B2f7XUsG6GNihsTPMbxJ8bNtvEnKYG2aaE349CQ+F/CNTM/EpvPelZh3cQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.0-nightly.20200720.tgz","fileCount":184,"unpackedSize":1119989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFUL1CRA9TVsSAnZWagAAfxoQAJxnon11XDDIlFt36h/A\n6H3HK0TTVvbY4HnN+9lqPRj1NNPaPKKThXS3DX71gMqLkr2op3uCggie9bhR\nvcNjFmlY0cF3KzsDIt7LdDCfzsLYtc5IN/DjfF5EgjpUXj6fSclTmNuo3YPe\nFc8jFERuqebmpI5DNFLnr1fXcOxT/RyYOef2N0xQpZD8j2z9ZWOrNHNdBtqM\njtwcxgYT5YsWobRPizHTZNeKEZxw6TBmRLqlPQQCRonTLzmC+ifD1o7CAuHJ\nCHceGAaGfoTt9ZMjB2X3ZoINFwq3xFD/B2kT0NuEInaK5Vt8cYdkCLs3eqNR\npt/bF6iMIDfK1iRkr/3ZF0c818bh/fyrH1nx4cCYLXr0/0O/NPLDvjjSLq97\nPv+Rlu/5y9MvTNtCYTbvzp/FaxfTNuAZ+oCM+MCnepQQfa0JUVKKn5+imMJ7\nNHoNUuDjkDzOBLQaWJ70/zsniMiDyXY7LYcCBI8Svvac96lwKr3amhmPPQdH\nC/XiYtPBJyiyGdsS9lUNfHexOrAK5sEc9MJy4IFkPIo6Vx2aHHH45THxTz93\nOXToqTBltM+ZjwYGXjWLgOVSOLX2WNP0efabz36sv5aJCiIn4jRu1dlnQyY1\n2CuYprTmyWnX41zLA4JBMUtGQ2057b5gOMLTmdoSYbebVEXw0nMdCkIKKRi/\nfWCe\r\n=1Nby\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC6bWQgNxcKC684wumb+ZPKsC3mhSqR68VveUl3mDeMmAiB+mnqExMCjDg629JJejMO2hAoQKAnRJ6U+SIx9GPYk9Q=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.0-nightly.20200720_1595228916446_0.8442077277580213"},"_hasShrinkwrap":false},"0.24.1":{"name":"brs","version":"0.24.1","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.1","dist":{"shasum":"4013d0bb25f42aa49825032e366c88f6679d9d74","integrity":"sha512-RmYJLf3ZV82FFXjTVQS7bioCGqSdE5HYR/vz1HuW3crKqP0DE8p/4MUyEpX1hTO8QXdEERoubsipUjk0+uTyRw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.1.tgz","fileCount":184,"unpackedSize":1119972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFhZuCRA9TVsSAnZWagAANIcQAI/GCsnptb7655BeSwJV\nFsSbxnaX0NQQ9gK7vrbd+142mukE6L/8wJEFnIYzzE6362UatKKIVI3YiJOC\nXdrlbw897tMVcAUnJzRyI6vIQ71iYzg2Ong5gvQoS5FJ5b3Vq2YBo32PMtEn\nciijnx7sXRsWnLvUeS7WMBlsRxarqS1r8Tfrr++/ijuLaWC9EuVHPebCgIru\nUgi4b1plRNQM2cVFYP5XSX+Ta2Z97efYzyOgu14EGM5qzhDz53dSgT88g+Ru\ninXMYe5TH2U8g+RdrWlAfRVDSpVsi1+EvWfAO3GzOzIKNobEF8JtPddTanlZ\nVwjPKyffwMbkvk/11O+gk+7FeLHcqGRuUYXRd9UgRMK/OSSpR5LYppDCxTJh\nIrnw/IqRXFHfFb77yPvVZA7dRXRpJVu6L++Gx1NM06tkzwXNcLeqMjXQNMTt\nDLU8A86fvRGmXAjR4ByFOQfzRtwCxukeazYwx+1j24az2OphddJyqddaQwTf\nOcfEVzSd395IQH3KzHI3SMCHlJr3J/61hjV1UueUA+WxK/LbQpu/dhA9BnXq\nEl3Z7Plj1nKOCSHQdXN9EoFaI+4i4iK9LVXYUqSjCZPDggNwroUEE8JJvWHn\n0HYEgX6wh9yRgki9yA2m7VAVTIpkD/CmbnrW7ffT4/w1HGmzEgU0ENsBoLED\nG0W1\r\n=eUyf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC1WQGANAds+Bi7zrcRmB7uetnq2boItwrQttmP15AZCQIgBSROdC6z3DmbHd2hmW5rBsugj8YlKqpYb0ss58e2XRQ="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.1_1595283054345_0.9725087330699602"},"_hasShrinkwrap":false},"0.24.1-nightly.20200721":{"name":"brs","version":"0.24.1-nightly.20200721","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.1-nightly.20200721","dist":{"shasum":"c8dedb4f4793439d4f490c4451e496252bfbb54a","integrity":"sha512-AN4eqxm/PCQGyi6z7Qn+vzodvhxLqvNJFPeJSPhrOCLmzxKjZfcFLDpPAgF3wobCa1WA7Fh+5uBIpUqSwOBzww==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.1-nightly.20200721.tgz","fileCount":184,"unpackedSize":1119989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFpRACRA9TVsSAnZWagAAKpgP/0MUSv3dXIOf3lTDqTjs\ne7r8APqpreanvn7GOK9b5XkPwjX7GuV2Rfn3wRDRbtviLuzlggA3kgNCrafb\nj6JpEpn6CdILcenTxMrxEt5Kz+xwYiVLQwmKNFlNRRJ+UH5VhgxTa3bfVWyU\nW/Eq09082p0eAaWrz75/jZimpTQ4Cx0jvfMz3vsBfksmBpqnMiVEeJ4HklEo\nk+st2EkB68xNyRVAkyCZ7Z9db89RtWmE+KTrEMW6/jMGWYkrNBU9Gfo1Ewmi\nszSD47dAdiSR1Vo6iq0na39sLiTiA3hhf9yn5scEGdMBDuRV8WcR9RkQrD2P\nzmc4WHDY2HpVJn7sW7Nn/w6q+yNnG32Zj2NGiP2zfgZic/LaerRlhgMESHKZ\nXp0HnTglepnaG8Ak9MYoVrgmtjDQPt36Osk7iYnVEymlSpZKruDDq1+FKE0u\nTgmNRZZ+EPB4LDNZYxKBk2NislRNZgqJ87rHS6NAAv2gz8PqRgw4C76Az9BB\nwscu1oQLp4s9AXYvK/ygiuOsHyfI6JfSl0rJrhIVOOe6rDJWDHA6Bftwf0Br\nWMtX277rov0IobElhbCfWzfC1nyZmqW2OrIvOSLG+8Md9L3jKs2a2evSE7by\nvlN5iWTC/uY+8v+m+NSWrngbN52NhqTBDfycnU+YB2aY6Dvs+PybPozBB9IY\n+SxA\r\n=TLFx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOQS+U5EtM3ygP1a6/pkCQdK/b4xS+v3fP3NrE9EeI7gIgYyYAiFxOJ7Yq4RuXHJhKjDNGzbzx8ZBGr3fXRTbvWeo="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.1-nightly.20200721_1595315264096_0.17804293343570654"},"_hasShrinkwrap":false},"0.24.1-nightly.20200722":{"name":"brs","version":"0.24.1-nightly.20200722","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.1-nightly.20200722","dist":{"shasum":"01c19a83d4b1a4710ec58064277cb016d7ba518f","integrity":"sha512-5yzcerKd39LmWUH68ODo/TVACvzVajEn4FQymoTgrjGUS4Xs2KZp6z6VsiMcxYGCCKwPVUel6uCM1wTekh/8xg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.1-nightly.20200722.tgz","fileCount":184,"unpackedSize":1119989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfF+W0CRA9TVsSAnZWagAAhwsP+QG49vihOzfoniXO9Ks/\nZV5dBsUGq+ZtjwRYaUUaO48+JEIi4U64M9AOY+UFduvfDTsQ6kRbWr1KHc+z\nwNYlJakJBEztHGxbTb6/HUoi0eIFLBrkm9Oo+5wYbW7gfMmRPRRorCOELrtF\nO4mtuEymSHm4Qz5OftKHpiOWjmkF1fTWwJvNa/v1SSoTliDVovJy91DpMMGA\naNQNkdFyETLP7hquxCqNM+98ilbUGzLZpDpofasELb2mHo4CJwG1zKRGOF+a\nfg/LGpCApiLQI27xfECm0uDvYyn+r+byQQOEwd9lU0oWCTW0SRp8jWH1DLYR\nVBk01Rl7cLfSvQH6jdami0rzZHpFL7D4lVRVN3tInHAba4c+e5iTgmiWCFGy\nPLw3sm+x+sA7Fj1kfv0Ztv9kMpUNNyKHRuwQsss3E+hDFWfmVgRt5mN6Nlwz\nl3br8YbaL/8CyTexsTQn+rwJwXEzCOKN0DFSEdkJHd5tdnPl36r0nNwBBpEO\nWW1uZ68+hLoO9lPhnYg6/cyOiEDFA7WIzaenYqeTftgrHcxNKRXVntc2NMoU\nsk04G6s5GdmfwCADKMlxMOTwwbfiR1cgF72aRJxdk/UQi2d8jl2116Ptwono\nelNK+WWs0oNTrXjCk5GGA73Ph6BKLn1vFl3DOTd1tAaVi5fQYL9ednEdME9B\ns3he\r\n=oRJA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEf6dE0yblz5ZM8HnSrdGQg7RbPOQZ7WGXHDOSc5W8agIgHdrQE6L29YKbD2/ecVSmPX1WVsoZ+ok+1Mkk4gqbfsM="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.1-nightly.20200722_1595401651524_0.005030505847028799"},"_hasShrinkwrap":false},"0.24.1-nightly.20200723":{"name":"brs","version":"0.24.1-nightly.20200723","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.1-nightly.20200723","dist":{"shasum":"85f05ea4d0ed96f66df3cf0e94ae0ac614d61b20","integrity":"sha512-RQu2SIPrFmC90x9VyRhjtvcB16G/7e083ULlBzRCbCa0KLW+hM6QegDSQ4vmqiG7S1V0WOHzZk2Q5BTHhBd7Hw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.1-nightly.20200723.tgz","fileCount":184,"unpackedSize":1118737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGTcnCRA9TVsSAnZWagAA3NEQAJLdTJNSzBhIhLAhGLEX\n3LM242VebQMsWovK1dp62q9gCySg18k2Wue9mDz5CpJ4eJnnEjmMdAatO9FW\n4x+NNMVNeGTrjUa3WdzQdGrQU3C88AyNIVzuZ+VnmgHPrCXcM6Imbk1+8Kep\npHzKR6PoHXkNMgKIf45DJZpchid774wXvYnVgn8NdbLbI2gojMQtRhOK/hgv\nmag6xisfeBNGVaikLtr4P3NfyWJDr0WmtLicEHPrh2PGvnIh/MGWL4dZ0cZP\nRv9wK3kPI0k6aheAUtoAY5iBFCQJy1cAsPRjeEFx5ktvOnnq4ZDziFQYch9s\nm2eCQRv4JTBaWp7W0ISGLaY5Own7UXfBMMLVWF7TOqrXfbAzn/dv0qZ14B5a\niRmjZ0j9T8iFx6PG88YLqVFFfviPNFGojfpTFoGRKDaVNeaBKb1std1GzF0A\nLe3AIcBMwgoSOI+TWv/J5P32ud07BqQPpiyKIYEQL+40UMdBjBgwCaK7nuo2\n1HqA/3XXIliAxj9Vi7g2U8UXTXV87uY8XF9oa7aBLqua04xqYDNkdGvz1PdE\nQhOUC3jv/Hbo0c86NaKiklE482phH2rMAdkcmJqW/h6tXukTU7AOuw7TKKeD\nZd81iDe7pjImv1zqgPvT1vl95pjFEp//irGWLW9Vbv/7QpmzoqbayJEY2r85\n7Fe2\r\n=s+za\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsRlxDmAhsfP8059ZaziqmZgwR3hJQsxJOEnrH4MQ1FwIgCDNX7KLBTfq+3BSRk/et14ad7ZwNFtdSrwsNN9HPMD4="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.1-nightly.20200723_1595488039146_0.33830724556619307"},"_hasShrinkwrap":false},"0.24.1-nightly.20200724":{"name":"brs","version":"0.24.1-nightly.20200724","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.24.1-nightly.20200724","dist":{"shasum":"e6f2bd1a1d0bcba602aad8bc1574d9cb78cb823d","integrity":"sha512-XMtAFCk6QfJY+5+btuoUaoxr8I3gRvdtdUl1+oVBfTUqVbbcFQT8nZ0lRa3NawcbDKqfK//CshGSFs0F8qdP2A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.24.1-nightly.20200724.tgz","fileCount":184,"unpackedSize":1118404,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGokFCRA9TVsSAnZWagAA9m0P/jbhg7Tz6O4CKcuy6QMY\nufhUkxNLcdhHniK5sSZJSJRNOutfMrIE2h5YeongLE54BPslJe4NQ7YOpXJ8\nsES5fdxkfLIDI9IFAp5N5AthZulzSToeY+/0lvKmmL4jeU/JY8nUbAZnfQ3v\nwSgO7IecmTJA0pa3TZE/gasvFDuibSr39IV9QKOiLY2T4J2/L1Fen/hDMR1U\npA23XfDzrmuw9pjvpt5y6Z2ep14z4+01iAeXLiybOW08CYTdOQN8fZ85sjUC\nOIgBOH6HD4cd0uPq6xm7LdQErFgYxJNsNu487iLHxMNjH7YbiYWsw9l3lFaZ\n0rOaMdwvuu8KYCzB5DMVmdld/oChdGS6fYeWFYVHFgtsfDN/wYijc2E5Ues+\n8m8RSa8CgyksDUYILuTjsQtW1VkNKgFR1H3iZyvGavJtNCa5J5rVRVeiWt9d\naY8dmbSGBZNLTipGYM+3yNC1MCWb9l4fjzCKXyyrj/VRFS0KixrbE60YcFwc\nJ342ZUQnZvMbiMxWE8AOdecfwLlXfnqs1Qm4/AhEHcZd+XE9zF9TqmXTyBFb\n5K4/zjvVX0+P8Lj+8803XiJdXU1UNL4Z+wVBH8Wn6cv2Ztu6ybtiOxBmb68i\nYm0vZEjKKnDtuss3VUFLLsSvFbmtW2puOgVb9aYeMOEQmTK6l4NfSkZLJJjh\n8IWK\r\n=U3lF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBhNcZ1kOhiyrkdkE9OjtyiropB60WhKuprvY5TX2FaQAiBcuEoV/kLHq2QCA4IJ0atb8I4OkVl9RmOB27eKnTF/9A=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.24.1-nightly.20200724_1595574533255_0.9891566342900484"},"_hasShrinkwrap":false},"0.25.0":{"name":"brs","version":"0.25.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.25.0","dist":{"shasum":"3e4910d4a0bfd9078425a3ba95d63293a2eaf5e5","integrity":"sha512-IE35s6/ziFSAkI855Eu+Hy1LR79t6aeYK7Mk7dMe3MgXaA18f0MGzFJmq1vZ6rv3X79qWymIgkv1SlRs1x8buw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.25.0.tgz","fileCount":186,"unpackedSize":1124261,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfG0C7CRA9TVsSAnZWagAA4zsQAJPsB3ERuqdREbRmCtWs\nk4yUBnnhKwrPiCPfW6JKYZati0DFOVgO/ywrhPTIQdpWuIMY4qa6towct4ac\nTKBlS/QE097MyHsiaJ2ekCLp+7gQN/o8s1u99WX4vWzEE2ljp2S34ZULfYq4\nOO4/t2r4j/AHMfFxR/xsWb1oM+q1TB4gFhJp4BUi3oUtgT7GK9m455VjEG3h\nG5p/srLpet9PZpRvyX1N7Uc06rF10Q316jl5SfNAnnSbaoVYY/hQfvGpa8WV\nMNdJW7kfXTaulXRJq7/IjpnLEdNnNYyKR08teBHRRLDxHZpYGSv5P3STDCgu\nAi1yOYehfHEzLSzeo1DDmh4SmVrBnFGc/dzDs6VPn07gVhtOnS9hyFUXoTYP\nRGwzAJrsgSVqs7cvmb06Oo8rolMNChVc2LNmqwcb6cTns+1mQsp2srt3oEP1\nLCZ622fcp2Y8JhVs6f1JdDXHk/jYkp1FPHYNuoZk/xGRDOcA4DnEv9F1q5du\nmh4RrLGmnJmnQBsctYgcMPFLPsZspWFTONW9/N0zxKhnqdxRIqNI5K8ejvG6\npne0SJLHiup+lsa2/fOrT5FbdANJ4wcjYi0vCIdoBJq9HMkogfVvPNdzvxSV\nLpJdSckiFQVmJxTd6anIPTcRn/ZiFFf1ll5GgmBbcpRgA6e8BMZg0SLz4CuO\nyQn6\r\n=GLhR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHEW7SbPz8I+RaotehF/9tlZvOnU1dK/vZs2zS346PjsAiEA79KEhLgtHaqBc1ji4qYMeKLccCEqAdVesHOLaAeS3i0="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.25.0_1595621562812_0.682658222525371"},"_hasShrinkwrap":false},"0.25.0-nightly.20200727":{"name":"brs","version":"0.25.0-nightly.20200727","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.25.0-nightly.20200727","dist":{"shasum":"fa53de8824df3c5618989ea69662716f4b4940eb","integrity":"sha512-NdeWPwKoqW6XEhqKc9jZtvifbRoZRcxFQ1ZHu/SQ7OKi4hd5ga5f9/ZpmiL/HHjpWpU0YfXyUF0oU9YHirp3YQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.25.0-nightly.20200727.tgz","fileCount":186,"unpackedSize":1128491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfH1MWCRA9TVsSAnZWagAAt+YQAKMCWfk8VNhOcEhS8ysb\nQPuGspksJnoQzkSAXC47wC5XCxQoTGSAi793YaA/NSOOgDHwy6UjRAU/Jdvu\nSi1qD7/aXY9hvsMw5dmchfcpHtFez8hmcaT0JBopeIOmLUWLU1S3lbNg6SIl\nOnRqCCq3SeqTiQVjjaeLLbQpNg8++eQ1v305FhOwyijkhHupIgAc58vVi98w\nip902pdBKUNE0sGaNc4H87okFne2diCxeTHKo+Wk7iz1Iu6anoaWN3BWGdrP\nZcuXfo/VZA2lMk0bIApchfF/rzst1CkckVyZFFiHN+wW2E5fXib1c8qvSZHB\n6OXP6spSZkGUnlWe29PVc+pdvRuKkhHM5xSxxovmo+bFP3OfvsufmvcgOUnx\nWgURJm7hn9INZQvSMw3x/qceYL/TP86gUgMfIu+iBR4iU6Y4y91NyYobxUYo\nDXxwfujARygoul5hARfC9h+UXD1xpmMZ+TRvssVcy0PTMqErfBCaDWApy6Zi\nqoVVRFYOkhgYh7IQCf2DGsenH+ix8yxE82GYIaLAS9JCzTYE9aeYV4Iy9hHQ\nVFOiV80c4Wj743z3kdP+E3cwHAHmP84/HqobgS2FfVTfFNY8aoqTud/63Nm3\nBqRzl6FkGtz7P2mlNA1lo9oeqVOcTaumKOxlmllwZNQtkV/TXy1xWnRLgwDm\nesjj\r\n=M/Un\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICJtZtGE5UD2FAtoo/GquzZMEoi4a35+Blfc7ZH3Q2GIAiA7D4QEDORUePnzhFVMXRzzFICs4UazmYPfE2fTeZ2qcw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.25.0-nightly.20200727_1595888405997_0.9858099045634889"},"_hasShrinkwrap":false},"0.25.1":{"name":"brs","version":"0.25.1","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.25.1","dist":{"shasum":"2999230f493fba9e31d29babb738b1570596b185","integrity":"sha512-26lbQxMdbl7afmAJLxOxoEeCWsPR3VcxwX6twW5ZMUrIBYgQvlY95zCjVzegBH3deC27OCkl5E7ezEe2hC3jdQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.25.1.tgz","fileCount":186,"unpackedSize":1131072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfH22CCRA9TVsSAnZWagAATucP/2S4RhY/PyHOVRT/tybU\n/tsfSPa7t9UTm9wTjrjdxJtQHZ4SClR460sJv8421yo+FDoPO4jssw9s2Knu\nm3tNmpq+k7muneRfary/SP6xuKSNRlTVbadm1TdzuCJ65GD4b6zvmaVnVBJY\n5LvkqDy4/6GR6C5SYZqelrs/03o9Yu0N0ZOfxdurWt4JVxs13HxPvOYb6eMt\nql/kQjv5bp0JOYl7E+8y4arBWgZH5++MsPrTSMhM/uBPMQjai9wYn12tVpf5\nHMobX9zDp7E5eB52aCkwYxypHpli082GOjqb7emlodP9BKEHr4KAyWIgt7r0\n/MMYQ9H1OFEcl7AIuUuQiZBGlel7DTQmKQkCtJnKMYPTZCXavjleQfvYdLjx\nCxMR7vie2Hw8DdibxNoZex9xdQflPuc99WRNRa+/hCUGEId/wvslqZrJURZx\nKQ0NNBo3Pqg9lO4v6Z91km8iKsLD9D/vNReMQ1R6IwpbcJz7k/sHpAZOE598\nnE6aY9qR80n8XTjDtk3sMza1ITZ5qXmF079B1vl+96fgJB0oiBBfi+WtyO88\nA96xuDMaRW3gfDvf1ox4OmB1hEAfbrqT+inq/evlAV0lpjOO/6tAvz0Vj/yf\nBem/v+Muh9MyVgsdiLgFuFKRgUmOgdnOS/WFnpwpasJRx2hAYUeUtNv5dJg1\nGixC\r\n=smXT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWUgiuPvYb27mobFBavtoUG1349VZx7oMFiEDtymhN4gIgEdvEPBXwHx5fCts1+yEgJdehMAOfUj7DprmzBPWiNa8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.25.1_1595895170155_0.8312155983138418"},"_hasShrinkwrap":false},"0.25.1-nightly.20200728":{"name":"brs","version":"0.25.1-nightly.20200728","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.25.1-nightly.20200728","dist":{"shasum":"16dc07340d23eceab1412f1dbf43b13376389aa8","integrity":"sha512-yB3WP1bToAgmO4qDAIqTnn0SkQtZLEtRS3nIDvBtku0gtinNRDgI8dC6FkAS0T2yo74hmsa6j/35YMjmF4KWuQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.25.1-nightly.20200728.tgz","fileCount":186,"unpackedSize":1131089,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfH9ChCRA9TVsSAnZWagAAj34P/3z+hZ0sewXipfieTWzK\nStJupW8mNCouAN88+9//Hlk84TVZEEZNdBuRzdmW5N80sdpOpWvFXVeWK67q\nAouawjBvgl9kVZLy7T4ImvMU/JvEV8H+TMDvvKuZ0tvb5wCZVWw+2rp+3mLB\nqBj0i7ekZ5y0wE1iS0u/Z0PVkUfeLfP1hiJnf8j9fFLjY2Ok5tFXpRKc0SKz\nq38b72NSQHtTj3Xo3jj7j+V39/rFr2v1LGIGg6uymhf3o3Lrj8HEK+0tiJmo\nytLpD4mxNEAWqaqdRoP4v8ERuQv95ewmfautEtAn5WFjXoaNEbhhWyjUQcQ5\n9+tzIxaYzoyWToljre5VsfVEL0gBanf6Hfbg/N4808WAPDqkKsU8M3ZMx+0g\nxRgGGJwBsIyt1MlZjVdG1+Dv8XkpVtu4AoThNyopYFHbXJZ00WDGT9ixre/I\nXq6baZRSZpLKe+yfgSJWveU+lDNwo61aIAudN43ZhbyUtGrrZog7am7KTiYM\nhv84pLB2iLKCW2Z3QxBeX7IrRtsEIT2ngIQqFS+m5stAGqydegAPrctydNps\nTdtP7tIndZK2pmZRA2aQQmAawZ9bTO6S7eLxM2AwvFijx+Uys1awH3omId2G\nqgugx4DC5mxkerXykv5ZiHcrtV4Tu8w2IpTPoqpO16JwRsvSXddLuPkqOo2O\nUNny\r\n=NJky\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICfqKxII0QJTd/skv/R74mjtdeIEP8rSsDFOZ46/ADUmAiBKPJN3g3kVZ6kib3OZa2LKeNYTbIYAEtgnRUw0Yi//gg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.25.1-nightly.20200728_1595920544807_0.7866112228543611"},"_hasShrinkwrap":false},"0.25.1-nightly.20200729":{"name":"brs","version":"0.25.1-nightly.20200729","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.25.1-nightly.20200729","dist":{"shasum":"d047a39f870755276c6148f7af192fb242621804","integrity":"sha512-1Lwsb3JsrYYDRKZQSMlKS2j7zYd3zlDxDYZM7iUXElkWOBS/zSdx/obFfOGT5l15uYzcB5rIk4rALO3SjX8OVg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.25.1-nightly.20200729.tgz","fileCount":186,"unpackedSize":1131089,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfISIpCRA9TVsSAnZWagAA3L8QAJZC7dwVAkLGdG7nU7WF\nKK848SJ18c9CtoFuM1RQZYlEK9X8pFZO+It1um1Xj7bSi7Hn1nrCugtBCAZB\n/jEFrO64jCX7LRNnZXlmJKFZHu4GxpBxoDkyd45fMvFRbJub1V3Y+38JM7Ck\nM0WMLWDtZI+nmdepx4XXvLtw2HbqrphLQiWzoKTRQYW1RdWTGX5WmfxXDPJL\nXWEHt7u4QjfmcokRhksV/4aGpa7UpPRtrCHGFdrycNvQXhpR3UiZpnQjAGRe\nf2AtQF9Kg4I00VMbz4drB32poBZVMMeE9Dd63P21SrtpCBONRIqpTN8FDYPs\nufjNCTxyKnCXaquG+ifaROp28beT1eAwtLRyOu7KdJykIwPxwzIUxC6D2OxX\nwMgAkGDsVHMwztMYpt8bJ40NXJQ4gV5apGZoHhcqsainNgwIVCrypXzzjUoK\nNaJl/hedbG7/fNQ6yiCQR5o6+vxwyj9sAzz6xqz8zWmLTxYLheYJ226VXGKe\nMdRd223+kMEZIrXRn6APP3vBdMtrf1567uoLtIXIGpviFr2Euz6wDO/GoYa2\n8+Gk5UL3iLbKGD/DvXFEJSX9k1glNJNK9rkqsY/7UtpAzsndEf6ieBGrpXaB\ny6BlkhETLG5hAT+Oh8sPhTmZnPV0u2CvQh4iBRZolbqzfTIDtGayK1gde9pG\n8htr\r\n=5Y2C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKhbxj+CXzGCUl5yOd84PMNkldhobIRMClp9av7fkCOwIgQKMTWmdeyPEN+H/A/UWG7234Hahy/UaGU0wTOBEyqVw="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.25.1-nightly.20200729_1596006952474_0.4295626910046304"},"_hasShrinkwrap":false},"0.25.1-nightly.20200730":{"name":"brs","version":"0.25.1-nightly.20200730","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.25.1-nightly.20200730","dist":{"shasum":"df744c91f0cbee2fcd9ce5e91b4e0dcd5df2b32e","integrity":"sha512-86Xq4XPTSscqiFaxoVmkaVKyma/15xN8ILye5zzT2UY+AWxL3y1tO1Cp/YRAd5QnYw8dQdY4vWSPZflJPGoYkQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.25.1-nightly.20200730.tgz","fileCount":186,"unpackedSize":1131089,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfInPCCRA9TVsSAnZWagAAcO4P/3fg4quJa6TGPZUJN8jM\neOlYStE3XJiLFCffiWAa3hcsKb0bufEylMeXXkoYVzW9CSBNSZaE/yIYU2vl\n4s2XByMF64bpjKiBQkxgC8HKBoqF1zXHx3rTlZF5H0VumWuuDhK809AmKQEQ\nJwgT+8tUx8HSva2Oyn4iE3qKXH7SxAJHutrsuK3OQ8NFFqfjdwnXyFm4yzPg\nv56lhQfm6VvcFcnyo3/wWO1OQHqRXs9PB/m7h/0yxWsrz2qCEIBNbDX9cgiA\nO9jtgI0CkGGOu8k7FdxppDGj0N9f4xrVPhCHjdBau/60YUunBFfgRj3bStGk\nJmgycbLY/tfMcnMQMkdMJRwhb/vXz+swCN22pwBD+jlc8Vj3aBWXrujaz02R\nqTkG1+HlWFdpNAhtffzclbd/MFT9MU488K2UUvvpHqiBqHOg4ORGV4H04Xwt\n/QhT667BRkJDGpShGRIyZkb4zk3fcc+GAdL3vsg3H6sbjGjpmRmAbPUJmWFc\nRUjEfO6talN9+mki4pzM+DQ/PX9Z2fqgORPJ8eHux3BkLZBoQjpnuyOHdih7\nly0OFyl8IhvqM1I7DaIyANzeGb02x2UafsEf/WtgPjP+YR0OKV8QmoYUKMx/\nwBl03QxdDDg2jb2RV7AmJGsQn6hQGndN3VtUMs/K2SaV794/29VVwXllZW+/\nf1Dn\r\n=zeu8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIELhAx4NFt0+iXGZizxvogQ1Ij8dUfS9tv8VClVOnRuvAiBm5EvfNw97uLcRHOlTSZ6UtuE2GUvLlV4jZTFzN2FOeQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.25.1-nightly.20200730_1596093378333_0.6627540568160719"},"_hasShrinkwrap":false},"0.25.1-nightly.20200731":{"name":"brs","version":"0.25.1-nightly.20200731","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.25.1-nightly.20200731","dist":{"shasum":"bf84fc195aff49a100599b381fbf9dacf219e1ee","integrity":"sha512-YE6AOnzW1WQ7Xv8G7Z5y2Spn3fScr1RQMwEzv+NEyTSIj18kFVGJi1lFblQHjuz6ohAh8m8nvbHerGX1Oy4UwQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.25.1-nightly.20200731.tgz","fileCount":188,"unpackedSize":1135173,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfI8UrCRA9TVsSAnZWagAAWrAP/2jTUZfJDiOIYX2wdJ4A\nIXNKlwiEHqs1pRbyVjjzPLenPZTRwui9vbahM9+I6q2NvmwFTsbmGk0JRlUS\nJFY+quX7o01v0fQwBn/jN2f5212qa/Z533Vhsiz4GoAkfxby12BXSV30NHyy\nCTa/nHf3fOUp7l3UMWDzXPs/u2aRHJffX9ePK0Khyd214d3SIThebgvgQUN1\niXDDCOb+gV4rQjFZGy7ouD3LMGm5YhjLpJ5Endw2uQ8AHkMr3bISjOnwOK1R\nndJdRzUYLwTsdtwyn8aBLk7vwowwvEi52dV3G55AuciKyvp7qsWYdb0Jmz0M\nOMy4LVxP/nAwbGUKFSdiDMbqZq4YRPLVjThHGOep9V2FDMK1Rm2TTfB3X3Kr\nZOUd76qp3IZt0Sjr1rzt7UxA8bST/LlBxwgAfPXlF22Vw6iZTRPU4mwic4aC\nMjyYN2LJQQhm5sEhoGISe+1rpJMc/0VSSg4qKqTod2nbJFbX5JM0EEg+koU7\npSf9iShxsS8I+u71FekS3Ts1KXvYNaDcH1G3woMXizl6DrHWkOyCF5LkUAVl\n0aWNB4ipCgn5BM/KXWWycmEPLWCv7/GqXg0S+9FFYZNWER32A7+n89CrSQEz\njBuvKykJ3sVFyhUdvLY4xAGQI9LaPG1sBOMF0dc/S/2spAzYYUB47mNZIhCV\nis11\r\n=D2br\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICpyr16B2nk0ySHKcub13aILXGCrs4AVDj4dRm05xB9MAiAKoVyfh+h4acAKwQy7s7n1WvDgZcgkvixTuT16E8Nfdg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.25.1-nightly.20200731_1596179755199_0.30324342910538915"},"_hasShrinkwrap":false},"0.25.1-nightly.20200801":{"name":"brs","version":"0.25.1-nightly.20200801","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.25.1-nightly.20200801","dist":{"shasum":"1f22389d3f86c84cb4f092a1b005f45204b32495","integrity":"sha512-szzXNxJvIbD1+WHJPaEf6tphZuvXiTtBydlD/qTEUGPqy9nj4A0ZB8PxUKidnde/gtpvLOo0xWlOVHfSB3e0mg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.25.1-nightly.20200801.tgz","fileCount":188,"unpackedSize":1135173,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfJRayCRA9TVsSAnZWagAAQwIP/jD8dG8LhhZ8UPCSOChc\nVpGDUbHxGmtStf3xRFlAvGGTpu+wvuJA4nO0Vzs1BmYIQGh+jvZTyomcY0Eg\nfJGctV/kZ1ikMMysYennsA4hL7IWwvnMPI+xekONdY6hy1Zt0SfzcCvglMKO\nRmDg/9qFp4zAQOwnqzmIzmZqwULrjIzJ96xQvsSRt0txC4j/MqSsgsTkRtrA\nJ4N+t2eRPVZ4jIi2AyP+ofVyBxYvj2TLBUMxTA0Q8RnpjbIvds9JAs5qJ1q+\n3A5jOxhNfp9kd19+7T3QGSt7nlvzLNED690yVTju7/xzqdkqCfD3Qt0VSB50\n+LYclpBxnnp0DVIqZxhZu2AcGF1xXoHDkMYKPdtcjmgK4jzpjMwHyyDAdJiO\nyYtIvS9BedWxO39pY043sPciS965plUklO/Wz97pGOGGia2EfBHiBXDoUhxb\nYbmKU9iBwfaVDn0m6cacdhGhpVi12KN6DViOwc74hEawUflKxfZwc1Das9Se\nN97GCRR+OfU+AjDrxVGp/BXqEWxxxsD/Rzdyb7TtRP9l55m139qvJoqbQnAq\nw3FCMzRXmJqOUZ1lbSMX3pK6xwJj7jkc/q5RLDcpqa5OvQ0a/LUmJt2GPmLb\ncVU2UyCQNJEtoY7jjb8ctj3EgCGxoG4EfDPg+lrHTdPcwnJXpf67+tyEPvKR\nJvMz\r\n=lX4W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE5IBVQ4vPiTbw6ju+OC7nS5ml76xSHRcKEPXJc99k/OAiAShWqBw4v8rdZ0BrIHaHaBdg6lIVfrrVqUtlXmPhfh8w=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.25.1-nightly.20200801_1596266162168_0.8116877757561731"},"_hasShrinkwrap":false},"0.25.1-nightly.20200802":{"name":"brs","version":"0.25.1-nightly.20200802","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.25.1-nightly.20200802","dist":{"shasum":"3e62b080bcc1f97d7a1f3b1ca746895df1a36828","integrity":"sha512-1cz1C/eAYMJvF2tLYHZGRQ+FCIR7NDzz8MUjaMPDCbNyyRZAZjIrG3vquBWN3oGWelPcA2gUrImtypWhmH2jhg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.25.1-nightly.20200802.tgz","fileCount":188,"unpackedSize":1135173,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfJmhFCRA9TVsSAnZWagAAqLQP/2ZBwSvq276FS9D/4r5c\n0PkDr549AysXW2UXthFR8sJMiox2AKxehQFECfdiXNELuU/mkx/l0fMhISjc\nxA2OeNQrazeDj5Q61MypFqv40I7qHnPjVTuP7TK8o0oCqV46j4FsWME/m/X5\nqNNsbU6MPbuEuGqMcuZddWHqhZp3bMUFN91hOb/2O9RvT6O8+WGDO/YhFjJg\nl11DHFy5UDEpeMMICPdlKLVQoPpCdGmfVYq85yrkY++y+Zklej7BN9ogHNVp\nKNfq69n9Rsq3f/YGXxOgBDKUWboFMGUjmJQA6+BRWRlBxAv9PK+K6hguJyRA\nWK/s41Od/sIq/0l4IIbkxTta+jI3Ps0ruPdmFJQokVER4oW8R2wqI4zuTU0B\nUXAmmZKETNBEjwwa8W+/jQB6MDsAavcerLEya2BgmQMgcE3ZT7qa/eX8homj\nK+C7QIkBBjWOxW9B9eHPkRr0Qz4bT5FRqaq3/Co0/+DcuxDn7Be9LMATmVCL\nFTxoYQjgkAi6EVl3b/mjhh9H+HEVJwOBLb+zc3C2pMr6zqgnfQKU2JVNxXw9\nxfv09K4jXHDAhraqvefU66Ny/NDtGoPIifcK5Qy0aWPqjJzPXRoqt4i76P2B\nKhgLYmXNcs8C6nleFXqdMwcCYnWgm43JW9Tr6lS8uBvwgYWoxWVLUIURbvD8\nTqrv\r\n=Iy6l\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKU4NTuu7BhyhmvM3BK0rdRWSEwsocRkhUJF5U7ddUNgIgc9Ou5w9Zx1WPbxdL4CSPSIcZnfwS42DlArTYf9XCzmo="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.25.1-nightly.20200802_1596352580846_0.6300378517524858"},"_hasShrinkwrap":false},"0.25.1-nightly.20200803":{"name":"brs","version":"0.25.1-nightly.20200803","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.25.1-nightly.20200803","dist":{"shasum":"50daf343d34bc19bddc2f21d2b91cc0e5dbd30d6","integrity":"sha512-FPM7Mz3m1otXTLp17uXiMaJbnOyor2HlPRHqQSwGlIs4cVLRcEX3xqTJk4643+CpFiVaSkUKFsz9wj3xjDfsCw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.25.1-nightly.20200803.tgz","fileCount":188,"unpackedSize":1135173,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfJ7nJCRA9TVsSAnZWagAAKM8P/1vl6k0iZo+2OATa2WpF\niIaKqRSzZkYWg5JepKs48iQlot1nKMB/0c8OwtNsWzpdXTm7iLiO4O/p+Nss\ns/HIZHcP/DRicJISdsK2uXpGBl6JY+igSkMQiLjgFZk4ZkJHW3EOT3lj2t2a\n3TXC8Wr2GW8g5XxFchpIh2v7fn9TvFLslYU9DLfjh70CgFSuH/KnhdtXXrpW\nuvlYw0lWB+yQRD8DNyvtuZE2rzrhmJaeqHr59x/eVaVmVxBXiXaanVPOeW2v\nL9mpDhgQpTiyiqpY1+VdoOpV+GllNDyzkMucWiiLafCROnttwayyYC9Dq+pq\nJUdfd+R87k0F+z9d4rfK6/fxiOgnqbwqe/3UGTHA14zY3Kmz+TrewRdjKEbg\nPrx/zLWr6BuAvYLAaqzqo9rUZjOpoEr4f3kxqeiyGC+eXGKUYO+nIpcQqucj\njPhRf4iYv80kk1aQKZx4F4AcJuiQeMNCh4VC4IXrVvbM5l9Ac0ekVzU6B8QP\nr9jYADP4IZWzvU3NzYKfFiYDRVbWDHH29QcUkjjPh8ounmajwIqOHEuz7QwF\nfGltpmhMKojAySTtEpEvJwTENm7OA2lbHD0chuBcf6zn5alwADXheSYyVQ33\nspz7CFaST16y207xMiEbOvg7LuZFMr9RrhH85jH91OIva9+OHAUn24svl1PR\n56wC\r\n=SU19\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDky5LNxLvN1alVoRR79LBkrm/TDEFvq1j5vS8QiGBTCAIhAOXiGZWoulZI8uUhbg/uGZw6xMvV4UFcxsKin1VgDRJ2"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.25.1-nightly.20200803_1596438984399_0.6116251071219463"},"_hasShrinkwrap":false},"0.25.1-nightly.20200804":{"name":"brs","version":"0.25.1-nightly.20200804","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.25.1-nightly.20200804","dist":{"shasum":"9488b2ea322fe1917515d5b4833cd5795632e9bb","integrity":"sha512-JbjFm7jrzIbS0vVKl/YGIp2ojNN/4PR/DQDnZsFaibyjjuuRlDtG+zirWFHanfMLeBX3FtEWc54gK09e6JqWhw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.25.1-nightly.20200804.tgz","fileCount":188,"unpackedSize":1135173,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKQtOCRA9TVsSAnZWagAAKMkP/1qUnbIqvXYAygFakNZY\nol0J5z2hTShEfh9tJGv7FkOCR6ZISDKt92AYTodESVVnKTsBcfAylWUfk+W7\no8inVME3r/Tv9w1jtDpWNqCh1IZpADs8We/N8BuPU4/LEvtp2c/PSPvuvNgt\nGD/88SS5VPN2dGZQ0DhUDOJBfTNqjUQ/EqraO74/rs9ovlvCdQC5G70tVIXy\n+eyXxZqJw8jOYAaGQ6F2vAM2Qp9W9cX+UzuAMh+n9Es3ZZyW551+WrYqEmqO\nQPKlIlrqgREwyaPQVXQVpYxhbD2uZC0/EYhwpUPb0s6N92fQQlYORzoLcyfQ\nfoxQbkZwKfc5EieUhDbzV5+rWj2ZNkF0FaheaVH9mur+bzRd7tN6c3nqTHmS\nTOdnm0YfhoI6XMIsTjzPR1zVnpOkSNpBN8UbjT0c4Cyqoq9ggLUZGQqDngT0\nVpSLpxh78foDq1kaCjcohkscut9Zb6WXc+EllOUmaphT7ITwrCYiYjkGhGs0\n0opma/5hLwLKPzWmAYcs9IFCLcYURpnupBFmirHLdWcdUG591aSWuugkyWWu\n7r10SdJ+dqcoBxieAAYoD2g5Es5yPzKoQWxY2xyj9Y+yIzCr+ZveGJRtgfR3\nmqRobJm0cAXUaXevX2aSbXydN3pHg+7QvW3O2Uxy0uS+GYnhtm22XBJXYGLl\nKNxA\r\n=X0Fh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDOFIcjnUa8E3qDNqcthtCxj1yHiFQDP3hDme6sVXYIeAiEA51+PY6LITiUTEQET/2g1s02M4HJa2KVgQrhFZ320aqA="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.25.1-nightly.20200804_1596525389374_0.8702721546217314"},"_hasShrinkwrap":false},"0.26.0-nightly.20200804":{"name":"brs","version":"0.26.0-nightly.20200804","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.26.0-nightly.20200804","dist":{"shasum":"10e5e4f86258e63e3b3309759246fcb9e215a643","integrity":"sha512-U3BYBOuZNkcsvKC+hZROjj8f8+ChkH8CwvyxgSOUTffiQd7pC8bn8jPug2/syz17+A7hO9YkzaB9UeweVL2PCA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.26.0-nightly.20200804.tgz","fileCount":188,"unpackedSize":1134935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKYfoCRA9TVsSAnZWagAAVAgP/AotjMZrbB38l1Pl+0wl\nsIwEB96ixIeUP6R5qod1afQ72KUZhHGq4pnNWlD2Dtx0Wdq5xoxsmrbNlAyL\nnRgKGaXyqzUpHKgpe7E0ccMWG7zrjG6qovHbT+DZXlywkKtVxrhGPnudjWjr\nvGxSK4Oo0cBaZvdHO1m35xxVisVggdD+eIjgap3M9vgRLAi9I4RtjKiXTCyZ\n7SSBGuk6nCEYkLr4TywJ17X/SJdjW8Nrnaco0dPTnOmp4g8WiF5sZKndOOih\nJTEPFFWDQGb/rzfbM1p4QmsDx26BPhfYvGJDMIwDAnYbnLOfaPcNTPs/ABqd\nHY/h/zeXI4IsOJpaaE+S/cpxz6T4Xzou68EaLJ/vLQVx7jZs+JRIMn3xcD8R\nCzHZRXjOth19PRw4EkkqD87duT/9rHhA5EymbCR5WMpX11/1LNCm6PuwlXEE\nTl5rfqQ1oeRQeFkjWDRNyuNe5qgjagbNu/MFWmHZYlM4KvP/iZ9ZiTCKCSNr\ncd+r5GWl/FKkMoLSbNx5pk2Pyo/PJsUEqnNKCVU7ydhwq76SI7JqYDvl01Do\nSavJJgWzbd61nKt4vbD7fwzbekWd4I90pIvcIqqWp9B7dB5La0wbLXD1wPsV\nRIzwn2BCXtHYVe6qWz9zfB/u1EjKla3Xf2KqUhhHapxzYW3QfDhgqeF84jQi\nIXKr\r\n=Qv3Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC2hdjq80g6ET9J5LICLh6EufOJGMg3QU6K2ZXiPvNCfAiEAg7uMGrXLSbwBxxlrGp/+wxZq115L9ln5ZhLcS9qgHz8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.26.0-nightly.20200804_1596557288028_0.0753075621571746"},"_hasShrinkwrap":false},"0.26.0-nightly.20200805":{"name":"brs","version":"0.26.0-nightly.20200805","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.26.0-nightly.20200805","dist":{"shasum":"952f7284406b5343a5740ce031235bdcfa15dfb9","integrity":"sha512-lr9QtoQqNqef9yibkSzLjqqFQSTfUTlzSU5yssa1gEJpc18cdZ/EcvCGixdRXG/mGWKsBu3wft3zUUJgEjNtRw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.26.0-nightly.20200805.tgz","fileCount":188,"unpackedSize":1134935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKlzcCRA9TVsSAnZWagAAuQsP/2wfDIUXC5J6ydelDNzY\nH4GAvjy/JPOm/FJ9rkhCbTJFbm+mWBjwq1k/ODuQz2R2SQWJdhZuD0xEJ8eT\nsCsktxZkbwFS2M4bEYYmnZ8a0+RXM3wJrq36uu8k4C1owCYBjHtn3jMXXM0R\nQshf0+w2Xq20dcn9+Pt9/vYFCEYLdjEH2BHouLKJo8gfMub1UvZOgo5ui0EA\n0WKiws/WQhIjuNUOgxrDE7YJLua5D67iSdcWqldW7Z057q6AmVcvdsZAwWS3\n1CY/GfEvJzrIREfLMTZOZiUN+ApqL14N07A3uH179c9hJSfBt19eA3V0aIND\nVY8Cu7cuwXhFRJG9gnF3OABuTmFycoWGGlqaEM8XIwfPZhh+ywpm1Gv/FyDE\nBRFgszF1vd6f+1LbzNQGLggB/5o3zVN1x/htlJpRyiKsw11ojNenpcJ4L7Sx\nuwMW5ub0sysndbbiNOIDo8Z33z2McJPWL5QNpIq+Kq+2OIn78hlT0OvV+VJF\naWV0TJF+UK12RPGPPqlF0Tn1/CyjQwn/EU6LNFA0s0Vn45rl6obiv47WiE+O\nINT8CAOV3G2ST73EKaaiWJjEMIcvy3rdfQdnMYtaIhWik3NGUsmkcrfn3nn6\nntECe6D0EGKQ1RAYuyp6SOvVeSZymiHhl0dpnp7rfZCh6Y9xzho0Cr2GMKzi\nIz5A\r\n=PohA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFzX5Hf7YrCJsBxBWf+1HCHglUV4rHQZOynhmQRsy6jyAiAmuFPO13fvEl2+qOvG2HdlGlDHgojvZdf1v/QSYcAbIw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.26.0-nightly.20200805_1596611804338_0.6526176969738766"},"_hasShrinkwrap":false},"0.26.0-nightly.20200806":{"name":"brs","version":"0.26.0-nightly.20200806","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.26.0-nightly.20200806","dist":{"shasum":"6e5c016e4fca5d23280270928d7e079091408162","integrity":"sha512-0Hkob8Ooo6ZoDA8uqua1XQZ4vrSEX9UT1XNPR/Fl93LaX+w7ghoA/rQw7Qu6eDVhD0Hb2+uqCccAgV1BYce36w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.26.0-nightly.20200806.tgz","fileCount":188,"unpackedSize":1134935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfK65UCRA9TVsSAnZWagAAnDgP/3f/mUQXMqBwFzX4W510\nqxq5oNyyCJimOtlrhNxZT3W7/BM10d/2oUSiQEUFkv2h9Qbev1Ef1Ifd/Q6A\nfoYwuJpc+ElapdJObVcmuvMSz53qzLpSFv4tYzP8hujgFjhnag2ByzaObAii\nViw74XZHnFnIfQkKeYzrXBeTd5It7oLOmV3wdNmMcUBiUMVsvtKwxVrhFehm\n73zNST76w//TvsKY4IBaAtukLsXf74AuH858cn5118pZ77KnYN7zgozBBelZ\ncEJH8ZsIbKVACyH6QUwOcVuF4UFAkgTHWqLzkU+i4hHAPFRG+D9mz8xwclds\nYSjyP5zV5KBwzsVLIz8JNopr4GITnV5wp5r5vN5mHIDJHb/sSNT7MdVmW+Bn\n/tHBDIxVcfXKndbv8Sntw1wc6J/e594kYte1vmerh0M3qV2YXpyLzNlE18e8\nE1J27lLNWozraINrtxoax9ncS7son/YV1YRPyFkgLhRDa9Icmy4bT880ewho\nj57k69F7RzvbFPM7Hua91ghC4lSMUtIBrXByucaKQwkk/YgNnMT8NMqvRPRS\nXOHxV3MZCLsD49B0+sZuQ+kDj7pb4vVE0e3ECbIjLY4W1GHfK+4uC3q60TJ3\nKKYp19p8xNToufVkgPaz4NhUEizz0v++Tez3T0dYW8G7gYCngHT9gTglNUXp\nhqDW\r\n=WG0w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDB1AM3tHvSBSKqey6xpVmDLkcr2aLZK6lBmRb+TroNwwIgZ8cW8QbDgD37uE7PnN0DV/V95OG9c5salUTg67CAsfU="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.26.0-nightly.20200806_1596698195483_0.8181210803394523"},"_hasShrinkwrap":false},"0.26.1-nightly.20200806":{"name":"brs","version":"0.26.1-nightly.20200806","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.26.1-nightly.20200806","dist":{"shasum":"6871e4098cccc9762aa36513bfa15453e9fe9914","integrity":"sha512-BGm3je2uf7UBvDRjJbZaOleIJJN7+CLGAmiXgwIjiLvrcZ/Agkkey9lmxLfob+2IKot5jr51eQeUT7nYwbLWDg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.26.1-nightly.20200806.tgz","fileCount":188,"unpackedSize":1137024,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLCOdCRA9TVsSAnZWagAAAFIP+wVDC5o7GW8xVjihipBL\nNG+T8xWbKI1jwE7rSI/yqxEqmq0IWBluQLR4cYYyOJxPvQeQmK8caJw01W9b\nyadVw7q+WzhhdFUSJdudpdDZBDFTz1Xx9ZE2S7Ol4Z5oLQOc1PVwrB/4xD5e\nJVfkbUgz27HGPcjYkwrGjsa1Zistn6ibUm0DKIs8oItOnSuLIFUI11nMOeDp\nx+flxagnejQqHBYSLo6KxenF/j5eUwUjMnPL/dMQchpKhPIlN4spHePw0brE\nLfNH1NXEKWAyGSM7R0uBa4hoyPZsgmWUYVt4ytDFyYi0zvEOu+VCnozERk8D\nDHfX9sENeJAMgJjItNbF9+X9X5wrKadlR/VyPemt+3JC+eVXM149dhuS/Q72\nlxF0141ErsFSUF5Mw8AgnHuuvZMiZZsF/aoc+DLU9txARJozI3I88gMjV1UF\nY5ERBhtoK7RMbU31pt2x/66vd4lxo4SCP338m0Rhk6CRFNB/9JerLBXspYdB\n3l4jWYu+ClDzqMbfDicBoz8o3v7ot1CzhEv/VmaOjQhv4XsNPZkl+f140cyP\nhbiKXuMUxT4VUSW8sBjr2kBMNM4O5Xiu9maPzamWYNiygPDgQsQN9uY9gToB\nRPuXOgsn+ZdZTZ9Pf2Z7x8M96ZS1GXh22D4YVu8tDtbFpGx8FofcRIMFrz4T\n6NM4\r\n=gDkU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDH2BkEAPnxjQ+cm2YEmp9l5f6Zi/wnTLtaMBHpoPEyeAiB9aTJi6da2bOVWiViLJ7Jbh5hiA2MiyziEyGcN9J0cfQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.26.1-nightly.20200806_1596728214278_0.09257942612391501"},"_hasShrinkwrap":false},"0.26.1-nightly.20200807":{"name":"brs","version":"0.26.1-nightly.20200807","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.26.1-nightly.20200807","dist":{"shasum":"0ff430fd21ec7ebcb88961fb7a137aa796262815","integrity":"sha512-qmVXa+pReEhC2RrwYdXz9PQOIEaY0wE6SPOJYlZTsld2Mi7cfPa5EysWrxW29Z7jrbBjh1WUWGqCoHj/Xh9ARA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.26.1-nightly.20200807.tgz","fileCount":188,"unpackedSize":1137024,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLP/pCRA9TVsSAnZWagAAbKAQAJdunXBWZtyBnM4t3LHi\nAbsdlJ2SRDG7CMV0a0xsYrbcA7Qfo9circ+ENCax0UEuo7hsTx0h9NVdZ1BA\nfJgcFQAFAzpzsf+dk1ldrJNhffHuZbgII9pSCsQ7YGO2ukmTkA1m4sqgzjV7\nwhk8W/CBHZFqyk92tlz+HzZ3HNwkpReVwIQJnputxxJfdcKhYpSGKsjlNZvJ\nb1IUe1lA+oV2BUAvSs88P9gKGUXPU6eF4WH6e92KNtBBfsLKK/BSX2b2v4o3\n2bHokIYqbITo6ifFo9/FJNba3PwN9fGgnX68MUY20xloEf1LXjAdOK4UWgtE\nHkM3kagZAystPxR/Jq3stIOm+frPpKb1xw2k2N8Lqm8jkYW+Ll+JlAqD6rJ9\nR8J2LCHJrQzCdPSbMoroYfEz7KWcsxyeOyWho17LrzWI3aSb9h1jD+jNDaK9\nVJKY4LhQNMCAd/imA3am1vc5warxm7QaawfCCQySxaJgeL7rJd83OtN+fdZ+\nPwQ9JXRTe8rVdWGxaUWIr1qPG8eji90TPxfI0gTtynzFNjqLN9nG4Mxvuatz\nHPZU1gloQY8Rdxq9qfmdxqyng/X5D8TltTBiPRXTtq1oOD2zo4lJvMzNeENr\nwNwcxLDPYCDfRoV5GHOscSg/33QhZAFfzlmnXYJa7gUqeJln5tv6SJSF2RSH\neK7t\r\n=CydP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAxJG96gIufuWZwpCxdNVFH8uSQIYheQrLIfn//2JkdHAiEAjLgXc2oZNff640Ts/u12ABuouaINyotld6lof2tFLPI="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.26.1-nightly.20200807_1596784617009_0.16227879481807617"},"_hasShrinkwrap":false},"0.26.1-nightly.20200808":{"name":"brs","version":"0.26.1-nightly.20200808","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.26.1-nightly.20200808","dist":{"shasum":"fa216481edfac8729c983b9c79b8d971d291fdb9","integrity":"sha512-j4ntvf57/tYv25Bfpn7lczqxExCfYytBeBC8I6BJPcbodsBRZCT9tXagXurtmhDjug94gM0+JbmoGiftBIiYRA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.26.1-nightly.20200808.tgz","fileCount":188,"unpackedSize":1137024,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLlGPCRA9TVsSAnZWagAAti8P/3bW39AyFA9ecAFqEuWI\nO7JaFGQunvN62HFahHCU/TopfX/IW5t1L3Tu+/gl/foAkTFLFsy/QB33AD7k\neBdMhUt3C5RmR72MAXYGPASHPJvJW7afA5yVdIi/prU1NgAdpzWmuKtP07e4\nLPUXGiWGx/VXmHVliH3lc0m8SuiIPG/2aP1UNsNNGkc6YBKyM9Cb4b8PTMg0\nh3hRfX8zBCXUbXp24itAHs3dPnrMNzw+gKIWWpI2HpvvQi88Pd+dsOXGgN8y\nhtIJTfYavmJAqSWhOn65uCHCexeoV9zUvg75a9wlo7NPXd9Nm+B1P/ZRMWyW\nhLVVFNUNX8mAj1xaPVs1NrTvvz5dD0og1hgDbZ3Ns+S9yEuUZTnQEfs3uIQy\niVI2mpTOZawvIo7jVwhJGT1+sAjgVnbkZJpb+U1B57KbOwdJvcb1ZLPXDaHW\nUfD+E34RKqy8op1g62+md34EoyKKQQFvrIykQFfzLru2lDriExEwaN0oXJds\nVj+rEHuYsiYeUaLAvCwJLLKB04qg/Wz9/2KDX9ulrQRVJHt4t/eH2CqUFbXH\ncdStRnANtIxl3/q6n9LELDYOYhTe1ElWkHWk7myzcVos1CkQItcRlMiv8PWk\nRCDIupyqqHDsj/qT7BR/ltYiVZDj42juv2hq4pSE287QC3yradiKv27kU7Rm\ntaTQ\r\n=Xhhm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0JGJJEdAQXiGYRfKJsk/LBdCuXIjv/xRzeTA4REQLLgIgHOnom5wGcCk3/OzqwzcN8QqU3Fbef+W5dx16iS+ZQz0="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.26.1-nightly.20200808_1596871055330_0.641980634738327"},"_hasShrinkwrap":false},"0.26.1-nightly.20200809":{"name":"brs","version":"0.26.1-nightly.20200809","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.26.1-nightly.20200809","dist":{"shasum":"bf140fecd813f148a25d15776c81f46b31e133ae","integrity":"sha512-msNJnLzOafqmkhCUIG1hQuQp3QZPnSt9X327mkWy8ceLi/dct0RhJOlWRYY4KVQ4/o2j6LyZ5aZLcFvOQK4Rhg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.26.1-nightly.20200809.tgz","fileCount":188,"unpackedSize":1137024,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfL6ORCRA9TVsSAnZWagAAaJ0QAKMut4BsicqBCt0xy9o6\nz9a623qSMm0woZR5HoaIrCO7Uq7fR4mjiB8jt8E6K4w61tdc8DeWdyiSIgGj\nliB87BYwWu69bjW2ebvOQQd0fpov5gU6BEOJanpobfB2EKD38kM5fAZdWpxq\nAWJwM/TQKOexKlsZ3DDauXkk3WTfbDBkLDN2ivSXw0TmjdMZOD0z/ZvlgVjq\nRYCB/ZJTjhgiZKHee7LteCfyp9qWAWkZKuo6tMMHA94JOjzwnmwwgOnjrlxa\nLVyaR3+j4J6VNHIQ2gF13EUOdNIBNfsLoDytqlFFvcnYbe8dI0q5Z8ed/erP\n0qqIOPNlW0+GMHeHwicmJQjMUIaBXTMN9SlrXEgJM6hB3O+tnzqKqJLShLAz\nX+1WC/DGiOLlqPIxA2lLT8u0fJyjlST/kcM4DZrISYsJC5JywNRu/aCwVc4a\nwrlauXkjnfV0R5E+yhTNm0Fu+xTN6MD66FO114t9/kjSuFupQNkAUlJXuoaT\nlv/UQ5gRRVtE0dLIcZ+0hbhPee+N1ai96O5E6juXtZhjziKLzux/07JJzypF\nToLBe0Ztm9yycOEk62ZEcR/8LGvV74r7SkWewgNR57cNy87IPiRwrD8fcQOb\nUozTprOTP8XlxlWiVzDPSyuD8LYBoaiEjGyV42RjWOvJzUTJiDnqjm0ZzI5P\navvp\r\n=sMEg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIwnEKHwYhqHSI4gTyxPV1zQ8/FiXrVLtgdu3UCIiKGgIgHQip+XUhBAC4GdG4uMgEZoNw6xkTbEOmyhFNP8WBPr8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.26.1-nightly.20200809_1596957584580_0.09668206102385013"},"_hasShrinkwrap":false},"0.26.1-nightly.20200810":{"name":"brs","version":"0.26.1-nightly.20200810","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.26.1-nightly.20200810","dist":{"shasum":"e0c08784c013052d97d953d2b4bca8cd2f60a230","integrity":"sha512-9b9AaSCRudud68xnjOcYU5Sw09BihLZl5tsCNHWNpulw1vd+VnRXxNvpR7l3CBx8zA8M2FyTx5K+FbQ61MOAyg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.26.1-nightly.20200810.tgz","fileCount":188,"unpackedSize":1137024,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMPSACRA9TVsSAnZWagAAGWYP/3OcjYr6eMD02xtHOtI4\nJCAkN1Vs1GDv1cK9tfLnMZF4vrwhtfWdsj7Fj9epaVaMMRLIVnAmmT92/jxJ\nM9O5owUssfB4Y7PjXALrZcdAcMN3AlGr3gE5k0+QnUrcGGTlYEjcN01KFlyv\nnDSAXL5I8Uw4osVvP4MWavUqot5aftIWdEmCcojpEKm1O9N7osTBtTP5Urq4\n9/1e5Z9SzhyCREH7UkB/VY9QVZptJ97kJ45HDdoc78SpoSUafJiQMwUXc2bQ\n6yx9KwhGQIxktHwuBYrgnvFFxaQBtiJSwxpZmiC/y8QRAAkduHqkmN3ZPh2J\nMhANEEorbLPlaDh7c2wYvGf+FhP5F8H6W34+gNM7wCVQu61gNo2nhDfh5on0\nPg7LHsFyeIPK1fM56JlAd/qpbZ4NXjhtumK5G3JC1PHFMjphbeZetkqwK9H7\nwlZeRzO7z8lhc01T9W8a0Oqr3m0jZ8yTPJVICUthlW3OQ5qu+cwrv2N53iJd\n5Xs88oV9MP3B/yJwvX+peANWWie5KuLMo/41EyRw3kxSb9499J08DhDVVg1p\nSvS8S5WwqTlYiw5r4RQON6RfVdlZzn4s1MUD5oaVfgJtMD5B8WBshgjB2VlU\ngBPEh87EVv9b7iPNH3ofZzXgwiw2jrFSLxFPUoKI3OIPOBLyUZBPqVrKjoPX\noRg5\r\n=LCgL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGJmf0yw2GkFmucFkEeZoyLa9MvxKIC/duWixR0XWhfkAiEA8xxgiPiZfuQfO8RCs8caGHcDOKVLdxoHIPNd7lUWht8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.26.1-nightly.20200810_1597043839938_0.5299773799662952"},"_hasShrinkwrap":false},"0.26.0":{"name":"brs","version":"0.26.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.26.0","dist":{"shasum":"27c52f038555d12490259cf81a63cfbf23b8cabc","integrity":"sha512-Q+pE3I5Jntw39hqv5vMmiLQcL1eaEWBD6f21emHi1JMA9Lgl+EbWzUNFpfshd0BLq+r5+80PAg2jVB2vkZbXlQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.26.0.tgz","fileCount":188,"unpackedSize":1134918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMY3cCRA9TVsSAnZWagAAGOcP/0LI68K/CnaR+tBAIJ7u\n520/f82qmRlF+mMMrgg8rDD//Y8IpM4VDLpM/LRMHvKYtpsnJA9IEkqdGrKm\nidfHtxyO5CwyoFYhUjmWjCAI569WYsyoQ/rbZib14WqFYWK9gDcxo/VazSWS\nD1Tm9gGedXysuJ4/xRQT56EOecmghe4LCDbcsW8rbIxZLx5qj7PxlJ25RvWf\n1l0+dj+srOWyRTAoGNobQ0GVdKMpe3G1ZRUp9CVwP9JDQ7B7HKFMxCDGAkQs\nCqAvPVwEqsTBj4CcKPqL42RueLj7qm40VDgI5masHH2avNhyIk015HWF0Y5z\nmfaOeuJg1h1gw+uho5O+GrJUyiVSmK+gQR1cxmh8ckAkvoMI2Qh1cyQ4CwS8\ne4zDzRtNpsF6Q7B4UlqCaU3Zm3pZcvHtnqckz9UVSNaeFToN5bDJCD+MSoLw\nG668U1Y3UFndqf3UmOVvlAPOLMtricn+UTknnwHyLMHcRppkwlQkJC7LDmXo\nC01FFZ5Uf+VzL6CK8M2K0vDXurukQIkxgiTLxBkyAcxRCGM9Cr+J8Ymok6n1\nsST2txM1BI51RS55u7V+dZibyK8GBFkLdOz59z3azZ3jKDS5+Ni/dXCRu7lh\nVydqlDVL9glYx26r3Gcks7L5xAIJDDVsgHauAb5U6Tm0BotA5G5PrtIVVqO6\nYIrl\r\n=OR6M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0ZNfTM3P0+gzbfwLRnYhhRK+1WGImanENid4uu7YXrAIgZBnPMWYFwaCjfeUYtIYlWYjUmb1QB2oAd49IG/NQ4sc="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.26.0_1597083099798_0.18718523861341496"},"_hasShrinkwrap":false},"0.26.1":{"name":"brs","version":"0.26.1","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.26.1","dist":{"shasum":"47098fe65e37d5292b11121a8787a15718c5b429","integrity":"sha512-Et6eNDaWuYFAFV9K7RW3tDDFjCh+yJ03nQIj9PVKx4l5qhl+9iXdrT20Uq981ZRAY5UiDNx4Z4xep2nsSmsWgQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.26.1.tgz","fileCount":188,"unpackedSize":1137007,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMZkDCRA9TVsSAnZWagAAhDkQAJ3UPD8vQ/jsWp+yHwdy\nO4PGRkiF6X9qO794qNMSDwNSr2WvixpWxASYGEirds5iEawrW++pYpXVvkTy\n4LL30MOOT2e1REVuh54uBkYo7ML41itq1H2Lf6/Hb2cogITnXOKVWHiaSEDN\n3n6wuvWO0R+q5Ev/9eycTOVJmaO+TgZvbKR9cV4eXdTvOn403Q+loI9zhXRY\nX49B/hRsr1UoMGO32WnqfxdF8Fomy9cjU357RTO/zAuPjcP8bKeu3D7lh+vB\nAQre3z3grCmKyEivsTQjy6fhUBdLPJBmOy5A9oto8FmZGLECaWKI38tCHurl\n/HSl8jydaOd/RECy2JOgqbd1asX/sYQDh0mOTh7fMKlVDbaLXPgCWU80Xc0r\nQutXxtvgCs9ZiIFFv+QLvJGuglSY9pSxTxbwXCBPAf+i0EYEqWMP2sy3YjX7\nU4mejcxHAvYs/F53LH4aimXotv0mox3TaJv6tYLnaFuPDjy+Ye572xRf3AkH\nGX2hf/QN3iumjK2t7YDqapKS4yHFATlajiOILjK0PG5nddOOMTt0dV+zUVzf\nDImJu6HsWDAmWD9B08tRp5PSz/2F0+RwcSdmuF9flQYc3eeOwOYcHRhDM/Y2\nR+9yXSWjq7w9p7iRuMavyqoeYa5xxAEO2RG3tL8R2oOYror71d4klEXpSnkW\njGum\r\n=G6YJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEMIbCq0BcypeIlQ/DMaEgJx98CdEhhTYtJT+/9qicqHAiB0n9SV0EhWtlXY+g6mxdBNjGL5xIEMnTeM2YlbYh8kbg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.26.1_1597085954668_0.7672592710060864"},"_hasShrinkwrap":false},"0.26.1-nightly.20200811":{"name":"brs","version":"0.26.1-nightly.20200811","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.26.1-nightly.20200811","dist":{"shasum":"dd6e81f5221eec9840e745b5e7b23694a808ec37","integrity":"sha512-7sMJ+NUQrkceURItrEm/wMosb9rfa0VntcuOB35fQiL6oOz7yGylrrMFh71cbuajbw1UNHEajZMPIP0NiSJ+nw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.26.1-nightly.20200811.tgz","fileCount":188,"unpackedSize":1138108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMka2CRA9TVsSAnZWagAATkUQAI2KcChNSA7llsS/Uxyq\nVhTX/w030GuVkvq0O4Ttjtc1Mi2K9tIa58Hfi6QlE2Yec5uw1UjSsvRZ6SwB\nFHMfSeL1mdfx3ZLv9gP1VBJPTyh8yiB/hRB5GiwZRbJJkxOlb/2dLvEYG/Bu\n4I1WTCyGYa+nAlKBDjme+n0s3Hsxgz3+a1ADd8KbDIinParillSWEY0h6XLI\nxNho9yuAz0TYFhkeLE5/3yddKTNoRCu25225aCdGPeesDgI71Lro21rgQFtN\nlQoUzbSB11vvFTeFjlIyIG68ehDA1YrqNu9vL/nSClQJ8xCWYLCjT7lgBiPc\n5Qizy3iicoGBTlDI8AvPxVlaTc93idkC/JDH/0n22MI0BhHp5zaWEeVcCMtC\nWwCvdZL1e5HGSTPflUW009/3FwiT8oig0JYAggPvT5ThYNAFFVhAFKo+nVU+\nJu0PcuLlpAJst7kjZSlPsxng6zLgz+W9WyyWgf2fbxE5SEtRpx/VRfN6ZxxY\nMB7r1jkLuuqfaf2S+dyryWGO/6xWYGJKO1s66t+xs1YjuQyBMQQ3EbBUoEew\nXwluKOUcktiaiWb9U0w398ha+kXvJk+98LPAvPrG90biUEZjI3zWhXNxV8Sw\n6kF6yEkFq87zYTVvoUmoNTI1wXzlmbqiNluB7ecUhqEZTzBQsk/5oqTz2Qi+\nLr+z\r\n=R8xH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDt+KO4B/gu6TD+hGbTB/fBAP/ywoH4MZTHaFprQhxUowIgZzKDVRiAx66KUTQbP5Xa0BtHo0V6mHTzf4Wc+TRk4rM="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.26.1-nightly.20200811_1597130421760_0.9742431951029571"},"_hasShrinkwrap":false},"0.27.0":{"name":"brs","version":"0.27.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.27.0","dist":{"shasum":"97280155ecea8b4657e9268cc8a758a9853b8c77","integrity":"sha512-PTnKd4e/fLFhT7HDevcIzWV7tvHusmIcvusxLb1aE0CjUJbAmp5p5bz7zPpzS+yjMzl0QV18J1cWS5GRZRKDvQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.27.0.tgz","fileCount":188,"unpackedSize":1138091,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMt76CRA9TVsSAnZWagAAonsP/RUMizg1lP/y390DzmpI\nRrQ1d6OSFk9A3cv3WNGKFhHkVEri+25hj7xUVnBEFCmNEqd/GonC0K9gCT4N\nY/NRzBmVo4fQ+zb4zsHR+K+P02QQAJYoYh+vXSv3oEbxpTyCTq5KNC9k6Tvx\nlqraTOchAhXMM8kjIAdia7b6mtW0WUuWHGBuEY3WiPD72BPr3XTUPgHiiizM\nDIR0wwgG5ARCgY3+0sxDshx4ShJcvFvIOYu2kMkQXgZg7kCLyAIalrgOxAOS\nBZlOxv/N/28AMxJ5PlZT0HTz7JBI/KA9hluxFc2rrY0Z4WKMcvgTPkYV0Js1\nSXv0umn2v8sRqMyo8iabdyY3+YqEqRFoELcRDIZalAQkbSLhSRyHg9M8yhZ7\n578oSFE0mbVuZFRwYq6ds/vWQzjuXgi7RHzfP449GqPLo/MUwfpOJiTP8XUH\nCfBdy17L3wxiD8n9yW7mpm4KiXg6bTd7DEPaebxuDx9CfQzzukdMspg4ynOo\nGL94KL0QUvcZJgH2o/rSQbdQU/VUPeZd9JcAfocbHw3wdFy5UtOOHwvW0N//\nmoLi42bI8FAlLpbK7b3VuYT9J09WLGQPGO5JghHdT1aNjAmmd5sZpFmdm6gq\n+pTsyxaf8JFkkBu+fLjSUFoE+loXVmZWAhgLJEgUF2BMTSHVv0HekeBPU9+Q\n3gYl\r\n=Og0c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMJ2DifFFe9ZBtfPQgpKIjfk4P56NFna4G0PjRTS25pQIhAOcO5MFbyqPDEALU/FYo4dqLkeTjQKF7oeXQ+ncDH6IY"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.27.0_1597169402094_0.9422152770763523"},"_hasShrinkwrap":false},"0.27.0-nightly.20200812":{"name":"brs","version":"0.27.0-nightly.20200812","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.27.0-nightly.20200812","dist":{"shasum":"950119f80b71818873e3a298c17a8bbac6209936","integrity":"sha512-WDLts6mr14Hif4luDyxpQYIe4S0VOCvF/iSl+abAooM0SdqyCBoxPz1EueFWX856eTfmtezT/R7AKWnogB0Jvg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.27.0-nightly.20200812.tgz","fileCount":188,"unpackedSize":1138108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfM5ebCRA9TVsSAnZWagAAQgwQAIb2AMXlrAVDHuDPxaaN\ng1W4glQIWU+IGuskRQ6PjD9Wup2P4Yy9HBZypqEsBtRyknV8BlVOGezSyat7\nBlwfW696ZkclCqmk3cGGCQT4FF0R6MpIt+lDBw+1h1rq9j1pdsQoIJcmcn6x\nUNyfvyEs8gAHLBYDu4WMnPcmJWkSh7xh8l2NOxpX1ZkTQONUCdiuZ197M7lo\nvmErCVoP4kFjQIFEEVZaHIf1FtpbIeXLMY4rfTXDKR/6D+ylCIssxwuZNqIb\nSq/CHc6G/NkulV0OIhRYfJ2W0+0yIwa+ti4aDSZ2ps/+ByRFdUz1ArySlY16\npLrcpHjuvL9O1DR+AGM0rb0r+OZ9TlHFJvb1oWOrYhDGiEMeiu0eOJtMTAMK\nwfegP6P6DN5ZZqmm6xmq9Bt/6qkUvcn1jYrkRL/7QUoXuBwosv0OmP89YCL1\nFRtw6Vy1mGpJ1dubI2OIXKsPymUDgcWz/eR8yxL/TdA5ZzXhKxEXxrYBPfdx\nAkdkFcqFSfrh5fxdCHMijPSJ3L0TccCCVkziruIf13IE1mTCDfbxexu+lTo+\nvXyOiy6dw3nxMteOZ7cdtAwfhA1ZV9Ct1KQrv1ARHU+k6mPQO1SIPF6rf0ip\nluU89YCSQ0Ln5AGjZqEnz465Ue/DJGWB+2W/LNiSxCEaVzUuAZsGZVhzoRsD\nnuuU\r\n=EKp3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICHsejKBTnall9uUdaQSVELWGVAfm/Cj6yYRytF9ndkWAiEAhCsb1zZZiGCxDqnU1kOKS6WdoXJahH4O7arRYjG2lWI="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.27.0-nightly.20200812_1597216666931_0.2644582671811304"},"_hasShrinkwrap":false},"0.27.0-nightly.20200813":{"name":"brs","version":"0.27.0-nightly.20200813","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.27.0-nightly.20200813","dist":{"shasum":"326e998cd77b86885cdb4db174e5da20b4c809c5","integrity":"sha512-R33U2/w+l12p7xqzqXOJ6hhbBX7WNLOWAyU702IhGnnRZGiuzBWfi1QERamk9cfCPoo5/QubkHfC+500ZORjTw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.27.0-nightly.20200813.tgz","fileCount":188,"unpackedSize":1138108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNOkYCRA9TVsSAnZWagAAkxIP/Ag4K6Abyl84DFtrrggU\nOo20VUjvjnhLzoa9QYWCPT/uTexjw6iCG6pvs8gmF2nlIkcm5pKTy82Bk3e9\nir975uZ9DmBbtO0wR+sr1vXGYiuZgTo5d5xTiyoEQnoS5yiRKPVgthwefXF9\n3SfJXWca5qtELD9uZp9jYWYO775wQFEoLRUYoh4Rq8qFq7Uq1kHF+5Hs760E\n5ZwpT8ZNWU0PU67Fb4kTn6jCIppsXBqflTRC6dBvgZrWyjTZJDTf4e7lvc7K\npulbls3/sOoiD8z3pSYKJBet1a0kFVp6Rwyx4yPEu0mZ2UPXZBw6LwkkHtPQ\nOolLDSbQK+ECxVFoiScw6S2Ldo36SptwVtFy7/U3o8SBns6u8u6GqYfifnYI\nJKG18nxgt25s9ZOMagYuI8FGmbU001aTSEpzVpERSXLnaljvCgjJ2cCkE5O6\n9SOuWahnkqsYjOLQrXg6knWaJGxLbISsVTXXmdSKAOyQrrDhpw+Zoavd/DN7\nyVKtgwvg2uSqQcYDySz8jPFHsRflMsxawzWfd6S6PGrH2w5kRiWlbI+BJLRK\nvIKgoypwXlhzuqErgDwZumAFsVVgjI2S/etGaMQ4InySoY3tb1uyCpZQz1kV\nfx6rUdgMV4xnVeKqb3BKIH4T7RN0f+eqNq4UFcLoM74jCx1Yx16jM9ZM7G2C\nGig0\r\n=OLb1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCF/RyXierbWDer4g7PY7WTC8K7VeOuFmXVS5Ty2WynJAIgYskePNdjggr2utmfXf6lXHyv0tLUclMchTjuPI44mIw="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.27.0-nightly.20200813_1597303063770_0.21093905299825155"},"_hasShrinkwrap":false},"0.27.0-nightly.20200814":{"name":"brs","version":"0.27.0-nightly.20200814","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.27.0-nightly.20200814","dist":{"shasum":"3d6440395cf8d713955e77977948d2fd23b26a83","integrity":"sha512-gqDL9ppfwkdOMcMY3ekOuj0o3F4UHHRo6F6H28RMrMr0qwQ56QDHD1PDwhoNnVI47BAuRV5eIF4UKqUKEeewSg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.27.0-nightly.20200814.tgz","fileCount":188,"unpackedSize":1138108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNjqICRA9TVsSAnZWagAAw1kQAKIkgnCNQNgFfhVVi8sf\nuJvsxS7U/aoA+01reZ8qV3mdkcDv/d5rF/LOensBfZAvo3keGk9Dh3Ge31W0\ngLBrIRX7AGBcGoTEytN1tegl56JEuXQobbh/MD8DSSOk1ta9Op8OF18gEG5u\nid0uPOBpPWO/+Ue1xHtLzS46xFPUlgINAOcuRxVU/cdOI1EwV4bWra2uJS1f\nfnxXlxzi35ObG1gPKZhEFpJvvLaYdD80BPvCtWT4Ajp8PN0RP47G9xBXvit+\nyU05oOs4K5zdpwTA3Xi3W0/C0TOwfUqZsch10y9SaVBtOKh3SI/0dxqcRVkO\n7LDPN2mnSvJGrUEB9CiIbBHqusx4hvXrIC/8M5iyl3zksG97A0iHwAU1g0c8\nJxzV9ylSu9Q21P0+W+J+zfcih1a0HVEY8IhrEe4lE01/0zToxylBHW+1gdSo\njYLbJAFd0dCUr904q1Y8k3xnRPCNbym+G8UcWtAn6P6sfU39HfYoszDGRIpi\nUh8xmMHK0o8/FP/DSx+8rC7UttlnSghqE0IDaXQvI5xp0TVEeNLyz82JYPsu\naaFwIZ3OgzAktEDsOWTJ83fTl2su/KGMJ02lxUl7GEErHt4b+O0xzu92QCE8\n2faSz+G/wFYQl+8v73lMQwX0pDtbjLzkzPVWAs/RLWYfR98ub2lg1LXnMDhI\n17wK\r\n=zdSw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCp/WaH6NmY8unYlmVdSXK81YDTN30shT/IYQdeMU39egIgKZxaboFEZp//RWOfoAA50nmDtQfZ+NLXeWHHFraVq1I="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.27.0-nightly.20200814_1597389448092_0.5024060378817443"},"_hasShrinkwrap":false},"0.27.0-nightly.20200815":{"name":"brs","version":"0.27.0-nightly.20200815","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.27.0-nightly.20200815","dist":{"shasum":"ac56a20d55d131e77d5e8f165ca7e814fb9f4e79","integrity":"sha512-5mfpYEUh6MP72IDkpOoqaqZVkP6fyKrZb4sts0+3YEmu0cvFPPjJ5itHwdta5eGUxj7DaGK0xZ7CLCP+KAOTRQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.27.0-nightly.20200815.tgz","fileCount":188,"unpackedSize":1138108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfN4wXCRA9TVsSAnZWagAAOcQP/2rL6iSeXkI54SSuXYRr\nErhLmfZVLT9KulaK1ei3LDny8fyzFEZwprcaTyEjds6egiDNM9ZmjlarLdCF\nKlbA+VLfnZfERTS+qgpc0blg5gqjVBhy2HkhzjBaFLLdqMON06uAeRhYj98z\nkJSCSNXRFWFaIA1tH0fIGLPNB0eHJicK++g6sXUhwq6Knl+DLvWckUpvPf0D\n8pYfDrvkzZenB3pO1NsMvmo99zfXWlRTtusZSQLCoLqVJU8eeRfZg4DQ+804\nsRSK1/dBSKNWWalIZF8qs7fUPHtXQpOlDfkCYmrlWKPR1aVGbRTdlWSYmZPW\n5zAgeUSTLEgTeaRMDqsOn7ZfRm1lbEYZLaDZXz304UYqurII66Aiqq233/7X\nXzZCzIFmNT6mXasQ1Tvn2HgXZHkZB28ojke5ogmEYf8CW41dpR/bXDK2O1+m\nv9SLdIoPTKr+kqhgKdx3hCEWQ8hcW0al3gGkB+hlme42NPl4ts2z+m5Gu2jE\n/HSUtVlUAPj2bkj8WghnnJ3e9Dl5iGz+zbA5Of7UQVdaoiAOQ91m8nSwaHdp\namqfAUYwp3Z8fxV19Tlukbg6IYUUSCpY+tiyhQPZ17QW2tCU+YtSJ7UUxBxp\nr5Mp/f4o4bOMvxyVP8iSnv+N3f/kkaGjQeudBIvtSxDVTs5hHsM9N56od9a8\neK0J\r\n=I04l\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEK+GG9loCJgDcqs+Eo3+a9FgVFzV/CM0a/KimOuNj9FAiBH/5v77WsC0xtvYFfmXZnjn3Vbw7JTsAijVP7tlv4cRQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.27.0-nightly.20200815_1597475862730_0.6903005828283157"},"_hasShrinkwrap":false},"0.27.0-nightly.20200816":{"name":"brs","version":"0.27.0-nightly.20200816","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.27.0-nightly.20200816","dist":{"shasum":"8d2bf8b06fb2772428214465d1c533c94fb0d581","integrity":"sha512-qtmwE5F+n9ygZ3lHz+qBE8tBGRFpjQ+Q9Eg5wn5m1lTJfgkQR4gfrAQlVZ+ld7hy9+rbS4lcgbHjBlXNekAsrQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.27.0-nightly.20200816.tgz","fileCount":188,"unpackedSize":1138108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfON2qCRA9TVsSAnZWagAAQPsQAIPBvpabGCkjJqNPgQz9\nrNjOpATQzE8+rdj0InyOq/fhkiNNUaMl68OH9N6y/OgCfMnLaVZ9l9Y2jOtG\nd8o0ouAI/RLBehlK9lY67gUf2ZfKmg5dqot5rw7yDLuFw7jGI3wBgeSXMpI4\nsZWL/nSurz8i7rwlwX1eeNae4fi32zheObL1xisAJl+bdyWfzXC8EzdKooBJ\nSTzmg3D+LixLIlmi473Kylgg7Ft1dw3BcLuIme3McVAjTGPqetDaYSqUOi+j\n/lSecMuRCG3TbdYURspfIq9mqayWMZSLhELXjPC7pgZEku1p7HFENFBhEK/X\nC99ZpOchk8WSxktgkWSBqE7blGB7seIAHDUflp8tH4SMOb4qzhWMLdzhh/r3\nQaDlqm1zgpdbkmRBQ9fWApsCsyh28kQIA74pOQLWnaCe1dKaiEi4mcH0gsdW\n6nReBVxHn6r3sT36VIQzsDGdJhGXD85Yfhsad1PhlgC3LDZwPEPFPeaFMu2S\nXnlfgUXkp3DCOeN6xBSH3Nbx+5Q/0GfKKGwRMwl11xz312DjM9fB+YiSRBSb\nm/2b0wS+B9m6XRlR8X6O3jCotXHa6CozGTcwFzoiLxNs/583HzKs1Z1KFAWh\n3GbdArltV9rPMxQ6VwjEJ5V3+2+LFeI7juNM6rfOM86emZiKIR9QhTOzd74p\ns3KS\r\n=Zcyv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFFsfhKM56CLkwct3um+jPN2ltjaKjDvu/42X981EhZgAiEA1Jw9xJuW30rO9ZAcVNAR2/JZpmDoavpUfxEvADZroYI="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.27.0-nightly.20200816_1597562282048_0.9819706924693905"},"_hasShrinkwrap":false},"0.27.0-nightly.20200817":{"name":"brs","version":"0.27.0-nightly.20200817","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.27.0-nightly.20200817","dist":{"shasum":"0ec9934aa09fcad564b2a87a871a0e1d1a6ccc32","integrity":"sha512-0kHp6raVMWjgROaNqQAp5/MIsegxpjO+GrCr1U8JBLA4+r5cebt7i4vdDW3SQBTWVMreEiPFKG24BlOTIaJKRQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.27.0-nightly.20200817.tgz","fileCount":188,"unpackedSize":1138108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOi8nCRA9TVsSAnZWagAAU/0QAIfhNWfXgUooE9Dyt8ec\niXDExyM53muLPRqe7vLFy4gBtzYpZ2WXSxhUUXfHly5xtYG0ghsQOsuoUXa7\n8Tid4dARYZdmVY11C47Sx+Yk1SOWefu+qSJA5nW6L6MMiU3ChJHAShkvKAE+\nxDrrEtJPiBCS4SICHFMG7XW1e4pT/ySA2+jWMoOR1H+DEkCzWm1ROWSeuuXZ\nFGVykXVelCsyr3tKWBb3/NRqaOZsz75kF+aLKHYYOgw+NRv42qMTQwDBQA1D\naE9e0Opa7F9FjmaHTevteGElpmcRUWCHBRSV0yTZ6j8jM1Erc5dGR/ndP0Dc\n7cb4MqO0uLMb188XB7J+YMrRm9QBEppGP9PYi5/suZjMy5vzBewzFdNB6oEA\nN3Ya5Nf5Ee2hFi4JfIpx1+tbnW5PdxXofKjOgNdRD6BNSeJsx7GfbS5BZJ8h\nP9cvTK4CicoRyBr/eSGq3t4uHqJs+TOEvULz67iYqeNoo0Hos6OhtsCExsYY\nqqCpQdqtkmdQsnaWYKb5jQgZs564/tDCkw1qEwMVuM5C1vB9RU2TYmfxrqYC\nRsxTA7g9c8qOvGW2IAarX73GowsjM4CbyK2MJI28QOzofjooszacKIe2a2Ka\n11Zg0HnAU179l2g1aphKlbsmCz5wF7LLBHPTNqMl6MRGcykxfcU7hrNE+LxQ\n+5aW\r\n=Vxvl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDBRFachDzgTE+j3sDgTBF6+GNAlDToGId+679shiL7cAiEAheHb42tZ2WDGpgaU6R8ALiulhRZjV7kLs/ARihQIdZo="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.27.0-nightly.20200817_1597648678780_0.5764063632442942"},"_hasShrinkwrap":false},"0.27.0-nightly.20200818":{"name":"brs","version":"0.27.0-nightly.20200818","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.27.0-nightly.20200818","dist":{"shasum":"357093670d1849cd1ee7a77f884e712441ccb74b","integrity":"sha512-RLR7klg88CCMNqWS0IwQTFqyvoCbi8sShHTLJsSWftsarjFKjf66/x7OIuBo27MK0qH8sqBRju87N4Dxcu8T5w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.27.0-nightly.20200818.tgz","fileCount":188,"unpackedSize":1138108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfO4CkCRA9TVsSAnZWagAAQdwP/RVr90eZPS0+F8KSTv7t\nUW/hXin3h7hk48mwLKz15zY85fcZVzAtrBSjrSJYjpCtDQHX1mUmsjusVDSy\nOF5y8kAevpbAkGsQmOcFo4HpkTQojd9fPmITnCIpiVrGmWvHm2eP1asa95fN\nWCyJ6/+OdjoWCKTQ3Xa1NhmeqW0AmcSulbsgNYE4/8YwAD+QxUVqBEJ9Ga51\n2zBkr4OQoELNgvKhIlXlqi5YGXYa+j+0uHLVFgXdcc4oWAO6j7kLee0fHAqB\n0BmtPxe5YsDXlyxgaKX7rhuq7iVc8xCY3U9jw4Vm4daomQmRFX06TdIsUqB0\nvg2gWTJyXt6Ff9PmlQN0igRrHMb2q3cXOvg4l0dbEm9ortWaiCbr+WyhYbOW\n9J3TmJNXECaikVvZNwWewj2wvrAIjZYqFXSvhbZxRMV64vhO3QXF30hg/psH\nVstht4Q6GNgskhGVpjLB0BXEeOIYBtXO5E0lkuM+M4ltBiACJCuAmXaryDQd\nnC2f3uBtYx/+G4FND5MHJuIvOOGrwChH1Onl1swjOxlt7W21G2IzaEnk8oG9\nSPpkZLRRsrjCRrANHbtxqZnV4GbzVOySg6SWAHQtFVNMZTjezFKwK2JMaRop\nmlSIJUP0iiNTPabWs/Vw8ncUzgBEuz2nRv+ff0Id6buunIm23/kqRBoNMv/t\ngYGS\r\n=cVlU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvy1DrECZuVDx6Ghns8ZgeYyq0rEoSZdPUr9CpWLKXVQIhAM7iPb4BAcY80bBefVI1+BLWU/LRRy7Yoeo2z4y59E6n"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.27.0-nightly.20200818_1597735076363_0.5687823095281936"},"_hasShrinkwrap":false},"0.27.0-nightly.20200819":{"name":"brs","version":"0.27.0-nightly.20200819","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.27.0-nightly.20200819","dist":{"shasum":"444d5401b910331f81a2b15b84c42f59e5522230","integrity":"sha512-ctPeHMJ2NGtbrN+rTV5pSGQYSlp/RjxFrATPfOW6vxN7xka+NvYv4BYIGMmXW2pkHnJaW6c8RNszLLMYCm9cqw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.27.0-nightly.20200819.tgz","fileCount":188,"unpackedSize":1142890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPNIjCRA9TVsSAnZWagAA66cP/iL5WuuwdrVU7TDSzRBD\n+tW4nSmBrdRmdobdTZM+Noaaq+84PV9pJilDvU0AMPepvcA6S08nd1F9O0zp\nFYgYXDnDwThxeKzt7VCDqwpgbrXnIESq2Q1zX6Wdd9H4iFTSh2vhJv8bOK//\niQ1/rsEBw8gSUecPaFp6UzZ3lCSxe+obvCySp2JaSYoXBdmAi0UcXEM3qJSU\n00+pr92583LOcW88VsS9IpAeGl/VhKu5MLjrDh05MAMWd+hNkFJO4+TfI5qN\n+s0iQ0myFhW/7NHFuZrM2hx6vmfcVMqR/jJgcklZJnNma27d9F7u0Yw51kaN\n2zMlJWYIKRW8zJB+xYj4mxUXOlEq3TECggJV1r5n1pO7q4q29RdE5VXmalBK\n754pI8eUKxl64fjyFAw/YajYEt2DD0NphwqL26hqRMtTo50YEgywC7I6XAiC\nP0u1smEmzySmvT37OLI68c5afKlvxHGyJjMM+saY1sBga5Q6RXm7wVo5LqFe\nz1+S3Xsd1f9xwnoYsOZBfhpX6d7ImnMz58FcOU2/I6G86yPcyWldPPWj01BR\ncQJcLGOWn9h6crzNKHAW93jXDpHXilmZTzCavzIto9IbjAR3Jx5p7cKBEhAJ\n8IJlZ2KRd7dOAGnkY4uOXpA79a4hmhf9A2g8vRV6B3GwUXxXW27oDURuSI6G\n7Lhs\r\n=K071\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCqy6F7tqHxcoC6l0JxzhN4J9GemrNPJ5Y7tCp4klpycAIhAI7c0dnjxo1fuSFBKWiuDRCbTyivHz0XAWThHn+alxaY"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.27.0-nightly.20200819_1597821475135_0.6965881685027928"},"_hasShrinkwrap":false},"0.27.0-nightly.20200820":{"name":"brs","version":"0.27.0-nightly.20200820","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.27.0-nightly.20200820","dist":{"shasum":"2711d4b2404ddea790f0a9863014e9a6adc40afb","integrity":"sha512-ONBwS5D/w0CpfjPb5lNvvVkJfQNUliP33yHOpqiN02+/BTs2nlDUNfKYP4EwT+mwsTKLDuanRf4JXtHAVp41yQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.27.0-nightly.20200820.tgz","fileCount":190,"unpackedSize":1148798,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPiOqCRA9TVsSAnZWagAAERwP/iR+lTMIyzODWR9RF+LX\nV4Z4Equ3AQZU7fU/j90tQZbk7rdpEE7RnzPYOYAYFAcLmNS60tF+0eVuLLFB\n/18iTgIIlzsCkSPtzw22mdVDI25rGfVzOmUCqgqPPqSweY+ClS0gcXglPYTb\n+kPWpdAVvXc7FtBYQOy0t8/fg4HYaqvhMTNXbK7o+vzL3f1T7GEg6evAtxbX\n6oi1bYndfXgoElBMwjRjXcW/jIPPMcoBK9klMP9N4iAgRpTi0Jgok7IXs58F\n/cqAx94Ir3dBMV8rCpdcGMEcfIPzMEK+6LDcWBRKqUtcve2JDuiqv5x2k3yB\nGCLDdLqsbcCx9DyGgMVXcL1g0bQmEZ4UPjcldXX9GZN12fvozUTCDtZSbiTw\nj2s04374rGOWtXM4mlFpYF2yV/5aLjoEjums6YE1EfAe2tFUSCLXLdAwGzCS\nJFs5cuobXgj00pN5k7rJgG0lVmLvMrSgjBRdpQNWU1hbziWySATsrynao85P\ngWZ05ZRBIBWYaP3paZ/N2H0dh2CkQ86bxJlEHwwi4YYuvGILFlBUPICpuRX1\ntklQcAKD18kGn7NexU1yV2hRvpXZQE/BZDRQBq0ibg9AGWKu2ohVn1U/DeUc\naZIoVmq7b/7YArqyZUHt+QhNsxvjyekzW+UHCir/zd/RWEXfbfibm5r7qfOU\nayk/\r\n=e1lr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDsK8gwKHHUm2r6KOQXBgqx45cK3mUQ1Qd2ZjlVyOlGtAIgTwWLLlhHadE6jpw5qtFIAoztgBb3dv3sghk3jPj7b0o="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.27.0-nightly.20200820_1597907881519_0.9642406011505615"},"_hasShrinkwrap":false},"0.27.0-nightly.20200821":{"name":"brs","version":"0.27.0-nightly.20200821","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.27.0-nightly.20200821","dist":{"shasum":"76fdb411d3e114d5ee40d001eea974e292679cf4","integrity":"sha512-Q/vqaaxPTDiiSO/tpNTsucyL8ZJ0Cb0smb/y5TM63xddi9Tqhs+NCngR51YwVnCalKFwZlmpWXzcpj17xu2CqQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.27.0-nightly.20200821.tgz","fileCount":190,"unpackedSize":1148798,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfP3UtCRA9TVsSAnZWagAA9roP/2RkBuyDsPg+9Trr4yRg\nUNj0S3vZl6jQLyAhZ2xpVpT3BcmiuPO0sDokmC4tEcJgcL7lbFdLOs04bjjs\nW5dunjtzZ6TECgyKyihokBL/I33Dw6eY1+sVqa6BCuYlhK23K0RC29TdBB2Y\nYSv/gx+wQ3raah+zN7bUDaYdwkFxySSf9WgTxuyDwDqjjbd4BU7WQ+kt3iDD\nLa24wfAcTWAYSAfOfQhLzJYAbEw/Tiyt485GXAZYr54f/MWRQQmxCOnV2/an\nLrcuOQoJbuDXnnHeVNTpmzDO5R2HUf7NyxKyLT6IfY01LFIX0G1Mm1/yxkRw\nfeXHHAu/808SmYXPDLJvkCrhnPvumrg7gqO8J/zxr0iBYqGuNOHCHt83qxGJ\nWzd30dCvTJ3lMQSwl/kuwJtFfr6sa+jBbXANnIRHwA46bpiCF8BxSF3s5Sm7\nZ5wpw2f4Uu1WB2x+2EoQSC4DHiXDuLc6Q173PzzSomh5t+Rc3CtD/t/PgocT\nKxkkk+tushMbu6+zmKyHhf0CqmjY8A8tpeT8plj4SoK8qD1nemm5MxODHaJl\nSQdIGlkWFr+EBDYrMpw6TjA5GwZrXgbiyTssd1j6vpmSyf11ziAz9/eHKJoP\nd5a6QTN9aVDL3U+Oo2U7VSrD1kkICtH9NjQBmUcLmqGcRQ5zBOmLgPCjqRe7\nzqSt\r\n=Bok3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBqdXpV0OonwGk7RJ3MmqXjTjNq170fL2mAfNM2nvGosAiBtPeP2oJOQIT79WROGaLfcwvAxdomq72W0IsQJWUM6MA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.27.0-nightly.20200821_1597994284471_0.7878656035414335"},"_hasShrinkwrap":false},"0.27.0-nightly.20200822":{"name":"brs","version":"0.27.0-nightly.20200822","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.27.0-nightly.20200822","dist":{"shasum":"2de8e3642e9cf63340eda12d7d4e90f1e2fc2a39","integrity":"sha512-gBFlfdmE8spDMK6iRdxLt76GkGn8YsKcdJjt8Tg8tkqBQKM/b7wcVDe0/nE+q3F1DF4u05x8j9X2sIT/vPmqKw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.27.0-nightly.20200822.tgz","fileCount":190,"unpackedSize":1148798,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQMahCRA9TVsSAnZWagAA4ggP/iecTaJph0pAxlr+Ikkb\nYePVDbywKKBcWKzkfdAYGXgiTc96s0WsvI18dDIYzGznzv7urAwQTZe6iVuA\njsPyXLew+XL8KivMRlYhb2JylR/C0Qk5Yv0JzpEwC0S3FRlghGBrJ2AiNeYm\n+GRYQT9NIqapRVhcOuMSQDAMyAQRLCSNk3vAFV/4nba6e04Y8o4UOW0qNyK2\nBRcjLh3na10dTAik/NZWFxVMR3YsSmPuODzyDZdBnR6v1SDPw2zx17sMLf9m\npuBadJD0p5n5ZOyJmgwD9mG5erOkV7kwQWO2SywSFYK6EYcdFkNEpAsmlTOo\nwCAzFnUCGHq5hvAF1qY7euSvG0y9B2PBD3X4eCNkMKn43TH2U2X0Z5E4PJxD\nf9S1VMCx4WEsz8gtRf1Yt+Um0AYmV5YBvVYh3+x7/t+iE8wTCbRIk66bTZEi\nOWBj7IlrK8NlDa1dKg8YSUl0SB9Imf97zOVx1Hb8AavFuiLnvwb7fsYUdAs9\n1ma0hshiclFaindisVkrplhQx9XYF74D3r/S3mKE0CUwv+L7pUylaheGFbiL\n/69kgi3+3wiPNNVyUwLy/ZlLAEKwvv54HChOGMMOvL/ae4aRWYds3q3b0Anr\nZVVgchDMzda+jkAuuJKrc2dBPYAjktPOq632R6SyGVIqavb2csSG3caNspWw\np586\r\n=3H1L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUyEt/Gl+E8MDKzYgz3DbI2BU8tuwHSSb1CPGQRiGYNQIgfKfmyjr5Lj5MOMnyxS01Y3tU6ucQJDiU8mnUAThEAhg="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.27.0-nightly.20200822_1598080672839_0.9467921811933127"},"_hasShrinkwrap":false},"0.27.0-nightly.20200823":{"name":"brs","version":"0.27.0-nightly.20200823","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.27.0-nightly.20200823","dist":{"shasum":"9676f670bacaa4f63524c9e4d932fb66c79d8455","integrity":"sha512-kuhB6jlEBbvw/dJUUm5XyYxbbyp/4GRvHw+HIKPGZO5upLvcpeEJWJLk1x7sSxre89CjZJRF+y3eCqWU6acXNw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.27.0-nightly.20200823.tgz","fileCount":190,"unpackedSize":1148798,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQhhJCRA9TVsSAnZWagAABDwQAIktYEnUzArUjIaxHLOL\nJMecRfs7w7QUAqtcBvsB01LJkn8CFp/U3pEVzIaNuhQz9zeVGxTYhf5wdUe3\nwv/dIwwOu1JGVUjSvIJLKMzsQE0WC1TvGtSVPW0dw+6CpGTIsScF/4x24CPm\n5NPX94QSyPZYg9YPADsWu1ymi1j3GmafgcHHNdOG1OykEl3W9arh39eZGt8P\nLRmE4KUfujNKpFmIlPjpM2AQiRdSB3VZPnX1d8L3qNclFBTToqq7n3JeEa9N\ncPEYnqdILuUvDVmhDetxwA87yMWzn8CI2ezeN+Rs8yX9P2rpng1NnzOAmOiH\nW6TILTRL3FHkgd5EktHpIlruJa6fC01IndR8mKp6BAT2yBfovoFmnUiVwp8v\nKJi4V15oan+6kWdD71wyTp74g7h7+YVbFL/JjOBpYEtk9IOnhZbcis+MMJX9\nKCcTrlnQ28EDgqXVDUdxVRzjLQtV+WorehntRLnvZACmlBQOcpTNzBOJxPjX\nqzPriUI6Pco1/NnAuC5uK3op4A4FBQUC//gXslLaZNDx0SudDhrzrZA3OaIa\nuBcaSzavULLwolyotRTCfieUbPfI6X33BG4aJ0RiADB+ZGnf54Cnp2s/GiU5\nQBHo+f4xh8Xb/fcjIDk6r/WwP3qy8hUBqJmuwxVPfdyxz/idUlWjH+d32P5v\n8E7G\r\n=DG1b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICHYmdnm2a6QrwGMAhykSHeS8Nq91p2gX5Grlsj3pq+3AiEAuhoI7vosRl4AcaYZxk1OiTG0z95PLKpi1duYEhn+68Y="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.27.0-nightly.20200823_1598167112731_0.005855384412107867"},"_hasShrinkwrap":false},"0.27.0-nightly.20200824":{"name":"brs","version":"0.27.0-nightly.20200824","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.27.0-nightly.20200824","dist":{"shasum":"cc503f89d93259bd5219d49ab93258606cb8d7fb","integrity":"sha512-T6jjwOf1lvwZ+gd7Tp54UFs6OFz+FRmzIIIq4erWDdp94B17Cf1IFFj+ZZ1TTuge+nER4gPIrTUhHNrDDT6wCA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.27.0-nightly.20200824.tgz","fileCount":190,"unpackedSize":1148798,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQ2nJCRA9TVsSAnZWagAAgcoP/i7CUArwWCqkDTB7j930\nilkE3697W+iMPstl1uY7vgww41V5pUiY2QGx4Egn5n+IcqeBYnPWu7yzOoxg\nTRORAe1+/5YbCgNT9kvyN9tBY4MypLAwQ8W/72VKursYmFKPKgRy1yGiyRWa\nYDoLMRdKBelWlZlk18AD0BMuAFDyO2SyNN2N4B0gp86JvC/a3IGXEaVLShSh\nUjgCDQUurLLKYHTas55NHNUExThJP3BOEXOLcmaZNmNRbYVjLscSEsu1AT5b\nUjFpv6eUbTEyZDmFwBN401mX5a5vng/j+6ATAGijw0UcVjPkWfL75yM6qRiq\nzvt21t7HoOGnwODZXjQLTU1D7MQyHiWMGimibUZHFGESTEcPFtoFQyIKtsEf\nPWM8vUAb6+UHt78h2z0EHPmTRAuyCstyCimvVwupCK6BMeBEC0DG0YMajbPQ\nSqWg7Dai6sxuVKyo/QediejK9Nh4BuITFiT8XhrvX8KDIe0jEFivyk5wpSJd\nUqVUPb58taIinyU1q4fU5LiI8gmZXj7rGQebGaVTL6YOOwJTp6Qa8OaG/jsK\n7y5MIwZv/KXITRussDWW+qYF7PecCz1uyRy+TjRaBs2nPWpoBJoXxqCHY+q5\n4jp40LdlVMjEJCc1McVB971OzFoRVuhu3PzVy3FVFuZvGNf23tLLMqp8pxj6\n0AWA\r\n=fTzq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtVIN4RMUen2B1nPJIIK0BTHoRE80pb82aCA6w/jlOjQIhALFtZhvg8/elme+4WBhTUzJSaHLZvHxHkxDRAGoyqRom"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.27.0-nightly.20200824_1598253513014_0.5204271266235467"},"_hasShrinkwrap":false},"0.28.0":{"name":"brs","version":"0.28.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.28.0","dist":{"shasum":"0ac1dfa24d69296506a674579e9a1463898cb581","integrity":"sha512-tt+NSEjtX4DHLC+7N89wcp197VrDZWhU0uPwWseTuLAg6WjYebmpQnWn1NP6Ou9unOWCSITAaH3GcyMtSCEf0Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.28.0.tgz","fileCount":190,"unpackedSize":1150778,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfREs5CRA9TVsSAnZWagAAJrwP/itLqnNvjm+F60WMXqt5\nHYeFDqsowraL1H+Nx8ZZpeA9DFm/CkXU/a7HJY6wpZGxFvekaThEiFpGLFru\njnVgqy8FjfXNPcfEsDy64JHMhyLopWH6WlMcbhmGhWImfM6LlTIF7HN+fCi/\nqDVnxuXWcF7ze9wJXi7U0OJD1iq5Fl0ugDWJtyOUi2y0923A6e4dldVEMwcD\nEWh2cE0DW2BEcr1Rip4Xqui72iFUelIpHu3DoI0wLm2yxRNUnc5Ehu+QPBzh\nRQGLgFDfzY8X8GHcB4yDFKf9g5cBluWfW1gxvltaTTeByjHsnEefoQKFGRND\n++n58pFfFhtaO6uI8Mcue0Kx2ccnEVMj0fuv6NDB8ENAZJElTQanJIVgYDCx\nVbZOZ3N+ibrLiwkofHsLiyn1FdhpaYpWqrVVArMczv5riltHuMHbovcdAjdi\nPg9kbRbjA27qiyAJWBayRuz21k2dzIZIXtzSREeKF3OfaTYrohpOCa3zN/P8\nF+QL/nz2ZkJ0Sw2QDlfatdiKQ+oDnfFbFYQSEMZH+T3BHrX4tDBcZsYtKprL\nBWa+U8WjnzI6AyLuxi1uBhT5X3RKic0MaegC5sue1cJvxa8Fg3WeZWvSzYEd\nEp0zhavQKnbNaNgjx5hwV3XO/RUl16kn/mjGVRaXCK+nQ5pJV14JPo/hSs68\nuukM\r\n=fGPo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIaw6wOY73+w8DO/lnsOIislASxzvRU2bS3zZiWhI0tQIhALvCoptcxWTbdVZgBB6+4ak68nUmtB5k0zzWBRqcnDLj"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.28.0_1598311225135_0.8703520901493138"},"_hasShrinkwrap":false},"0.28.0-nightly.20200825":{"name":"brs","version":"0.28.0-nightly.20200825","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.28.0-nightly.20200825","dist":{"shasum":"9921ce41f49c524abdd5547990c0ba06f35a1db6","integrity":"sha512-cCMamd71hdqGTRi7jkEy86TbCmPEEnPgwSEMMR9XEImaHf6O4RNtMBCs7lMsVC5xoKyc0/AUAPCkGXY0aMJj7g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.28.0-nightly.20200825.tgz","fileCount":190,"unpackedSize":1150795,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRLtMCRA9TVsSAnZWagAAnW4QAIKKA8QX6uyDMBJ3r+Z9\nAVbjXFhTFFigSwjN2aL0HWYRNJhgCXqeRUS4k/OH6LEU9qNxDwWoedLY4X+/\n0BUsz/NLee8Gur9naErcFdYDZ/LOvaDbJTx1M47yC4khNi3NCywIgST2UZZi\n+FMYTz+UXnFeq23Zu9/NNQTIJgelwZqcUMBu0w9Yee5m+/VxEMq6q0LFm676\nTYtoCgkH1RTcsHY/bmisukIEShN8YmtBbsRvJT8boNxpV1SVwicHUaTB64lw\nsGF4Ew7dO+f4sBMrtzMgyxi2cp2jzyFZrLn1pO2F/x1NSF3TczqomLgbwwg8\nRg+lJllK8C45Uu3BMH9uiApL79MwmuZxLc+BFa/knqGAYjDmSMU4y/uGkNwo\nQmfUdncXYbiCKeDtRoUDVsPVzCM2KX3lMXIkVUKkTQyHVQat/WX+xV3jHdE6\nqiG7ulVV5LYEOLwPyAoNPegYay7VvbN/Wku3nlKx7oqH3YDsmifsJ/WaKPaN\n1D+rkFQDP9KT/uBDgkOx7dWae1SFxZX4jd0UNzivYMQtcCYE4r36rhwdIVZ2\nMLTPS8Xof9KToE+bnM14Kkg8z2KxRO9DwuKBuCd2hFx9yYBOFt4hQU6Mk7Al\nf7qK95waz7etf7w7kdGofLyeCihjCseh0kyByFX2eIl03DKyUaIlrHfK0Vx/\neVnT\r\n=4Veu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCzgNpXUbONRQ8EXgGgUDdyQunWcoLehAdVTiomHGfUyAIhAMUHwf+M4a4T1YfbGv69JnKv8nHYMAiE7k1W+sGIwcQT"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.28.0-nightly.20200825_1598339916336_0.10934834512496305"},"_hasShrinkwrap":false},"0.28.0-nightly.20200826":{"name":"brs","version":"0.28.0-nightly.20200826","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.28.0-nightly.20200826","dist":{"shasum":"b66dd89e2d402918a375b8842c404cb7912fedf8","integrity":"sha512-JCzQ4GYEiIxPFFODnm3JZ/HfCfrc84uBt2xG7Px9N3PucCtWklKWALigUIkqIgZdE+dkZ2aV4H2FkdPZewzb/Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.28.0-nightly.20200826.tgz","fileCount":190,"unpackedSize":1150795,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRgzHCRA9TVsSAnZWagAAPyMQAIs7pVl3VLuCS/wkmViy\n4tpRVf8HPgBcjp+5PESB5k8a2zd/yjwkAK8FfSjbXB8XHQSUB2eGoPckrSyE\n4c5zftbDShlNI12kMXZa/SsSgOO5S2f1Z5TPqhNQyt3J0opt5G2IwNQgCGNe\nCDDEWypPxi3dD3gW39hDahoEniAvL7WWRcNKFe64KAIb311IJrvQJVXSnF/D\nnukCcsxNpGXSbl3lHKVSlTw5MAxPeQQ5S3YHIenFLjK9QPfyERB4wYdIKjfp\nb/bcMNnFUyErtLUAU2HlRKq097gqXCn7b+hN9ur0eIXDXzmtO1XZQ0jMHc75\nhRTo/wvu2ZadrFbz7Wojv4aJWJTXuAW3TkDof/upTOHlFalIAQtrYBK3PpVX\nMTE+x3WvWis2/FUjx4556ryeU9qDbq4p8/VpBaddVUyDIxa9qxkZvcN5eKI6\nosWuu8QR8SQfTjIpvkU5LNNcsA2dZvW0NbWOp6OWz11o9/w9HDUSzOBKSXlx\nnDg2nrkUeKCQm6FuQqDBGi2DsygjUk20Usf/RrM13AdYTWCykCwegr4ZLcdf\nvndVkXUaX0knNQaxIJ5F4IlSLgNmYV6Dgb5289iEBz7Nz/sT5H0NyqAeHIem\npnH8XBVZn3dTPwAqhkATP5XzVnnQjV2lrOA+UdeDFZELUPpXBP8P5gfsSV7J\nBlGL\r\n=eLZY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE09/0r4bS4+4AP6srcJkt7H6X87GpzBC83BVxXbsDkGAiB7PgUPLiGZs7S/J5UTTlFshtLsQGw/LCApt5Fd51YtBg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.28.0-nightly.20200826_1598426311157_0.7693433514686296"},"_hasShrinkwrap":false},"0.28.0-nightly.20200827":{"name":"brs","version":"0.28.0-nightly.20200827","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.28.0-nightly.20200827","dist":{"shasum":"8b4fede31a17b97529e311187c9e5d3b3a278a52","integrity":"sha512-pxECqkOyErwNno7beguLYok7Ta/E9QVP+qFWrwlph4351jnu3d9fd2HCslaKmxjl0KkBLsYTSHZ7xz/4qIVRxw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.28.0-nightly.20200827.tgz","fileCount":192,"unpackedSize":1196099,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfR18OCRA9TVsSAnZWagAAq+8QAJy4ra79JzuV/CWEK4uW\nZskj+GoGuFy3XFi4WorSzTOzoPxqPHgrWauOlUAVs3DsbF8jglIPJ376HGgI\n5zigdNiAB0+cRbUhAVRGpFI5Wq+i+Ck85tnOZ87RX/VvwmL8G0S8aW09jYxc\noFxfKzLalJ4o1YwLpz4Xrd0Rd4o4vVKVy2oISlp7BqwFEQulQV+23VbjQ6m2\nS0+I06lSkIk+WdRBscM7s5oInbZzUBpgQoTlFkSw1dwCzhgUTKOmV7waIC89\nkMVrIL3wxamiRWSz/TvbIVLDkZOPInWZot29kfLEav8VINHWWpaOaC4SL2lT\nkqzMKUKjcIsd7qgZxIbEyGzPM4B5N/lhuAgDe4oj6cakcYqEoASXuJwZs9M0\nox/5xRMQ/p2NqgCjkXthSV3qsU+fLbp3eEXfmULGJoTKkFg3pJzu2CplZIoq\ns8sRRncEYSilWudWcJGLL2FHfYpo3oQYeKgvUHeexrSF4L9MZMBoG85uhASo\nqI0OuN1cZSi2GiZgKD+kwd5fAdRC4nj8uNX8lTnLRjZnrG83o9aBlguT9mq/\n3MqMpgA1SbM/ITVI5b24g7efFKTlaTr5zpGbmULx4qthMr3EiBw6dUWThT2p\nv+3vrSy4dAr5mnkR9iC2wykxbdIza5TdW5r4yOh3yeFkeXOjMjzn5bT8V3bA\nE093\r\n=Z6Aa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBPvNN9Pwc7YeK8GRckf6nan4WkxHQqkE9acBdHva30hAiEAktu/HRwGjwI2S7kzMoTZRprWr8uCX+C1jTQct0M49fo="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.28.0-nightly.20200827_1598512909690_0.677415523970744"},"_hasShrinkwrap":false},"0.28.0-nightly.20200828":{"name":"brs","version":"0.28.0-nightly.20200828","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.28.0-nightly.20200828","dist":{"shasum":"4fcff0ba1949e7722636a79d4215ff8ef64676a5","integrity":"sha512-K0ms0c0B1oNHkuwTz4NspD/ySqG3bU4RuaJA+J2slQdJQJrTDVM4nV/7xIjcRze5PjZODUn3Q/XkHow5he9h1w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.28.0-nightly.20200828.tgz","fileCount":192,"unpackedSize":1196099,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSLAaCRA9TVsSAnZWagAAq28P/3P6dhyM4Yip1pJ7AGVf\nQVljs2VWKmZBk6aZcVQXUMp+oNWnZwysVeD3LiGc9IXixLgUyCt8tJW2L80e\nOBKQQytrrLm6HvvHderAlbR3OztWOqSNrPE0AN7a5yYHOVqxtzeESWGWDjGD\nmlOycZ7/hFsysPtKVLqJdk0N4BWejKNlndQDbmX8zt1xIaIJy2M5y+Vjc0d1\nI5TbiihcQNSp9FOVw+5qqLHz6HZgE8sD6ysqxVBJYlrg9b/8X9d0NxDfsHmP\nrCUMZSmUvrZfVbj9aerbsQoZPvB9jbwSFHAyYhfAzOczDUYJ91MVWtp32pi+\n4O82GmI/WYi+epR5lTukqtMCdHtBI7k1j5b49gboYY7GcF2AKZcWK1FOaDkc\no3x9uNlhx+M+pqg+FBYSiAk9kCM47+sDxYOmFVxLcX81ZuE5cGHWdrh2dko5\nXC03b4xzCOZGVTzcGejcS35Cmx9uKRPPz9PvD7MUjHqEkB4dXZVghcZmny98\n1Cz+gHE2wLkTJSCkocWY5jZiUtqok0w6avFQS7yTOh6snqbgC98pz1sRbq9U\n/Cj7lQpOBESw1c6Zg9HOhEl88hBjbrTzIqCtrwUXWnwMwjSpfHkCTRsR3+HQ\ns6E6e+a/zc6pauxur9P6iEhWKFCJydtxCHf7v1oA9uiGOKTlu8SrmotgG6MO\n7+OS\r\n=nQVT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGigeSBOvL+wBklTF/BzZiyXA65xI/AsePffaErK0oadAiEAxrY2kPHlkPvcPeOLmH3fvoNCuC7o08GMdYNks59Dfbc="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.28.0-nightly.20200828_1598599193368_0.33180230523403864"},"_hasShrinkwrap":false},"0.28.0-nightly.20200829":{"name":"brs","version":"0.28.0-nightly.20200829","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.28.0-nightly.20200829","dist":{"shasum":"95941d3536a268003fe7dd70456983e4c073c5db","integrity":"sha512-bL4xFV4tXlnmmZqfHXTmFG2q/sl9S1w+/p3P2DtnLHFN0DSNB25Amm+WbnlGTord20ycE+UckUONtKTXzGgjfA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.28.0-nightly.20200829.tgz","fileCount":194,"unpackedSize":1198594,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSf/BCRA9TVsSAnZWagAARV4QAIbmtxAwFaCSA3y/UfPv\nVcaR7S2aXlAM73JDEFLOBBYQmBrl/JOkXHkktA2nXWkYxWGa9MsmoqXd++PK\n3kwsDBeQ5U5LJuCSAtPLTL06N0Gb7qmznce5OyHberRcRXfg1H34OBlxoKN1\ncDgL/kQmjOp5Jo4irksSSiYV98kLsn8e252Y30r0jDjeMRmBgQMu3IHBR4qN\nvN+fiVYmD4Zo7cgig/iTN2LkAxlx4yavdn7R99kfXu7UzS8GtiqbCcbsXv/t\n2IC+mWxwRXAioAXoyPBofeauXJK/rdxjlZVfxPVb+dKR9aYjNUTYPccScuiB\nTW8uOSh2t393DOVi2gQ9cM7A9hUmoUe1gjSCBp37Mu8ET9AvDqZk5lLraJ9s\nemksgoF9OdDYm70DXi3a6KeCaKBN1lQI7X7ZKqDoZhnoSWpdYuGpoANEl31j\nkRPNW9mKH+9qa9Y6W6LQIdVfXKGCEyb9XMGbqSgYmrdr5Rlmeg6WJ0A4c/gD\njdUFauXjYCEFmf/SPV1THxUJgbsrmKVy/1UXNbKJVm4QN0+IlFZ48eVyQaZs\nvSzr0Mhdr8cPgqTm97JgDuBI1qHuehgfE6HXdndiaDyb1Yf3F3m6+ucZwRbR\nklY9d0rfqsjEDJjIMlQd2koczRJs5lL+iHet4dZWi65TpDI9sr/rgO0Mgyd4\nY/Mb\r\n=RwNA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE1NJ/zO2SuPzUBgzROtVtQi8PnxIedfoRk55BG4thrWAiEA4RVuCpNyQGV6rIVTbVbBEMuSm9Cu0MKmjXD6EesIVec="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.28.0-nightly.20200829_1598685120588_0.32849310618993544"},"_hasShrinkwrap":false},"0.28.0-nightly.20200830":{"name":"brs","version":"0.28.0-nightly.20200830","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.28.0-nightly.20200830","dist":{"shasum":"177322d4d300a4cb199ccbb6f545c9df3b6a699e","integrity":"sha512-YpiUgxm8TslqNOOwi6yncCohA0XWnEava1mP4zal80GbJO2jLQBXXLu8zG7Q33+fNIHAnH8mDr8VUX8aI/qt2g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.28.0-nightly.20200830.tgz","fileCount":194,"unpackedSize":1198594,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfS1HWCRA9TVsSAnZWagAA9zoP/1AgpVtytbjXOz8J6i3I\nsJ/lpWp4V9P/wi+txdJTwmXHxWdC8T3TQYMJzGDYiEtAm7tB2VzilZADoZvq\n4ovdUH2knP4rAWLE6cViVRNY2zldKngXxhqKQHoxDaQxtY/xhHiL4V16fTeL\niPfDQmhH9aiVxr2fdpmOAvkSmgLZ6+DgIKm4ZgHMJN8jaqL15xL7OICthKUa\nY+zp3QxvJ8CffY4xgENNOirFGp4siMDydSKQjarMSujylbTiETUB6NLejFR7\nN4ZHU5fkXes7bUjfrDQ7nCzSwPi7X00xdya+/jP7o0yROYyag9UZwHD4zVcA\nAGQAA78YtkO+960ecmoYqzunfxCSa0rOdp1t+Pdd2ryoiB7dvtsfdtakndAh\npFaeE9ww6nDSnV/AG6PqijJfCv0bjeg5NCasU6BPsgR5aAhphyg67tBrYv7h\nkxkojFJvyS0ByQ+7R5J171Nyfz6INCkIP7bbP0BQc+Bq2PFRZBlkwBIYFi1b\nsteRelfSFHW/cihNKUPCurKi87OhwXzbdI3QBOdmOjRL3c7WHpVb0Kt7VDFN\nNv6hbnXqC7ydhlwecMJBOFG53xtGXMY5xWiG/N/if252d1JW6bdhGwGjLXaQ\nPvAMSy9OhCrHuOWUpW+vZK/GmoaKmV357h/7O/WbO2j5gS6Ybxh2koGsAKuK\ne6mW\r\n=7txM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1t+VV8ki/e6ZF0hBglYiy608CyiuO7gWpb4rwf0L3DgIhALlfmB6wB4YYOol+kqPya+wprEtKwAr7mhhNpB/VT/ty"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.28.0-nightly.20200830_1598771669567_0.8934537741807957"},"_hasShrinkwrap":false},"0.28.0-nightly.20200831":{"name":"brs","version":"0.28.0-nightly.20200831","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.28.0-nightly.20200831","dist":{"shasum":"e6dc09a16f4bce386ff34707244148ec8b30eba4","integrity":"sha512-2Psk9zDgtmcRVf/UtSD/7P3H58DVruDj2aLfmPlaMAEISClLOSyywxNahC9C4VmNfyLn8qTW74cjdUu77IMj9Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.28.0-nightly.20200831.tgz","fileCount":194,"unpackedSize":1198594,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTKKdCRA9TVsSAnZWagAAe2IP/3pOz6L4NXJAzhjNdOPz\n6bBBp7uC4ycvIdbzff7xLwtKrukejDsZICW4dHRAN81q3U3QSiEq+ugsqyqC\nhzahTvWyhGVFH8ZiJHQJioy8ILZQC+lqmiMy7RuNSIyismM3+U4wObtddsC4\n2dY+6UJ2lMkarHwhHoQ3TyZRM+K1oZTIgR6txQzBa83YPyT8OV7duY22wWYA\nJx8pMui3f3rHbwxy0XxVzZWO45SbB0RCyo1JE8D9h5GuWG3JfmmK3iDvOciX\nGEurCfveLYcpoZ26/e4b04uBSWho5xfaKkSGUE9sby7UQEKV25EPSM77QPCo\n68IeclNA7G9YkexKsCGpv5ufPwtr8jtEGKM6odHbJP28dxP3N0SHvyN32LQD\nJime+RQxdbxl14wGYKUvLkkgaGc05wqt3C2xC8e1fuSelhAobmIZfa9ltIWC\n8DhN1Z8JjJDH6Xw/VtzeccOpA8rSN5SMIKW71N0bh/CNZAejinFy3GbKr5ni\nbg1ZM8xvy3s/WqQQj9IaQCkiGus+KiZIvZT0jX4F27+EEnASP+ieipSMyh2w\nEraC1TH6YXrGSamK0fbWt3dKcJkFmVT3v0PuhLvr/NyHTpCyMICzI9VTYkr3\nXTfkXdod5XfvQxfvYeWXwyFd9OURBsnKCZuyLj1m249oAh8vUui8n5DDPGz8\nL7rK\r\n=s8cR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHaNa5/SFmZ+0roIppmTCmjmo339FRtmUipCEDEFqnqfAiEAtAylM2iUDtSZ8Cz+C6hvJC0PT6VKlD4gEOEuXZ6EAxc="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.28.0-nightly.20200831_1598857884979_0.4781731164488021"},"_hasShrinkwrap":false},"0.28.0-nightly.20200901":{"name":"brs","version":"0.28.0-nightly.20200901","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.28.0-nightly.20200901","dist":{"shasum":"35d455a64964f3da14e3457ee1893c63445baf12","integrity":"sha512-DtJoLKVYrbGaK18pX+9r7T+RLqO+pDVUn4W+z9sHe4kSqRGFSQVgOP6BbpkTMVnRXgipFNaaZEa/OHDhgqIC2A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.28.0-nightly.20200901.tgz","fileCount":194,"unpackedSize":1198594,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTfYkCRA9TVsSAnZWagAA5oUP/RCD7/Mc4UC/QcELQVW6\no0Pg/zpCPOLrPAsYOYPhn182gdLU9Bwu0UCxOxmsoAwCVgyFevgGVfgagozH\nvOipR59IDj8rMeD1soiIbHECZ5tXE4Ptzb7IjlmBF4dXpSn7cVxmvQogum0J\n1vnG5BfOjH6mPSZ21Lyww2ZtZvrKoipQrrnheYqxY89zOHDyvoEGb1ZHzr6G\nDY9+9FCAran9j8iKxn67+iJNB2bzxg7lL2rKK5DZMIPri2jG1X6FOkQrS68i\nWxPaFhZYd3Y76y8crJgGYM/bR6GuyZ85r3ZckDaLOIENF6YoVrDuWTDafeY+\n7/r313r2iqWMjFLpwyrgyBb1ytQ3iiSyaMu+GNCq79HzOoZX3QFnsIg6aq6N\nlMzvMqdHzQ4gJYnT2wf4WwARZvLPL/6y8bWufgso6w8Wi1F3/47nj0zWSFld\nBEb4YjNErUiYOWlWxe6tuWvzH6ZsRpYrAD1a3UuscXr3Vot8Ifeu2cFmxFnG\nA+Jdnqa2mtONKiEQ3Mdg0NbcUF4/L9rzyfgMxMOnAHr6pg8MAbfShMjJSFcK\nYL0kP7rUtl7CgAJ3V4pkhG9EFoJMhPF2GKQDCp/BvsXQrWyXz9rm0C8Dg0SY\nyT/Jd1ZRCOyGcwEXRD+5aJcLLax1IIJ+XwUTWtP5QQnwDgi52bQjonSuCdc3\nRnVH\r\n=ZObX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHloT7xE1MqFYFljh+Ybji3uIKOS2gWOhes2MZIuEqWVAiEA0jvD89+L6hxqLABtZFpDQqwJuZOwoheiy12mpsdvyz8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.28.0-nightly.20200901_1598944803846_0.1204853532873007"},"_hasShrinkwrap":false},"0.28.0-nightly.20200902":{"name":"brs","version":"0.28.0-nightly.20200902","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.28.0-nightly.20200902","dist":{"shasum":"6cac61b43994d35e64050e2194d99f256a9d6773","integrity":"sha512-x/XIE13BB2/FepwxZAkHdw9TPYw/A1YLbTW+2FIkoD0UiTUEw/mN0iLycZb+Xb6a+G5MKKF2jeYwRW7+rD8+QQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.28.0-nightly.20200902.tgz","fileCount":196,"unpackedSize":1204309,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT0e5CRA9TVsSAnZWagAABD4P/0+nrZo/42uJBlBuFsNv\nZ404+XIgzmupS4bLA6oPgj2tMaUP/6IdcdSRyTu2cqF5BBoylN3fABswuxe3\nM40QyQd/bse/+NYoQUJ2t12Zlm74+KoUeb776ZXIBLKW4+YykZZdNBnEpCtW\nPBMm4R89XTda9k8MWCEOYQ6It11T3NMgkAiA9tWN95ivoaloy05c2YkohaRu\nahKFHARBI7jisEG2zOk+0Zo9ejlUxYm/VavoGvjQTNRj1sKPQy6jVxFa0tmi\nEQAbp57UFBMS40wwWlc9bF8567Q2m8EoURZGaM1WJy0vmrqtB41U92PkfTnG\ncQbHUpyZus6A5EbPyAPke1WCt4pmSfbUntnZIyO9mrYWypeM/w21ZEcSO3HX\nIDUwTr07OAwzjQ2ST/MjTIsw8Pg8vt0XqRmx/LXK6a8RN3mNHOKOVFveFgT1\nboTX9HlG9C01l1uQsALTgIhLHrU1rDEbDjShfyzMIk09W6z8/T2VqKtT73CD\nu/yBRbsJMeS6kSNSHKFTg0Jlo1EGPLU/ANLko4BU8Yo7u9LMFWEXFTNAsCFK\n0uKsq3Xg/ObI0M3yKFhlA/FIrSSwURsIXDGdp2N7jLA7ygark4FHCBZQ9ZN/\nER7KyQ63RkvXEoJDeHWitAAtctY+oxUhos9aQj+1eSWPdMsmr+3XQ4Sd33tD\n15Np\r\n=KTV+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2zjOGF2Pmn3FDd18FyDNMX7pvZJe80FQISGWiNQ8YlQIgOBG8uXVgjyjGKcKjfNbPgBfAEQenSHDS6Z6vcKqUlGI="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.28.0-nightly.20200902_1599031225015_0.6063902245649073"},"_hasShrinkwrap":false},"0.28.0-nightly.20200903":{"name":"brs","version":"0.28.0-nightly.20200903","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.28.0-nightly.20200903","dist":{"shasum":"f36dc680d374ea81e25397767bb4867e4ec8ea28","integrity":"sha512-mhnLmbX2vXqiU1ZoOakWoRyki8ll3aVW0YqyMP1uBtWp+ANbFTNiouJ8QO5ZGIXGS/RuYt5o0QwYvZg8T+N0LQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.28.0-nightly.20200903.tgz","fileCount":196,"unpackedSize":1204309,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUJk9CRA9TVsSAnZWagAAt6UP/AjqDssbv8QbtMxGg/o4\nmcwBzNrmDC22VaAFayufqNURRtQy+DffScGbTWZ96v1fhlfNsI8aOgXCqKFb\n3Su/5LW48nb6tAWi8E/xLPDh874KYOUMPkTOav/P7B19K2qf4JZAftskzE3I\npSAcfY+Gtj8AcVvAwtiYOq7ak4mEwghwCale5woXqPvPdfpFdOfKNgVsgfIT\nF0j1d2A7PojNk211l1KXBanHRW1E8PLWQVufAbFUHhaWlOprxePVbf3PKZTj\nc3Zvwz47VVyYvvFg2vLQtyIAvIN4lEXfFx8cvU9YmHZqyb0OBnEVKx4MCTrw\nQl27jUe036pDfrlvOk2sRkW6WIe+KJRSwPB4AyRpy5fOXBkTX/ZJ/t3ldnYR\nrcaTCz/ztOukl8I3Kw3KfN1CRnzwLJetccqa4vM8GljB59hVLR8EMCl6Cukz\nxMdLWhYYXftzv3FmGmgBMhUocwAVV3sMv9kYHqAaXxyuuyObg1JrSIq0lTFZ\nH4QG7nBJrw1TRUaVSBIDDgZu2bLnh0HSy5JFfc/T0MPByjqYvxiQfuGZkhJ5\nLJEFGfkYfuL4NWkin653zvjZnWrR2//JX2sorb0fiOjYQkURcIuTPagqnRUv\nFDRJaIZ0lmmJaypxok5b6aXlSN1R3/Leun9y7uXPtIPxflQWSgaxcNpmAuvV\nPyHN\r\n=h/KE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6VZRroAi6JfwQtnXsBMml3fvEQ0M8xgIXugOtrgqgwAIgIso8DdcJLol9M/iFcXjrZLMIAG0nOS2WmItKsDfUHIc="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.28.0-nightly.20200903_1599117628585_0.21658106503042918"},"_hasShrinkwrap":false},"0.29.0":{"name":"brs","version":"0.29.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.29.0","dist":{"shasum":"c75b18ea5a1506d9b51bcd0eea4413d36220ee8d","integrity":"sha512-tUd9D+qFEGsSOvgbuuiifmuONl26bFZiLsxRy82LhfZbdhPn1V6dPLP/HiCQPnWLb6ujL62XSxwXqc3s+gloXg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.29.0.tgz","fileCount":196,"unpackedSize":1213974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUYL0CRA9TVsSAnZWagAADJUP/RyPHUMmzOQmLtkYsCcQ\nLBOWHL8HSOwYxxRc/Uxn9e+9YbLt313BexT5paEg2X42HkcIfQtk6g0ltX9p\nVUeByGCfxWB1dwWv3R40Co3Kq4yeYrQMBVbXbnz8R7xforuhXLv14Ukfx2HU\nlAYlMmpdiDYOS4WHAVMAY+zDQ3DimDt5JVR7QqXToX4Jqo3RdMevNE1uCqiv\nrLHqU+PKi82DoTdvpMMmt+n+e/1uC1UF7926PikBWg1Cof3dMAk7T8Pk4Ini\not1ibSc5bYE/oUWqtAmHM4MCBIrBUegoZmY71ZSGnZ632MkLiTLqTdU8acTW\n5f3uIMeqjH9o8cDFjF2j6DL54aujMZXxlQ7w16TF6M/Xa3R2k3kwoa1PtHwn\njT/88COBxzI+KCW6sA7vYDXvAnk3mtFOxJfijmN8Jot3hLpFZwcRltarvY9x\nEt9EHMAib1GhbRhR1CW5pIvKUQ7yupY9gJbpsyWz72M9BS5tmovhUKWGgtrR\n3qJ9PhYqxSama64MqT9RFscLB8vU05ouYc8n3wpa4srSmxuSepWN+s0+ZKw7\nOdpFpIl1LHaXvO/1McKLYpjJSBUL+1BrooJ+V+uX3U2+sa28yVsMiprbiLB2\n/ddDXAsxLByoZFGojZ7TJa/2mPOk0IB0QAjasvMU2rxNxb02Q7qceAy3hHgZ\nrIVL\r\n=EMaY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHS3WTMyitB52oekWYZcp6RpdhzS1Ajic4l/4D5uGubQIgLZ5XYdPNmzkXMXeOEYYvnFFxgpBtMzvspAwwdGkY+YY="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.29.0_1599177459527_0.14764224736037934"},"_hasShrinkwrap":false},"0.29.0-nightly.20200904":{"name":"brs","version":"0.29.0-nightly.20200904","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.29.0-nightly.20200904","dist":{"shasum":"48772bc624067e0a2e09f737e4697ecdda717441","integrity":"sha512-ks0hulULQsH4DmCPrcZT0O/ZCrBkWCG4dqNJvvW2T3xkN+pU30xGYHvxFkxxIcYiQqgbX1EfOBoeHdgW0ZKg4g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.29.0-nightly.20200904.tgz","fileCount":196,"unpackedSize":1213991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUerCCRA9TVsSAnZWagAAkeIP/27N5/zJexURwrRfQdl4\ncb1tC8GDAFYOZqLD7RTSNZBql5qvkDjXGqJv+hLZMIYuuJF6H3vxoFJdN2hb\nM0AMlJBZPdEZBUJrrRV9iVWGzLVccg/K8ltBeKMRCgVZNkXep5Ieun6djdvW\nx/Bz/NXMv1glycGusyu6uNhwYxdQMwwU7JHHRxu1a+DIQJ9zi7B0KuoEenfJ\nVj4Vj/P+RnMztYdkCRfrmkUXeO7KrRLq23By7T8kGV9FeuyWgkw0F2VmRxWW\niQQnBVHxxQt+IhKdxoouA3eDo7R8KyyhKOia3DUQPWyYQRUMZKW954ZJ9qAR\nlSaCqy2HSLMc8AuYvXz75FrYMjbBRfTGV6cc9r9PNemxQcAUKrIJccqTtXbM\n5qvoUCYNaFWr+njX/nVE4XvyE4SyLHCoDXYQoLbHsJpJyRvOODXIw+54A3h5\nHsTnRn56aLp26DEWQjos4ft4fR0xVKZZXMGss38Cu7C7GoKNz7Uu8dKGNbA7\ngBtRhUkjr7hDl5af3hNhwCLTdX0kEyTBDKDDA0vNQc2joCVCmzDUcjWeKvQu\nijPOTQW0URR0V9sXpgu0wJhdoN48RtR3m01e8V4ibT/YanD/cOLn3kgtA8YE\nxkB0vVkmKzt/dW399MQXxmJW7GfDn4LAEFeJCPIJVMbPaybFGjdMmZCkJAcf\nI2re\r\n=/tOU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDoi0gKAbQsFR1t4DKuOIRBCsO5bwA4gwFjOfsHC0SH4AIhAKrDUbFpbr/D6Y+TiilN6kJhCENlT2spR0eXBuEv/ZCq"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.29.0-nightly.20200904_1599204033998_0.7755270505845264"},"_hasShrinkwrap":false},"0.29.0-nightly.20200906":{"name":"brs","version":"0.29.0-nightly.20200906","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.29.0-nightly.20200906","dist":{"shasum":"821da7417a90bb10e81a114d790b0f750ae82097","integrity":"sha512-efAFyPT32xzPaUXNfCFfW5krFu9an80LsfBpCdm2zRLb9WgRdywxtTcWd09PVTGN2/ag92K0cDKOeNfShAlEvQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.29.0-nightly.20200906.tgz","fileCount":196,"unpackedSize":1215649,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfVI26CRA9TVsSAnZWagAA9U0P+wXvH+EuYyjx44+FVKlL\nx4SRRgV3RrfUoRfcRG51WAjDeA0W+ntQA7dHFftB+DpQp99SJflx4pLat8xd\nWGc7Bx2tOCBCAFUZIfXQzZkYLktNqWOwAhb0TD2m4WkJ2xjXkfkyjl/w1c10\nEp30fQqYndB7DaQhok9u6HuGQOqMqxdN/q1FNOus8tf67it2XvjKgtFO+0ES\nPzkiJfv09kjttKhSrEUjPAWspNaEt1pe4ifLregw5bE96jTcALMsIaq0pzUI\nIQqULFroz1qvf4ukcfJ3meujY/XASa1loCSiVzgdV28UnPvGWA0ykc1YAoKe\nbrvmfqZRuUBJ68ZeqzyyFSZZGnY4QRoW520WEdDa0l6I4wiTBZ/FeW/yInOo\nfmGSsbzDLcYC9RskbfXF+PNzkqHxVZPJpPI4KGAu8IiziHlgpWNTFU3iAJpj\nc6W22qXjMWmrXPevv2zQTiyUm/ZqngO+Qr8VkDq4WTfgmRM6kLKKSAmUoEbH\nNkYA/hlMEKBC8UsDf9I3hePCeMugLl4ljeTJMtcBbcwFAIc+UEfaef3hi7uD\nQsscYgxj9333V0ihf+s045a5n2VaGqPjGQfRdf7FjzL3KDs31q4DUvf5iJ+v\nZh7J1SdZHgIfkGDY+le0VYutxnXrJ0CWaOiPcJ7slnlU7q34Oy6KB/djHE61\nlCSS\r\n=un1S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEFWWU/8/R/Lkq4w21Q/B6cThmnGSrSHRIjnEgW2kKGQIgWhPVYaqFFZ7yldCHOe9jgvk3AwaAUcrzwnIndLb3XsI="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.29.0-nightly.20200906_1599376825466_0.17236275329336137"},"_hasShrinkwrap":false},"0.29.0-nightly.20200907":{"name":"brs","version":"0.29.0-nightly.20200907","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.29.0-nightly.20200907","dist":{"shasum":"43cda48929ae869b8eb4397684f6354b05a2bb79","integrity":"sha512-oBBPBwPOXvWDJmP/wNW2jw4UtyX1WlITDrjq2mdgj5VO0e0N49gHc4xJPiuCmJ6Ci47rxaHcnN63bgJh9fe+yw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.29.0-nightly.20200907.tgz","fileCount":196,"unpackedSize":1215649,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfVd94CRA9TVsSAnZWagAARIIP/3rxIHrKETFiHw9FH9W0\n3B4ixEcejjDCLUtvy8h34LAzPhXNC8R+Lzj7acMxQjl+hKARqdRorzsMYCaI\nCOh2Mkti+kZ/JCM6rXiIHOZhzFUvyM2bbPgkshjFtNdsyga0Y4GsKImhwSrh\nHvRKvqTTXVPESyYbK4BdZpyYOcCYiRuHD4wAmlX0sS1R3DvsyfWl+ODVailW\nxZs0+Lq4W85le/FLr2SVyML7fiyKoGNGTp66cvL9Q7LCXXfXwHLLW0sAqucA\nuWWrhy4sWqb2Tg1ozfJJROSreKBbh/KImFLNQ/L/G4xqP+OOcFjEzF0PhWoC\nrAon0QlWGV+CycTM7iSkzP33rLB8icd7u9YXc8fE4qqPeIqw+FF7bEB89W1X\ntztGpz5+/ARmYk3mgSwD0ObKVwXEMxTr89xSnuCqMjuUgGXX2DhPmEpnIJeG\nSfRQ36VGijM7BLw/kGZhyCoJ/QgKf/ZFud9OAApqPyv5KVx9LafoVnxLPixM\nwI11XmXst0k8flyuHISztS5/xhTvBjZIVHYmtV5LO37eC5DU1bj13UXty1EX\nrFN7by+LLFm97QXcL4qtRwcii3xVqIFlMyMZO70jXE+jEncYMCMq/aUD8okP\nn/3Fy6InbU9Gdli6s6jtAyOUh7ZT3BOgqBd1spQZdE3y9sjiO95WJNXZra3w\nr+g3\r\n=jUU2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDD+FwReWUJ5BSjhPHD8XzBybAoKBrIAJLenerJKZXO4QIgMXMxGjs0yb73SYYQYqSSuNUPwLPBFDmeQZtCRrouZMc="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.29.0-nightly.20200907_1599463288115_0.5843659932511494"},"_hasShrinkwrap":false},"0.29.0-nightly.20200908":{"name":"brs","version":"0.29.0-nightly.20200908","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.29.0-nightly.20200908","dist":{"shasum":"1a7e0e1106b0ee01513671e49f728698b6d8f35c","integrity":"sha512-Ae1lrDlOpJArsNaZh0A2GhlpIk9LsBURg5WDUMGAHvUUShj7MrH5EbrYBafmgr6eAHdeOMmyYb64n/TK/ywiFA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.29.0-nightly.20200908.tgz","fileCount":196,"unpackedSize":1215649,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfVzDSCRA9TVsSAnZWagAAFJMP/0PplxYryr21r/7Pul+U\n/TidMdjcrnYsfAz+FJJ1rO7nrkE4IvkIeN7FTfU6DFrOmhWiA2D3UE4kN1Ny\np5a6GxV3G6Z4uj3IpJoozAKNkl83vSk/A8uE8qfpt4efV/G2nB+xABsp6Hxp\n1qJin9ssYGdy5Hhf/zgps5t6MdVVo0uEQbrknklfmjIIkJ8Tdo4B2C/fNaRy\n0bMvxFXEA12heUdvPUXW4oeCvr7HvCM9mACfP5sCIASim3/FAmUdRRpAwYsn\nGdpvIYGDBu7QhRppF/ADBfeDvT3YOkCnvFFR6at4qF8m8+o20tCkRnus20wu\nNYx8tN8mGCWi2dsKj/as+mmqbWLljJP53eEX39+oW+HsVPnfAtv7OWr2SfdV\nKEo2mFXJ7Ob/fA2ZBphXnwejHWm9TAlYdDhHtc3ZSs5LpBF49yQJk0H7mjo6\nxpY+idIBcGdh+UDMeeODCc49A5ukvMaV0RLDwT/OB6nvove8jpxq6PtmIyaG\nMm3/iu6izLL4Qt2AVJ7HJTiIYkpfF3hRSDSkIEb8WmqVwbUavD1BuZT71P3R\nc0sIQRdnlr6HvTXaevDAMyXD+YL8YSzKYor0vrGvJgkVtnew2fVjY201bjey\nKO0XGeIa4p9q0R8dus/i10qkrTHEK5/QNqW3MO/7gEgP9iz6JdIryCtUj2ST\neG+d\r\n=f+1N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG1nDqQ3twl1esIjD/bk5fsTHJ8z3AvcpcNLLWQxG9ZkAiAOBKGaxbe7CwuLqAqoQk3Osnolt64fKrwZu8oHGnsLYQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.29.0-nightly.20200908_1599549649800_0.6739986941680585"},"_hasShrinkwrap":false},"0.29.0-nightly.20200909":{"name":"brs","version":"0.29.0-nightly.20200909","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.29.0-nightly.20200909","dist":{"shasum":"f5bdee5c2e315579512c3505c4dd96da9c9b192f","integrity":"sha512-xqV2MmD5dOi2M8ICKEG1PcvjI0TEgJD5+iDk88YcRr2fXyrMY0j5fcxMuOQZZ6Jc4UOmhnlMGykd36pF+80Tyg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.29.0-nightly.20200909.tgz","fileCount":196,"unpackedSize":1217101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWIJdCRA9TVsSAnZWagAALYAQAIOGOgCIUn5d80bz64+5\noRnDMRkwqjAfhb5QmfxYQ0uRGVKuXmbhU9dp1ZeczoDN9UP5bnxZ5FyPfBvc\n8r0X2i/7/2EdCokvC9DoXulH8UgXQFo4F5sF8dzHqIu0lihSxxAtyLSzGH7j\nUXZt5XE9knhxfq22wvnFf0GbhP64Sl3WcTzfiTW+qmqCb8TPIoTN1Jy3Qqao\nvMRkIj02PFVlueb0wviDqBLKrVik7QWrJ/gi9FTrpeqR11J5EhtQnAdqjCmi\nrI1F5ijUlLzao7L1aFPcpCgRdKfcn+d5jgx5HTi1LvX3+oZ+Xsab3QKcc4jj\n/wx3J7fPS+fxHQvutEeDqp0C1WxuO7yQ0kbf1OAwdzJhV2d/hqJK8bPlGy/l\nslwUvX7uGbxv3mfEK2A4Yxc/XzY/47ZCPvUz6XZ59nlLeJk45zP2L6GRyewB\ndRBTiQ8vmiuqm63oSvM1xTp2SltTIvN2n57jwT84eGuVS1bltV1HsSvappEx\nhGz2P8n9xyGbp8B8hKUQVP38BKdzkrfxE4aUkAa64AuHmrM3X2PhrGIMOSAV\ncVUWJ5DNZ44Y/1kFcXTOZQvcnYyAb89k5SnQLepbGOVMHOI1BKx0+lHBrc7v\nLb8XTx4yYuFZViCbY22joBAaZwj3j+RbNF7wpFCdO8G5GCFmdoBxI3N0Erah\nOdQp\r\n=g85h\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCd0wuZH5kO1eZSC+Rzwfi70OMfMVuVhsqmj8YEOToNGAIhAOUvotqTR0k59dEaFWME9AsWJCCubGMivuEq0YLrW1q7"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.29.0-nightly.20200909_1599636061306_0.34922198193441334"},"_hasShrinkwrap":false},"0.29.0-nightly.20200910":{"name":"brs","version":"0.29.0-nightly.20200910","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.29.0-nightly.20200910","dist":{"shasum":"3a7af2bb505cd4e6b7e8276ad025f1e011032c53","integrity":"sha512-BE5POT+Y77HkkgHawryjizu5oU7szOX8ayW+rAl1UGs+o/Dog8qy05WvG+BhtJ6IwV+b41HiPKpTC8NP5hVvGQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.29.0-nightly.20200910.tgz","fileCount":196,"unpackedSize":1224374,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWdO2CRA9TVsSAnZWagAAzoMP/i+66ewNbA7c5PBVRAgn\n2gFc4pmhmygmz+Hrke1DARscpl4+2XSQ+ga0P74DjYToV1qKq2KULHU82VHt\nNvMwZ/evjbLJ0zoC0+YvxLy8Xyq6QLQnAUKr+wZ43PO1krQlJ4xVdyIoTJ2n\nad7VAHnsW3FeGFXZ/Ouar3mYdWPfQnrMuXlFkNLWC14DR5MFTt1PTrkWHn+4\nfPcexCCMxsOYW5+jPnG4vJXwRNiY5xD2rM2DWl3Ou8WlE87qtP8mTISW4Gfr\nA+ZgYtFq+B7SzTxquP529llnKOnSGpBXBF4QoVdU3XJpvkdbFbJq7f9dwfCI\n7++dDl6+g35ncxOy+YfnG4biwEtc5W8+jqqwj8J9QXSPrjbJoX36wgJVrWW8\nsGXpAT/pPymIXxf3FD5chX2kjXUEIpCv2deSDod0hKxgw6PfFd7h65gwEnTF\nhD88cDvlG374U6pEFDIpYjARga0zM1KHxhpgOicyzwtcuVNJnVSAsrpcLVRn\nxbCH68mTouPqU/wtw5qANqaBdYyjNSfR0G+fRNbomPavXRye0k9p7hHnFA4N\nErSohvlfOcpyN34S4TG7yxSSmMRXfViiM9o1FS+j69H7/glB3otA+2pSouWk\nZXm9SIJakz5+koIZrftjgbJ6rI3qDbBy6cGk5zKrnNL5btPE7IbCutZkZccq\najFe\r\n=oFfX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDrGWWuB59MKj7NV14U6q8ypHIw/Zi4HINeh9scqr0kQwIgZ6Frf/xxKXRw0mO33xAWz+RWIzNfvx9s/6j9FcaS7Ps="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.29.0-nightly.20200910_1599722422325_0.7739484513194554"},"_hasShrinkwrap":false},"0.29.0-nightly.20200911":{"name":"brs","version":"0.29.0-nightly.20200911","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.29.0-nightly.20200911","dist":{"shasum":"eaad3c49e7d9e802491deb3f8f0da565b69fedc5","integrity":"sha512-QaxTIjexPaTyb9/gpMTupf01Xug0Bbs2P3CtUDUhpPeNve/iB9daD7suI81CT7B+eoaJFwGm8FdjDHWBW54VOQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.29.0-nightly.20200911.tgz","fileCount":196,"unpackedSize":1224374,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWyU6CRA9TVsSAnZWagAAATAP/RjYOArXwutYyCf5g/RF\nkkNpIt37j1Qdtn5RxrbmvAoSWBOUHaCH6E129sEFxVQZy8LG7mRwC74X3Xkk\nqk0hWUR/VRlEMyIKy/niTQ+VRcem7ZLi7/uEsvV+wTpnRTnWmv+I80lvI6in\nB7TdH00G8ZySI/ZLYLQ6qtocV+nSxXBBgF4QSMXlSQ8IFNp0yVVPxCHLdly0\nlkSU2mtpmJB8Z6PKHeYqswraiyrhGkH0kdB8EgCvahkhPfgZhu9I2Leh7B+p\nPuqm31NBGBkZUTeFTWUqLX6fngrloiQJq68h4hCriCO0toy6qv5TYqN8All5\nmQGkgDRC2qppOgHRMbBq2ciX+L+51CFY+YiS7dVb6G5x2S4bFD4lFAhr0wnV\nn9S3w00T212cBpUPL/VNcuAPuQOEOVbBMPBLpLvSaOqWR8n9j3NlLwCTf+DI\nMf3ibG6PBMeNAbmDsxFEnHVIXwCcKq9InSecIJsjMEOGXVVjgIRQ5oG7UGQv\nCPFnaJvbmVq8cPZJoNsHA7bJjNG+b3U15vRvnY2TGmXzlddhVN9ode2PkyPY\nQH5V6rhpYGiRw9XUFol/IyoOIwF72E3vwJ59kaXS6QWpR1EQ0RkzC4m9hNVr\n5cDTJgEQ0yZRzzHF39AApztCgC9sA8KHnmuWY51ajOBAC5BJ8/0EWe71ehD8\n7Qnb\r\n=Bl63\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCytk1AI/zKixJSZPq8tVsi+R1dK71Ii1zvKQHUB2gruAIgPm8vqjG0Je7SzzCSAVO9rWxLWF1Kyim9DbM8pOtmNbY="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.29.0-nightly.20200911_1599808825420_0.22249396258482856"},"_hasShrinkwrap":false},"0.29.0-nightly.20200912":{"name":"brs","version":"0.29.0-nightly.20200912","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.29.0-nightly.20200912","dist":{"shasum":"cdd8a0a4bd01711a788e46bfd8af077e6704ed69","integrity":"sha512-fpFkEJQWewtoSUWaoE2AYX5Cdcgg2Q7F8HKG6sFbZK+HdYdZgyGJQkKKsmSDYK+HLkV91Xj42JdBO7aiP1z1WQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.29.0-nightly.20200912.tgz","fileCount":196,"unpackedSize":1224374,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXHa7CRA9TVsSAnZWagAAX18P/2hq+Ol/8QV604xwBC+D\nvce0Srdk9yMwjpvpySA3eV9I2HAK61lkfEvLyKXK8H0OF2yelSvohtM9lNiv\nPItPl25+ikYV/+NWfqhjjc6GvVByWRmIqK/2xLq5iMwhXwbptP39UA+be5JO\nv83qTReSbbe0BaaVDci3gqtGpa12XpiPofBZe0sbIbrPVhZbILUR164clIvc\n/sKQUMEOy5IWSXTdfEn/GEZdXfe6z0roMUNvaR+WkRnb31rzVFwd2SpsB0kZ\nFeEffsYHXldQ54l3EQH/PcSyv2DxdURe1Powq9O3MLVwrpe26hJ+jxLjwUhB\nk56p6KysraZZqELxV5ML0boeXzNGyKXybVjx83h7qvRQaitb0rSv2vKQG8pp\n3jgcR7kP2d76GZCYFFgslzBB/83ZgKvqydKl1fkIdUS94mDRJDM1PeB1xXmo\nDnRV/d1yzDZEeT96VS82y6wDQjmRJhSSzP8uXWVm1vDqKYkhKxas3Wl7JD5V\nFBp0Ys1VyXAY1qXXQcoERj55a2SLbSgpSrSmqYsCU4coPN5cmQXNap7C4rcA\nbSQjBTjRjLVMU8BerBQuJCMcWSeUpUHyCtRh+rOwfwnW4IG9WPOdZoCeYJVJ\nwkcgFTbKndKfOvvoLBKitG/SG+PFtELgnd4P3tXSA7Y/ADb0wOkvmFpWiqjb\nNgtw\r\n=bCb9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDyB6D3P9by/YtAKlmo3K3yphDKQurGutUJnaCyxfodywIgWgyqM3hDTM/ia0HY5HAtwFGqhXRwWHltiXfOWMN1/XI="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.29.0-nightly.20200912_1599895227127_0.5133996804818706"},"_hasShrinkwrap":false},"0.29.0-nightly.20200913":{"name":"brs","version":"0.29.0-nightly.20200913","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.29.0-nightly.20200913","dist":{"shasum":"1aa3ff15654ff51409fc5925609cc1eccdde578a","integrity":"sha512-iXqEVAs81amDkRASvYWvifhA5wzn90+3wsEboUPNucdxfyu9gSfK32wBS7j7/y7tKgjSXYIyhTewwQyu7VqO4g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.29.0-nightly.20200913.tgz","fileCount":196,"unpackedSize":1224374,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXchKCRA9TVsSAnZWagAAJoAP/juVVZLaBbp6P1sJgi23\ndcFW0zlShzBtaaMpVgaIeqwVijVzqdyVEXQFjUL9Kv6swBbb26ENf0vwXgYH\nKPHWoQaA4jVhZoGr7sDCQ9cnDFOO2oA7Y63CUBdWnuNtzhsjg93O2FeuJpFs\ngJ+PHvgNUpwW1cAfY1K9N+/jeQmxS/yaV+Yq5Y+Cu77Hz6y9wmjAQspTqzEB\no5q41R+6hHckh3kuUBhnxa5k03gFlV5CFIJwOrUCMklo89U6R+4VJFlqjnUP\n1ET0Wf4A9uNhpNWvtolhs8sFEprtwjKYYsH7lr2kc/PDa6gJxCZNCj7Lp2El\nThUEVCJRMMQJ6hre0ZUhLgJ0f4QhYGBHP+z7fL4rJVqoEllickhSt7KMBt6a\nTJNN4Nuni3aVXYgWRto8x9Unz2Gj8kODXnhm89X6AmbwNAMrPxRaAyasJMLo\nXCulyYbNN5cPokDKwTS5ajQXbPUeQHfJBrdQUev2kkdcfgK8M/rz1OnnLm4Y\nm+yzM3j7ahdrmgSxHtu6qL2wLtyfP9mYZARC/UpHGaJLJRywPB1FX28A66YQ\niQWIqE2Ow9+3+M8FuVuuUt5Tipc6uUQYpKCwPpJ48CEvdEDNy4K1JBGzZoT6\nvqRIpkTgXAMYjfc3eJJ4AWvffVMRmnUVas+JZkUNZOLlGYhB+Imx3O29xsRx\nCFpH\r\n=Vl3V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1N/krG7NXIWbuGHqkZ7Q1/5W9WTf4VG9z1/H9CXSWxgIhAOuc4bIC75qg3ZZh8iFJQUMG+n6V8hUPXLdiwCpBgwH2"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.29.0-nightly.20200913_1599981641390_0.41293494283952903"},"_hasShrinkwrap":false},"0.29.0-nightly.20200914":{"name":"brs","version":"0.29.0-nightly.20200914","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.29.0-nightly.20200914","dist":{"shasum":"f574f32a0fd4a8e7fa61d4ba0a872ffb6cad94eb","integrity":"sha512-pMxmNEdNuJdTgILx9RdQ9D4DhrkkQLMpOZLPyH3dFM2bYktqj3IkPIHdAwkNtbtjhnmjywYBVVScDKB0oBaGTg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.29.0-nightly.20200914.tgz","fileCount":196,"unpackedSize":1224374,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXxnJCRA9TVsSAnZWagAA/nQP+wU2hD91D0U5cnwbiYgR\nqHqokyecBjAXB9EcMdjoN9md26OxIEyh5C+DzkV5Ng2rPY+HTAcZE7EHlD4i\nW9wgAFNDRRHotx+SrtmG5FX0pSnEU4FM1FupytHMPphpYViP+eg1nUBhGbSZ\n6usRCrOproiXUpslHQpcHTdbnDFu4Yr9sp0tJLQ/iaicGCtHoEzxJd2dlqYL\niJOzJ0Y4xMSIDaWCYIjNrS0I5l1RGC2aerW5c7H4mH/KYRsyq3YddWqs2f7U\nrbWZIW4AYBkJj2FJ35oU4aELJRkne7tEq6NygXhP1KEmHT2wByv01gY0TTG7\nlqfXtQL53KIQYDjJIWii8mX2MTAh1nFGxiAcmIyE7kmxyZ5jgZKXm52ys2GL\nYVPLnH2GlRBl6Ocz6+gefKz074i0P1rj1/1aMs+yxIb8yQLNOkcLGOZLtx2M\nPm+BMDUQNFwIBkYW6hwafhmVCN0bObklJe/Usz6hPMmeoijl0exU9JB5cMLi\nU4wqXWdxeqDcvVSBGRpXnPUTdw79y59W+lq1jPynhMvR9RyRyPqQB/jpLrPl\nUeLwEH4w4ea/rqtuOgVZh757WgBnARtm70m6O+a6pm9q8lh6ErVvg1rFbJsV\nPR4Lplu2kPeo4uYAWBUzl4J0qSLKyZU/f0nbpgkIwXD8lNyvpmDOvhcAhcEk\nA5uw\r\n=aWO1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH5GJ9CVnaIpvnAS3Rpb37HeKStP0vF2Maj1snF5n73xAiAYpsZfvaWHUqSmN2U60Erh+SKKRYb4PkQA0pgCgrjdrQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.29.0-nightly.20200914_1600068040916_0.6069336032169139"},"_hasShrinkwrap":false},"0.30.0":{"name":"brs","version":"0.30.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.30.0","dist":{"shasum":"5330214a33558db8225b9899b808a66c5dbfa721","integrity":"sha512-5Prl2CIb7LesAhEE0uITJtYWe3ET7wHAITlB2hGI+Nc6uY4B8T0Tzq+XqMeAfSXHUaft7NXYdoC8xCs16kX6uA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.30.0.tgz","fileCount":204,"unpackedSize":1265187,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfX7QaCRA9TVsSAnZWagAAd5MP/R4GlXuH6DHvti8u0++j\n4gV9gNwgu/8F5LE4xIP0O37z7lOVC9KeUr92bkDE+u+dMWQHa4NcxuAHWkYp\nc3E5jLOe7e1THjmKYFTEUi2woUwy+0eRbn7w6Jlg/uEH8ZJ23gt+v5hIWjCJ\no5lo9cYVbKYou1pXsYjhUVY0SUfpRuMHNe3nPYh7l+7XwmeZpFP25Pppyh3u\n4dLUoDwYmuFfco/hzCBodWp/Xb+/1nTwtRXolqziGeEl+k4QGXdjYMORyEOb\nl3c8eoyIiMMe4NMAl4YEx1uWYKs0OeJe6+pReZcWK78TO5oqXnpnpWkJ8uj2\nNWUx+gNA4xEyIUdfMukG3DDKazjnlbLO5sN7mkIkaaRE0hMslKGZ/qYStBRv\nybeIB13Np5Y7uK2CVcdV9xmPVxZVtz5B8r6k6uAg+wjEA+M2724kOtbXFnqb\nkK1RaIJH9B7qsQV4kuj/utZWaPH4qqH4TCUZcR4brM1ednS6UrnAL9UOW6bb\nVhhq0CQR55iM5E5o57pPKmNJZkiHrYRs410XTuY7Jm2NkhmRj/EieJtEuzKE\nZ03JAv5xWi3yllK8fACvHwV0Ak3DhosyOZ9dOZEY6WUHJA6Bm4LIshhn4Dsy\nzZLFAat5R0SPswOW4AB7AKNDU6gXz4SoKK3ZobPDigGazSMYTYB7grmdTlXv\nYBw0\r\n=YGJh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHxLEqMu6Ibch7W5PcmEyS7yb8RClgKcitTqyH4hq70BAiBna2NgsPEDEaRrlGTFgVVHg9ax1ou9N3DRXCIoXqNmiA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.30.0_1600107545607_0.6268342103773603"},"_hasShrinkwrap":false},"0.30.0-nightly.20200914":{"name":"brs","version":"0.30.0-nightly.20200914","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.30.0-nightly.20200914","dist":{"shasum":"c62221c1bf6b9003298d729ff24a4540347d94d7","integrity":"sha512-jY4QMnXDynQoa+xaPuA5TsjSzHFGuhkRDB8Q5l0/TFbzsNkTMAi9lBOCSdNy/YEDk3GmsvTUS+T3PqN7UhqYug==","tarball":"https://registry.npmjs.org/brs/-/brs-0.30.0-nightly.20200914.tgz","fileCount":204,"unpackedSize":1265204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfX9lzCRA9TVsSAnZWagAAHqMP+gM6moC111SdzuuAk144\nAm6T/H6ixx1eXtfddJVXv7quyl3C8AMKW2U5wDswazMp/AyZ/pYud8C7YkDF\ncjtCKYp2rLsFjfixX56GL+vP0vDOOW4Q8EniST5wc5koIjHuTXpRbs7I5SrL\ngCENGwGcP5siKXqta5SPPtZrBeS2llfvbPJnk3e214Irq8nnBa9Ln+pVbHls\nJDYKIN22h4LVW3rD+/JuvXoNUPUsOchfcDGb/NZLifmr1cWyMmaKiRsdJN5T\npKjOg1StNlObVbxWY3wWhZsaDS5qjnNBDcPoLlOyMWxt/Ya5tXYWi8eMxAfK\nNVX6AZIqzzixsfWmaBTc/y3ys61atHxlzzcohi2Re6PbNRMPvYEKXjMCNArj\nwhYcS5YOlPbCPG52gaYWpc0PcqAWQgZiAaBsaLyUoz+/0v76pva2CZZb5ZOW\nr5/CHzNqTJsuCLaHPl+4dKlltx/SZ600MWj3cbq0OX3I9sQOT491xbv3Du/i\n+xHP6EjxKcEibz7eYhIjEw4BUtXN849JB8cWEyJv4rmRCAWMh1eTj9zijhSp\nnZ4+kxfHZ3Rqd7B/KUTJ6ZBU/rQ9EKZpMwy8WsAwSHrTSplzb4iIf63erfRy\ndIYJByAZONcbwRXpkVRtLaROwDFLXSO2XQPafANcv3dvLZO99JNxbqwq1Q/C\ncUd2\r\n=Z6G9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH2J6YPTK14rTUlEPyacQfzX04QcmlbE2UdIUrsMwW7fAiEA/TP9dt3ENUdFlWmSarpONTwYxlyrtafH4b58FYsdU2o="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"lkipke","email":"kipkelevi23@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.30.0-nightly.20200914_1600117107356_0.579599753334348"},"_hasShrinkwrap":false},"0.30.0-nightly.20200915":{"name":"brs","version":"0.30.0-nightly.20200915","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.30.0-nightly.20200915","dist":{"shasum":"e35d8c412031c4f852c3814b4b9b62f08c466a8c","integrity":"sha512-IFQIb7kogfTao6d+xZydvajU12Bkb29ScgRZ0xbINiARmTAcz0F+uoqaS1vAAtpKy3ePTP7a8jzOo5J1JmfYHw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.30.0-nightly.20200915.tgz","fileCount":204,"unpackedSize":1265204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYGtcCRA9TVsSAnZWagAAPJcQAJnk8v2H8toj1bS4+txT\n2DvGf4I6uBzgUHfApTz6Z5iC2ezRzEtwXtlus04pCIeceMTTYQmaBmN2v11d\n4QkqG/0cnSWn8Dx1i7+ABKjYOCFfPSecJfHdy87cMVDtKehPaYdwGvl/+ZIe\nPYaNa0dvMEbQuChJxmrVXQ4xsh3+29Pr7+ndrLiCrdon7mBlG9X8tua7GJqF\n81eA9nmmgShSsTS7sjzn4HiS/a8q9NwFgH8felhaxRVlZfgETvvKSn1HHbwx\nKCBcO5oizV5OfdGWqa81HAf/u34Dq44nl9waFR3p1wfBsWcEa9UB5olARsM9\n/pJm2n9569JIwvOq+8Oa1T1Wrynl7kzqny6u0Y9WibXbH5uObUJm6cF9l+5/\nCO6VMXSw/hVypj3O3KW0xT/m+pUMlyjSohNkxcmC6bnUnuHnHA6AEp5wOvOr\n9VkDj1bK2C3oCqCU4GGbu3dxiitDCA2aFyoSvkyN4GsQAa5Jmc3kM07wiZAk\nNQf+cPm+4a/Lj4pzSbmpK2rTQPhqaO2eUwKPqpFEL7qOKY78Woh4kDq4+SK3\nzTfbl5NKYLJJzKoEOpdGvwZwuYaW5M6nY8iV4PNay4jinrYockONLEFWluDu\nyOTei/jplChWTZadCY0Mm30oEcQAUPj6lle+sjZs7/WSmMPDLPF+Sw24o4wQ\nTlht\r\n=XczA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGsaK3StpUUNgoJyjr0iSnVBAjF04wPpNMGaHS9MrVfYAiEAvevy7KRr2UhyolvO8teSZ/q9jzt8q+JJ5eHteZCj6Rk="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.30.0-nightly.20200915_1600154460015_0.4556927959321124"},"_hasShrinkwrap":false},"0.30.0-nightly.20200916":{"name":"brs","version":"0.30.0-nightly.20200916","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.30.0-nightly.20200916","dist":{"shasum":"433b63ae826c82de482096e9b93edcf5ab856d95","integrity":"sha512-XTqSedFOMk1J74+cMX64OM62GQB1trCgHBW9fCARCJ53aPfXUf6umc3Ftgzi9Q/1jAyktTf+YEhybCww77zpzg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.30.0-nightly.20200916.tgz","fileCount":204,"unpackedSize":1265204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYbzrCRA9TVsSAnZWagAAxT4P/0Nts1Q5GEnwaINSE6WT\nukVB+9iq3zU1zLG2LdGwxrFPLgfSqXD9pk32MC9gbUOOXuV57IPX72FhwEi1\na+bj2DcsxghqNLQYP5o/hJrbirqZV4qZoYGsjvIJGyAy21ab1VphQXHixRKM\n+MzvA+fYSjmk6JWhzD95pXZF1trpnbFjcv2Emn51RqUe/lw2rQ7XADkeBlw6\nJ693q86nKGjCoASWfs0HUeNYfSBwkNR8JHzkBVPv96MpkMp/IU2YCwFsplQ0\ne0TfoeHXtFFw2aNEOx8ciZhrNY5hS0/IliOFsnWXLa48ZQ7kZulYGt/DEUac\nRfLDFW+uLLNkwdIOdx3ald1PaUxpwjN3pb9OJ4kcNinnSGhY3calyvo8Xh9h\nbTqgVzWyb9mITBnfz8qIOf9Gxn+Zmo1GNjKQsSSIUCu00zNXTnCoBRj5q/Fo\nhOW58mftTXtj1aoh5O3YE0HtPq8sZ7kfkoxSa+71yXmLq69Ru/abh2E/NYcn\ncROerDNOvbOduzJohynQ4+YDEjM3poX2hbBduKs2Zu0OktfpSq851letrQld\npTcoDHwZmiGIVytkyRGRRLW9b+h6U8oyaTuVzgvN3TXSpjAfMAQISyJhD46E\n/TjmY+8w6vFX16N/T64n4J/BWKw7D1N4f/g8fJApHfJY6GU11VJ9dGullgpO\nF6d/\r\n=Yczd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEU1/iu5vAYe4atYW50QXDcsIjo7XIo6BxMDbubG6u5LAiAsaaRKnHMuO6VrZZOIOhNp7tsiuwTuuzw+AwIBc+j7ig=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.30.0-nightly.20200916_1600240875061_0.15131067295621148"},"_hasShrinkwrap":false},"0.30.0-nightly.20200917":{"name":"brs","version":"0.30.0-nightly.20200917","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.30.0-nightly.20200917","dist":{"shasum":"c5b337a6c60182ff2a7f07a841c67d4b10511c4a","integrity":"sha512-yyv8KIXUIJaNwVlytVlr8Z/C533F7S9zanDr0Hp72ooPmuAns4kNeAGxkPrm00u9ol6g6w/SG7erWYLyOpnm8g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.30.0-nightly.20200917.tgz","fileCount":204,"unpackedSize":1265204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYw5iCRA9TVsSAnZWagAAjAUP/3BuIwLajv2ic0/uN/Qm\nwkAkbsJei2N16aFOSXXN828egQynyDZ3Yg2ps2qcq4UadZcD/x2nz57IoBMC\n5+GkNld2RcyN147IW1lB3Ng2Y8IVquAb5sUe8tRj+fLeHR80uvqY8ugQdl+O\nlzF1uGz6TmRZMwbINXFcM97dVU4HaGabtypN8N/wkXG7TuOReZUz3n1KMA8S\nTQ7sXtD/ML/ZpDQXjrjmer5WH/AGJeUFGYXb0H61x1r2xTDy2d+UYe48uPqD\n0HbRg9KA6SUl/F4tQdyONr0YIn7SDUUCghA4dJMevFAE7KOJTgxlZjclwSLf\nR3Dbq+8iXnUK9Zzxk2/7D2pF0UR7NudM4Ww08AbVd+Zxs0CGBCbFubMlZlN4\navdLgx8Z6NJqq8Fj2+0YLyOnkl4Qenvf95tR4jMCSraGNXqYIGA2cb9oEry6\n1p+uv+wSPc70u3esN5xeVLx0dE0aMqNPTZ5e3nZrZtFSmiO7ZIuCS7zz7Zo2\ngcd23dDimSz9PEXaGSteF/UqOGEX7CBQmXwoq3Jf/uPjj4+/sCDc7eioj5cO\n/s0t7XhcaLUqQyFV8MYaSOOiuSflurXemCmu3R5KI1/HaBWXs86REfiC07G7\nxHUItU2+AN7U8MEkGhbiDJVEnv4NdJEzq6jbxe2wAbKnfupKqDdYT7AngWL1\nBAXW\r\n=4TEw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBaYRCaizCrunHBAl9zbDwr2mWiun2wVlv4Tgsovm57iAiAYti50ha/ULAIJwyT3kTl3vbzbUWNTr5v+3cX74494rA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.30.0-nightly.20200917_1600327266024_0.028247240710190136"},"_hasShrinkwrap":false},"0.30.0-nightly.20200918":{"name":"brs","version":"0.30.0-nightly.20200918","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. Usage:\n\n```brightscript\n_brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.30.0-nightly.20200918","dist":{"shasum":"40acd5ce968fcbde6b7013ca04e1ca16dca5b82a","integrity":"sha512-JKHTc1Co2VYbj7cCtHgoteWkALZkn777M1RABdOqu2z3z2Xo2W9cFt8f092pAdw5AVnHre5bCepYElgaUYAbFA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.30.0-nightly.20200918.tgz","fileCount":204,"unpackedSize":1265204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZF/SCRA9TVsSAnZWagAA1UQP/1mm4dvpyiOaCeraqQJW\njV+c+kInz8v+GbSnFyOqGks4qxYZA3OeLbFPH/hlh0reH1blQVEjdOUuShGo\nftdYw3rifiLytm3E7V0SC52GX56JDhfFWrghWLDguQIgDkCys71tp192F3zM\nGq++6MGVtGBUizR1wSdC2E1FRs+MrKX40nW6ce0T7JdREhtGIXlaYc101x7a\nihG681COgV5nmeiD/TDHFALyGsILOaqMVmLY78aS1u9OCtb8ddsZihOdfXVm\n2k2sEgDxKWMJMsBpLlzdeLr3EbjpFcE03bJCgb28D1qJjokZ7BDEevG/2tAv\nQjNsWWjScrmUPmMkaqiGMk6aGqwWqSEtBdZnqwMwAC4DVac0MfkgnjCg62mA\nEXcLJntgmGt1Of0dGVcwrF6ujiAWJ0yDQO9ttrC4GfmUVoICbnX3DLNGo9ZN\nqTL7e8UYL6ET6OEQFoROZr5egXgSKMmOd3ybe1GHeafwoxxYFSAK5O8QFbSB\nOywgbJqtb5sxLxM8p38fFsRBJWLUAQ6oZcthprE+7z3izEqo6Td3xY4WrcuY\ndK6xWzY6JO0xmIcS1PMPWIWJrTI5dwrJYAsQwQk/8u0Xvkg4l/rZu40aYNa7\nzo7iE5DdxgxjQzyNjDI/deUakTr0LFf2gLC2XvRfAVS3/PhVg42qkKGD7ZCZ\nmPQw\r\n=nhIW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIiKa1vcPq7JriyMIk5Yurzc35u1WXYd7Cou6GdRO3mgIhALwsczQoh4nja/khd+5UrwKc/nGqfypa6A4m9VdsNMkz"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.30.0-nightly.20200918_1600413649467_0.0363150864669195"},"_hasShrinkwrap":false},"0.31.0":{"name":"brs","version":"0.31.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.31.0","dist":{"shasum":"b1e7d51f811f45d29cea2ec583b15b2a1e1347b2","integrity":"sha512-k3xUxXbb5oD5smhmt/DTD2HwzGwCSd5iMPt4SkDHmd9ra4zFCkY4qZ0Msie6XBLXSnPP1FnOdiOrGDgtty1aVQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.31.0.tgz","fileCount":204,"unpackedSize":1273369,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZSayCRA9TVsSAnZWagAAf0MP/3DLJp+A+gghRqwFIM5E\nG3AJ0ImDXz050qOss1LZfNgUjBNrBzFZiAHS8VF/wn1XdxyPXNr0uecdVuqs\nArXfml43qOkQ/oQU7kHkLblaYFS3kXNPDaPXfEzs/KmaxLCHjMOO51Pmf2Ua\n0mCP4r/4Z1ELkWy6xYBiCy14KpLVVBjeSe3q4ajQIsVdyStxEDZFJExMnSAS\nkDLd3r369s40eYX1IJKyVDZD0paZS9Vj1UOgUMeVYcir3Z+9uUXuuyIDmUhH\nn1JJO6QpKOnH23n29qajBH+Z4xGzVn4bI4lKGIWczWwn45GuAulF6TBYDWpq\nJ0LoaQFin9rS5psyX4ahIKL3IKz1ch7zCcDq5ds9QmJyU0m2Hyanvh9PB3By\njSBQpp3vIo1HHHd3xpF4E9Bqpnb8ja4JZ5JvOur8Y5RQ3LgO2K6byekAH6Ud\nPWTNRYt3YDw/VEVI/1GpEpyO/upG7hBUyP7Zd4WOLprLO1hKV6xFSXxZ6vaN\nezdp+VXik2CAHAo1RlFIXsciHpHMTFRtvZ+aLWB/NcPpHjjWAfZVv9UqaqDA\nQI2YYmHNHAfI237NQyW+1W9CpV3H8hUXSl3gckilZSaD5UsZJ8agpY/VFJlV\nweAwXmuFCkBcyOHyJhthXprRDLaqKS0DopYicUmXsRWbFbmyolcADx34uHdg\nKu7D\r\n=VTw7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBv28zrgSFZjUWht3XOjLw47d00gUBwX84CeJ8VeevNwAiBKv2+wRHCvF4Rq1c+YNOWz5UMmuAcvt79RwWdI99dVng=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.31.0_1600464561460_0.44920496093525686"},"_hasShrinkwrap":false},"0.31.0-nightly.20200919":{"name":"brs","version":"0.31.0-nightly.20200919","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.31.0-nightly.20200919","dist":{"shasum":"64f54a89fc18b6fd52fcf62108d05e3a16899a49","integrity":"sha512-TJbi+1FLQtXFBc/WIJw2X5W68bZVwU0WWKKFpOo0hL9mRx12SdNdoqbAqMCyyy+UN0B+yp2UFR5SBX3GlsGPUQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.31.0-nightly.20200919.tgz","fileCount":204,"unpackedSize":1273386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZbFSCRA9TVsSAnZWagAAv4wP/3/J7O4f3sY+9RbVb2Yj\nur/3OvgfUW6eFFbzaJ/i70nPdaag/vZFqZbeJSqT1dvGUpzeUhoycjmvgCgo\nMLlzSCDYrg9Jdlj5q8WawYrL0mU+P82Yge+W4Vl6sK0l9WlC7ThprtmZ6h2G\nErP18sLWzDqMyLH7/23z1D17irv3K8vjIGEbUz7en9OrpkFLbLSXTQpKbs2o\nbAnMO2KlX66XobMZx1EE6f/84vXR4KYSyIf/0eKc/UpGhbNXOYa3qXOWRHV0\nDazaAbYmblYbeUujY2qrtV4393owej7jBaML22WIcOCrQcJG2XmVEazsVPTl\nj/yS5XCFP0k2zTiUT4WIXUSJjV3ZNsTI8sEyBdTvvZFg3kTtqldwaydqF2Xp\nN1HLE+nZFEYMexCluR94q+DPsBy3TKyZXPcQ21tNeRCrA+uOiogtIt3WTyvI\ndna5zs+3yGt1jte/Pd08LF3bUMZA47B4Z9FjEG2cQjq+nW1IKOPBDuRD0yGB\nLilWixdkIiLzBwiMgGzfiydwWpqkT3WJVyAr3AI9Y7X7qdTBwTEWIAAkXfHJ\nomIvA/DolkS7H7n1zVc22ffiS6G+lkOPzEGJ3wJoXZyJ1MHbckQJHFSmNnZ0\nxUJGcqR5G5EZy2Owqq6TfFboJ/6egtUHVvKL/UsiZNRR9vc1laKZ3UIxWiTG\nxo23\r\n=a/VO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlkfAf9Ym1lg0JBbTBEa/um2thg+HszjH/0txTlY6NqgIhAO7z4C5GchKd5n6EytW/6aT7K6KoyyaL8NUoWOE/gnVy"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.31.0-nightly.20200919_1600500049900_0.24827639521746225"},"_hasShrinkwrap":false},"0.31.0-nightly.20200920":{"name":"brs","version":"0.31.0-nightly.20200920","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.31.0-nightly.20200920","dist":{"shasum":"83ba6d56c40cd0de6308025e3be8a57984599c69","integrity":"sha512-ViGcZCkyTRRqH5iaTPDYb8DqLmd1/WH8utG2p+VIf9m8ybpxBUknw//2k33IU15AdDbxKGa15EHGC/f5BsMjbQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.31.0-nightly.20200920.tgz","fileCount":204,"unpackedSize":1273386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZwLWCRA9TVsSAnZWagAAxi0QAKI9y7LpLXUivT7yPMRi\nSYWdVGqQjDGKI0ZqyJP93Tof2XLgKu74v09L4DKRHHUzGZgk499r7wp5209q\nKfgL9SccbUiOae1xAFLAez5p3Fd8iGpAKNfW3+pt1iDKfDjNHJqde8GVUk2Z\nTY3ftsZDc032Jh96itNNe3KyvB+p3Mi1bguQ3bvSnFrLxd6uLd2ofN/flLUc\n2zuHdCug67ZeMNVMKU32ZCXRjoQt/aJscvvz6fxLLWCR/drrkw28thCEIgM+\nu5oOkcyeahr3mAjFR5tQs1PkgMUgAHuTW1DTSONwbAHfUIYQ8e2VNJibayQd\n/eQf1E/004C1pUg9IKlVTHfqXTr3tW0+4y8vR3XYPD9hc3QBYtG31CXwdInj\ncN8nFKLHuBCvVNGqVFEXA66JUMlvxMKuHz0sdjjhXDMG72xMC5WrW2Ak5uKu\nOx3myIDbjQREA1vFdckNREhdWhDvayNY4/jP2dXVixb3lRwTFEZyL+INEp7r\nbV3hWwynYhrF8bCgpFjPVFHgOUouJ30zAS6KIE16vxxwjKf4k6jkKd7L/KJk\n4YDgaZxdNPlKaaL9xKaGoNAp2jdZVLxGVQrlqta7yXdFPGP0EhrRLUy7bvdT\n4//bzpgWB0bxM8e8iNRgvQfays8GJGWmGZh0aCkkSfLueckxBn6X+s4qMdIL\nebEY\r\n=7l1m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHIKUTYLGZsSCJ55P+elw6kKCbGc8WobpUKskPvl75PGAiEA6+lIAGgM/ByRKm69klLnwDCHkxKttrdfueD3GWKuvZI="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.31.0-nightly.20200920_1600586453620_0.9380508353883175"},"_hasShrinkwrap":false},"0.31.0-nightly.20200921":{"name":"brs","version":"0.31.0-nightly.20200921","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.31.0-nightly.20200921","dist":{"shasum":"789e7ae25ef060b3095631ad659a8a3a3f4dafef","integrity":"sha512-5kczZLxAmTzHIWnize8zouHZP/5DlBmL+XfbBo34fFAN8WBMfNYr1Ef7ayAv+Wnq7uiYZKauSuoQo+Jtg2ipVg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.31.0-nightly.20200921.tgz","fileCount":204,"unpackedSize":1273386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaFRrCRA9TVsSAnZWagAAuQIP/j4ATswVPUIDqThDnJTg\nwCvhllnBGTXa6N2EMJKxbBzh5UAEayPbBVvheKBSReRGm8UZ9lc15XEOgDst\nkAIAVC5UMFaNKNT5Bk3BJNIgD5UPNncldxAYxHrccRgk25UoqnwKxRulSmi5\n0n2hWIXq+7sQwmywQ+nj+c4dIVLt+eaPhkPll6IgDXnubsrzJMV84VlzxYag\n6UrDCLc6CtqjeX73M7TpVQL/Km8wrcMUsCn7ROLsAs8dUKo2nT2S3+CaOHl7\nVRQIJGmOlHS4SxF9mKXCXKsdEgD6zmJyEbpetk4PViiRpjSoqykJOIAS5pC6\nzSaKybcGt6cHFRES6NUtOriQPvGTGltCPOg5WI/87r5J0USBZNSyhQu3kl3G\ndtVoATKNKhw1NvvDQmDQZoLwHPrZgyvIkrImDwFdiaEaUZX7fcA6jnsXegTN\nLsNLjt26Tm7wxyqiLDOtB0lrPGvlXnrr+8TCyQK0qvsrfMSxgClQ/RDyhFMq\nkGpfLXfnprhozHFYZLb4EmKYgDMeFHirHM7hodn0/yleYzUgOy7OgGluZobn\npiS+bgawRs2ix3iUIHmhX1lQmPWXVYJ4iKNBtZqkL4WbpKHqjBUuLDQTzqB4\nrtpGKBynC5hGmqfHM1LHDOVVgHZQarpnw/32Ro/y+6gGHHZ0rvefFY5sN0Y7\nBb4D\r\n=Ut4w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYhBxV/M1168yGNJCvMm8XN70IW9V210j5W+xYZu2AXwIhAPWei6bGZXgBIWLK9sZ9yaVNaF4juBwRWNYrz5bvh6Wn"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.31.0-nightly.20200921_1600672874474_0.9574378617987302"},"_hasShrinkwrap":false},"0.31.0-nightly.20200922":{"name":"brs","version":"0.31.0-nightly.20200922","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.31.0-nightly.20200922","dist":{"shasum":"54d7ab5baf9d9558498d780dae54104171cdfaee","integrity":"sha512-i/h8iykHoBg3JeF1/l/1UOZAtHrLiFcirRl55G64pXx675imaOiLXsyuHbizJa6fnTFZ2f0FkHUQoz1S8N3rMA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.31.0-nightly.20200922.tgz","fileCount":204,"unpackedSize":1273386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaaX6CRA9TVsSAnZWagAAy/AP/iILFKBXI26uDlsyw037\nxTborGnO5E8U85NPe15guIkwzne4ONBO4d9BX4HioyMNXh9Xf6dom/Lt03Ey\nvE3GeQwmxxzpBGjEhwa2XXwIsG1+jj0cOAhEy/xCsWHePXMo0PEPF3XAl6Kj\nR3RIvx/KV7Zp8SBXawZLfUWzrSkCGSHiQjwuVvuZhfFZQZ47txvXB/zDjfYL\nXk1imuA2VRkAkPwr2UDncEWPucD0AXUx52g58gBTAXZIQ93CfcSpDvFVst+G\ni778v9sZXxfLQhVFcj6gUoazuxb+keBVlPx56RFmfWQBCUk72U/8egSTrYRL\nT08iSvU1NnfxCzGmUM4xfpA021z5ykWKLqHBwTqLZSNBRlYhSuFDTKZby+5K\nhVzF0eO5+AavjSVDzZCyJmZo2i0s8VyAcCr1LOfI6n2WyqIHDIrDCF4B1cW6\n18KumpMoy0eF8kCC+DWpK+wl3FjEoUYNvn6jLi8yDzvpt0hFbBVS8xZZkD/C\nnrTiAJaaTXdoIHSB/hZLU2sPURwFKqNHvppfEEsEkqbxaik694/oLbrCoxa0\nGYwgIMZnY7Sia8pe3fVXbzDeRupzkUSPLQkzYR8+3QKj0wwKDWUUWA2YdDrl\nU+E5ge2te+uLvkwJJWFE2YSn3OTU6l+UnCfEeul6EMpqBX8OfD2R6c9zGTAc\nWrVS\r\n=73Om\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5Zw/nh7UAxeUWu1tXCSKYuopTqQ3lO4q123brM2VZygIhALfNSqIx+cVUu8b9wxgVfaMc2x/BOEpHHdVuDic60FDu"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.31.0-nightly.20200922_1600759290118_0.17023559152511858"},"_hasShrinkwrap":false},"0.31.0-nightly.20200923":{"name":"brs","version":"0.31.0-nightly.20200923","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.31.0-nightly.20200923","dist":{"shasum":"729202f2b84276d29877522a19ca40187ecccc91","integrity":"sha512-3GvzlEWGD+KMxxXF2VIwp4unbM7f77VGAKMiaPJHDp7lRA1MfPCrLli8ndEMYUaBaE7cPApZxK6nAGULrTGexQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.31.0-nightly.20200923.tgz","fileCount":204,"unpackedSize":1273386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfavemCRA9TVsSAnZWagAATygP/j6J5bqF59LlmhhAodT3\nMepQbgFS68H7vDczskwJpEte4/a9so/70p1K/PY9b+lYap5+VkPp6pZwEe9V\net+J88DAH4AXrOEyOdORr0/HDiPSK2p2AiAR3a9OuIDMv68DY7EhaLwhhngO\nhgtue6FcJ2tuhCmUuw5iDGvxw9YQ/6QbW3E75s+h74z2QiLfbvXx6b2JNxp6\nGwotL0XA4TeLKFLUoM/OUzYatAWxWsul/gbAg1DWT+EkyqE2OskjQvubCYOH\noExOiWW4LLTAsakJyJtG5lCXLUVKlaI43/4yRbLnkmw9t+cOa/BaorYHQiy5\nvnIVNffefqMHudwaDWU9u1YboAHs6LVCMnmQqF3JOqUbPwP9eCS1GTPNR5nT\nS+hcvyPSdsUXuopAn3sCsanI6AhACRCfOihxfbeGUJyMJSQ8UEULt2PSFGZ0\nvCCR/vcR/0/jLAdUbV/x9YWLsitrJphGiv4FB3nKLAMK9TEA8fkDlT0/05TF\n3lpmOwyrm1d1Rfy6aQWx8ik3WKYzYP+dNvr/h2BtMBVTtD5yKXa2aAr0Hk0u\n/zvFHxzibldlPZLMokiLEiSjJUpL8uPm1gLQUGnZle/BV4yORd+1nHMSxqJx\nD++6BoHjZnkOCRPoYq+UueWw2dhmEXHr/Mboutk/kl4hTP/ljciaBTk179wo\n1vAC\r\n=jdXp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3/lVvhSB53luw30zKDr9evueNKFpdP874pUJMV7NN7QIgTSn/D61RFHREAHw8p83gAmx+qbv0Fm6orQYyoQYUJxw="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.31.0-nightly.20200923_1600845733598_0.5545326846393797"},"_hasShrinkwrap":false},"0.31.0-nightly.20200924":{"name":"brs","version":"0.31.0-nightly.20200924","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.31.0-nightly.20200924","dist":{"shasum":"4dfa5f0e72c1d05e510bdcbf584336685603a506","integrity":"sha512-ht4rq7vuuZXdOpLLf18WmPSKsjYrzHFmxCiFaiBLfEJN0qTQU/bjbLbtSnq/snbr25oIoQyjZ8hb9Kw6OdqjWg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.31.0-nightly.20200924.tgz","fileCount":204,"unpackedSize":1273386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbEkSCRA9TVsSAnZWagAA+8QQAJd6jFsL3qOuF6F/gQT7\nMHDSot+qo7UJNiSIw7Af5RP+t4vqX/4lLl6Eb0Gq59PjQe1SKnW2t5fh3EKj\n225d+LJaFrfJFljN3vl6EhZTFKQl8ZNT2Yeou8TBqYv6SUL55K6e0sKOtNgW\nDdH9+RTiv9OmxyDcqMB0rcL02jEGkX4RnUcmX/9AC1/5qVFFdovdBRCEtD82\n9fNcjsONp85IrRce1YBB8Vq0Uu+0xDPRY6brdh1zQL8s+XRgz6S0QOG8uuYk\nLmZTnYmCaDSyrgSgATcYjIU8AGgzyebAjWD+uO9Lkorxj0P93TiddxpoQzZ6\nOujKbrBo6OLtF15713Dk30XRqFGjQNikMT6Lx06OAdaIyU3gVCKkfSSBzYuG\nxBJYQO+9n4ACBaVpyV3Ir9Yvmi3xZyZSO45Dj43e7vF4us+Q2/oFYkBfM6m6\nLl6Xb2UAG2liw7EGSBJ865CPsXPfmsx2Chtk/uE/+2zlg64Bev/J8yoRUL0c\nJ0SAVHd2Hpk81+S7onxnsD1lJYFFJ81BCKNLm3oLduUmGGctr0wWUIMmtrHU\n8b5s+JZ/j6eK8KJAD9YDSugrjyUXwt4trIVtOPVKtek8VR1JcfX7Fk/XnJz/\nVp1F/kbBumDA0+CzefV6/DX1AnGLfMHK5dgHAqL6mVZDcFZSdSARlw4hSFN4\nZ1wz\r\n=m5D3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHwRzFgmwYxUPuDvGroKOBxtYS3TsSrmE9/cFvuEgdHuAiEAk6LH5RZu+d5xBl63X5X/QeJJvthEZe0vfwcTa2LgOmQ="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.31.0-nightly.20200924_1600932114322_0.2818360813110601"},"_hasShrinkwrap":false},"0.31.0-nightly.20200925":{"name":"brs","version":"0.31.0-nightly.20200925","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.31.0-nightly.20200925","dist":{"shasum":"8d6bc58e1c49d179b8404fdb63eb3996b31a9a2e","integrity":"sha512-WsDpiSk0AM7H/hNiqpRLRHsGgFp1H/CoPtZlMSx6XzhvnQy41RAfDAcqpfjBNyYjj+ieO94pmzHhV5s4EjC1OQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.31.0-nightly.20200925.tgz","fileCount":204,"unpackedSize":1273386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbZqVCRA9TVsSAnZWagAAOh4P/2p5apyZtAxXrmwK0BJx\nztxn9omHaVB0dga+EwemhThLS/u5qzCdzo0/fvBWX2SaxgrwFrgSWWtRJ8o6\nIzNlgPhkieG1TiOTWGGfinotaWfISJSo2MS9YSZoOke7JE9Ctl+2YhsPRWeb\nAh3LJhh1WyGV8zhUWjUM2ZBwWhF3VikNaXLYJGwJSM7sg+jj9HjYCFmyk9VM\noUWlP1Zh/+KAcuCZvCyRseE/CCS5d1nlxV5NbDInnHIFCU4C4wtOSUllWYfT\n4J4zU5P0/HF4xV+xUQtrmzLbmSBYw88YNMOom/KND0FvMusmeE91/jjlR7rA\nYVP6MPpq/RD+HYfzOkZuGc9870VhGA1pAJMA25dAtzWdDeZaTbAw+D67zQ7e\nlfvnCZfS5MdgKnG31Xp4OYXdC9srsiJZAdFuDSlL8AuMs+v4iem7o5epnqZR\nXDmY6aub2ihVrAEoEly1/vfPm55jjOyJPkgcRwogsfMXDnhV3IghcPthxdgq\n85g2y9ziHMyDrGyTp9Ozd9ywMOs885UPrTE9hXQ1a+76VN+1ZOwSzA16YQ5f\nRMitb2+tu57EFfB059CbjW0BFYFyDZZCj79rOT/5R1Imu1R5RQ8x2lyKxmGR\nvkwlifFtOoaL65P+F6BMGQV/3NdiYBA1HTMDX45lGq4xzXBTyOw1DumQv1EK\nQ3lG\r\n=hrdr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFeUHM1Bx2MWiJbeoR1QKLn5/1/Mz0BPJNz2e9fUWP6jAiEAjLT0mBP5ygNziWVUXbVi/zGiWjADNnqpje80PB3VBfY="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.31.0-nightly.20200925_1601018516726_0.9006486930832709"},"_hasShrinkwrap":false},"0.32.0":{"name":"brs","version":"0.32.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.32.0","dist":{"shasum":"bf502a23bf797349e5a774d18b2c4fb8a2c39e79","integrity":"sha512-DZHWvnc4kL0t5UcyPSXE0vg7he8x7QQbCj+2+uH+Dg106gZW43ugSdgcTd24r3vIhCOX1kK10tj6IMxnIJ0J7g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.32.0.tgz","fileCount":204,"unpackedSize":1273603,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbjNhCRA9TVsSAnZWagAA1HUP/3Sfy6uaUB07rO1V+i3P\nDDVEvQ3PvJJRPlVJIIrZ+AfiGILgsFofUHUXhJsAJzCHqQQBj4QrZBHdIHMm\n60WK6qmnrra0L5UbnNykU+W0Mcc4ARdaxdbWkq21pV4Igwf4EbDtDQUijAxQ\nwKmsSH1uYa6AeUJmReTEKrQedUcjtH/SQe28DPGGZE8lKgKxt7naOLhyhtkP\n90abOn/GJh8j7sIkLKaa9UtH7v2xNmS9o+pigDEuXRN8Kb0QE5MwNfkkj1io\n3T0HH4HBWavnVXZ6F8FKzE8JKH+V+I7gH+fvdJPpBmL91bbrfdM1huP6GFhH\n0DpqHt4olmZU+zUKiUl19wPdeg6940aGvOI6dtamSKTg70Yg9mJ/tZ3lwhdM\n2N+nhfEA6q77sHWHRTNPAiDZEBgw+c3f+r/bWfjdCBbn6Q2OgtoTUy/Qx3xu\nhyTd+no6/sZnLPGMci/2heAv+PgKaP7xubu7grheue4QL9xZ1yjHabvW3Mji\n/KxE3yg7syr7NBpBDWLKEsPt6RJQahceqoAz9FNygMYBTZbb1AzK4wLe6Kzv\nIRIAWo2UiUjBU9qEisPyzvbfU/Yq1044OpelKDfB596x+erV/jKnau5ELoXe\nDC84++zHP/6LgmqxuPElptd+/m9RWscfuaDik9zcKPNDlciN9JRwADpVTD/Q\nFLqF\r\n=ZTOz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCydDfh0lbXou2+z8CcW/FBIQwdOjMC/4pKbik1WqfvbwIhANDn9nDO08BOERCSkCIP9Pg9oh1U8UoxCOeEj4tbaG6s"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.32.0_1601057632647_0.932017394836195"},"_hasShrinkwrap":false},"0.32.0-nightly.20200925":{"name":"brs","version":"0.32.0-nightly.20200925","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.32.0-nightly.20200925","dist":{"shasum":"79bb0ad63c42bc35d5ff6d11fe7892ac13a9bf5d","integrity":"sha512-ae6jX6+9xlGrpUDJO/bswdJXaQACTVAIwtyhCiQmCsvrvCRDzPDmtQ0d8yJv8V0J7285F+H6oLvjjiQ2vwNEeA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.32.0-nightly.20200925.tgz","fileCount":204,"unpackedSize":1273620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbjR7CRA9TVsSAnZWagAAorQP/1ZjVIOmzK5A4p6I9oKF\n2rcjHgRE1w5CaLLpscPAjQMR63HYHnnub6NhHDeRUWRZb7XUeye+X8zES6DF\nRZdXaEdT1SoBt1PZKTUy9jFFfOQ5h7yMuPLZI2zlz5HglWG4BOyheZ72e5jO\na7OhC73oV1ArMKDjWkmj0GP7DD1+3sxNwHOFQlYGw0ZMaSgzfiW91x9IWwxr\nKAVp9WvXh2CQgpsm+F1gNyLCKHzycybJieNpXm5jcUMtkJy/1QKvhTmgPbWR\ntDuaWTDEyQUFGKb+isOCCYTPn+2oUGuPlZjEdwyBn7MfLkPORHsX44vxqD0d\nR46fB5C7/7uG36+WD4+GD+KdammD6+wwsqrtR1qZWLiykrQilSyBbnDMbK3B\nuXacTuAmhUBAx4ZTEpWv7AsYgvVQk06d4POCCMOEvYIklKESdYe2xFrF3XR5\n86oUU+eq44q6PtBs471JxxiraM5rLBUIfETJsQjg6Pe9SzfCXpHw88I2m7ws\nIOe4xXbo0ez/NS2ApXY3w3/JMwcKpGflIzzBrRPMpLuBYyTyx4qu+lXcHOKF\n57AVVdWdohdh3J9kmaIqyobjDZD1vgwYPRawoJGx4vf4wlhCgufxaKQUnw7q\nkrb1HEzezI8ojzYVub162CMcaqfsg1p45jIEGFoqhbtbp9+dpPoRstQixoqM\nv6Uk\r\n=0+V0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvu2RKgOZpt/a7KIjDCXbdmen/EuOF0sk9hCqLanrhBwIhAILyIjgeddWLC8Vps8HOxtE2yY+Sj3l9m/b9IqvvYGEI"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"lkipke","email":"kipkelevi23@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.32.0-nightly.20200925_1601057914832_0.09556629919176318"},"_hasShrinkwrap":false},"0.32.0-nightly.20200926":{"name":"brs","version":"0.32.0-nightly.20200926","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.32.0-nightly.20200926","dist":{"shasum":"108bd51f4ebd2a021a842d822aa51dd59f9100b5","integrity":"sha512-TPMa+s5kApO/aKGWJb41uY8Um7undPSK8vUymTnxiMAV3wHgzMyhU0jQsrMMY5xj+DLhUdd5RYPZzXAQlDx/qA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.32.0-nightly.20200926.tgz","fileCount":204,"unpackedSize":1273620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbuwCCRA9TVsSAnZWagAAcQIQAKBaREhIgY0jUEyfxDWB\n9+1ZD7dAKqjdhGRN0cngPUP3y8AW0Z3Asuc/7Urwi4HlB7tc/EjFmHHMkO37\nFzfmrAzpysAqLGrH2gUDbg00iV464aTI9iZU4FQxxHtCkDDhyWFH1M6SQrfv\nml1s5XqzL1F+AxqPsXO7rgy3r2goW5VIp0Yjr0pVuAFsTfQFvD7Q36NrQLaN\nRrRbtQUFCurAjboi+8HTL1DkdORiurci5If5hTeT27SjLi79QxRM8V9CYCUe\nzNLzm9llUCySNessEhHedA01TGt2CLaVOLa54HMxCbPkRmdPGAYomB1xjCAK\nbKL8em1jlCqGZFQiNs+b3ieJD8RUh+GW2W6LGOiEDX/5vIJYa6iH19UWSwd1\njr6Oe0DO/kMsc7O7Dd9R51smTTucthCbYGh0V+ATZFGh6N2y3wZXRNTGtyfh\nSqBcKSyLrFuAppmh6lGuqHiec2y/EwevdGOqdkwEuQwhFGDyOd9Ef3r69gjr\nM9Gc2QnUs9a8ufN/k6kQC62uq+k7MsbDYfEwTRhMQVrpttr7FHMXXTvGwI0f\nHWuennaQRsObkALsNmtKpu0n8kVh7vNcwgZ+AssQf8GsrnI5YtBwbsioI/tp\nYfCnFrRVVgxybGRALSou5h9ajntuMlRACwf2tsZGqnQHFLFdex66ECKAj1dx\nBQzx\r\n=ZjZJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBH4P6J0C+SWwUOtgCNhL82AdyOgiY39Mo0mq8JATricAiEAuQ70QNWa37LhuU5hLtIhQ0b32GfAas/RCuLXZDYYWVA="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.32.0-nightly.20200926_1601104897347_0.8689916368534423"},"_hasShrinkwrap":false},"0.32.0-nightly.20200927":{"name":"brs","version":"0.32.0-nightly.20200927","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.32.0-nightly.20200927","dist":{"shasum":"862c2ee0271c3279f65717501513b8dec6afdc9a","integrity":"sha512-6xjDfpSOgTlvVb0vp31wpotG76MeP1f9Cz1L7KzMaXa3RDn1miWTSwjj1ldAOck8x3vmxO9z/nN5hcBcDJHKjQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.32.0-nightly.20200927.tgz","fileCount":204,"unpackedSize":1273620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcD2wCRA9TVsSAnZWagAAgz0P/AvUpThYCcDW1NJ63U8i\nG1+9TsbJ3E1tQMOHKDgD1NLtg5v8dZx4BW3HwBhFu30mROCTURv9uGcO98xZ\n79bnxY9jZTDunzY9ZjA1z1CGy8l/2W8fmgO/a21BVMMZogaCMxbNALUvqnId\neZmnMuv6hhvsakVDq0RGVhHcmq0hsS96+5jDuk8wTCsG3zI7Ez7jfFeXqIIW\nhHLy2dRoOhC5CBFBcus4irNvleOE/FFDnoOQpSh0S7ZBsOnbx64SToiBPxHb\n2ik7TX/rrwXR8B6DzaiQnVXp9x+p4jhtAFrJQxMFWtCfpK5uekhm/D7fl+ZO\ntxrpWHUrfk08h3hVulL6gp6DkOnnaRJQGoSWGNy1BHuC7nZ75Z+L1nVUoxfp\ncktxXcNJrX06AJkOyPrdmP9uUMpQzdyAGXB8VVPM60aLnAeqFI5gGz/ztayG\nH8lwKcaHD0dKyKPpZhxcNo/q1ugo2qq3FPGGr7KBsWeKxenzWKmWVm/3VXUO\nm2EJ5cmeNtnjUvUvxrPCm5/h6x/M6ozz4a4DcXaHUaeIq273Y4fWvquqpJxW\nda5FaOZn092CZyshNpWALaZj1DgnO8dcgJ+PnGCJHEL/kbkgCDlFAfS5q244\nkcfZ6t2AgA/pypywoeSfo3UrL3osgAaehqv9DDTmi+ppAmPOpjLZmjXDAmC/\noG0V\r\n=/mID\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEqjJq13l4MGUmKVMinvjhfug5hvJXjpL+peeG6/HJpSAiEA49A/V9czDLb9CNeIT2qRoc/QHJbSj3mg8zfhxn2laeU="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.32.0-nightly.20200927_1601191343484_0.3614158734355528"},"_hasShrinkwrap":false},"0.32.0-nightly.20200928":{"name":"brs","version":"0.32.0-nightly.20200928","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.32.0-nightly.20200928","dist":{"shasum":"92f3fe410927848f54e743a6a7ede95e9b0da252","integrity":"sha512-Ey7FZ0nIdREojHfCkGSPoyJeyM+4g07066ccVrkT8AQ3/TjYYoWEp/XDY6nNNvOn5Xlw4HQPmwO6o2l6NBPCKw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.32.0-nightly.20200928.tgz","fileCount":204,"unpackedSize":1273620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcY8pCRA9TVsSAnZWagAAgtYP/0VBirWuscK9WAhrGv0d\nO4qacMO4iEla+D0v7IrMZsv7xFZQP3lqDbsAAUQOZt6Kf4/HMKTaxCBYNuFP\neGV42h/q/y+r5XsWao8n5oOl6qpzIEqS8ZIOVxPVYwKWm6h7hGuOtCEzTdMQ\nuEjIjGReTB6PwGeF8lz+OOCDDZ4v4CR6alxqd89dUTGsDS6vav/sbj3wYGm6\nhFEDkOudfjm0Xm/Q8KD1kCqshy6NNqN+ZyhQdeeOxaBpGbtXPIhgcpEiSG1p\njPDw1c68ytCYCSNy99M7gOxpYMoJfeIM3PxkxybiDIVD2kDOuiZe82CQ3cR1\nwtjw7VCWCW1i/W6FIItB22piptq2CeahIfcEHvdhFuhh5c+OJ3IICl2Ardqn\nAilIuMhSu8XEVAPV9gNAAtq/tRI4alKP7n8xG/vZQm3QNtk9wGnITqS2eoEx\nAzek2c6BTxqfNXdw4w3u3YRykQFLBKJeKRiybtNfJyvEAsw2pK5pp4MIa0Km\nHwWA49p+QrAOd0ykI9kSQD/9p9D/xKsSnDUptu/+Dj4Unxn9z91ULw+BEPQg\nlecdoFzyi5Ho5HeavpVGllYN6qs7XI1SVHDZJPX/QfkXohnXVhHT0IKrzH6x\nu/Ha+cL1sRbwleANgKjUGAk4jRQTTl5YoNAQlF7MPUO7PE1iTULMA+LcQVqJ\n2mZ9\r\n=uUMp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFMgDS63JyoRl1aMppyJzb0UztnsPQe8eOZ0XbHMXxhQAiANUTHmVlYd/K/c9+jUt3fd/04GIbaCQImUsXVsXxQwgw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.32.0-nightly.20200928_1601277737146_0.0066519080807181385"},"_hasShrinkwrap":false},"0.33.0":{"name":"brs","version":"0.33.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.0","dist":{"shasum":"349f1ee0f7f1ff5f25863bbf381c21162a994ccd","integrity":"sha512-I3ktKePrnsRjq7B8rewqZrZifyIDXBcxFKLcWoFGnzumDvEAmdv0BoWaoL/nvEpQ2/nyFZnPYCnJoiz53gbIuw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.0.tgz","fileCount":204,"unpackedSize":1274954,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfckrrCRA9TVsSAnZWagAAOA0P/3fP3KGKFyye4UnqmzLw\nG+5RXZYp+WobpmbzzON8uWwNR8DEkk74pgyBcl/Og86z106yhz9T3UlJZxyX\nrNPvl1yqRLc2QTVTL+3oZLRyrvwOd/p5afhLX18HVe06eo3v4sA0NOWcbzTB\nJ+bbDgFX/KbIDnUWgKIIPnj5E6xmBQ4rjU8UVkOH2jtDoMTBfFHT1uR+3wcY\n1h6beKTPh6uvc/pMzgflfPXS8qJrQa+bdmDD3MbEQr/OyvNLLQnvzY0tauKv\nib+Y2zArln2oo/5J6jLAF6J0krQM2JJPIGqKge7LOfB6zXuWpSLORNr6p9GY\nQ9XtWpkhgycFrSXQC8QFIubX7/QlcpzFneZ1EnjCCzr7EyE1fXeP0nbkFkaT\nPZA82SNgZ6nhpvRGL3WA1khTZYsJAQj5kWVtbL1EVn2Pqs8tmRdtE4PXa+xt\n6fhsQZ1OzsTB57Te6YWiYZitHfqyRT0+0xunQWMGl8CIqqBb81SQvCxLVcwe\nwfPQhefH7vxB9jMNdMlz5RU880HwsQKB8tffGH8B09LaJwjOHtmHS2b/sHbM\n/SqkUBrpXR7WlrIcetfcbKClnW/9ilA5Q+Ps3Ie38WmV4Vn9DG65IDhW/E+8\nPIQfx79dIcawCHNu04cNKgiB3OyOhi3w5m8/xJL1RGb8w5tILz8SB6jiuhAg\nm6Oi\r\n=X4yJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDc6u9lglgOcWA8wFuvGZUZR004eKvQylZewbpGHQbdBgIgXsKzPPM+rLoIXof3U53UB5kD9jU/KHO9PiYOppPjBL4="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.0_1601325802469_0.8645330980909232"},"_hasShrinkwrap":false},"0.33.0-nightly.20200928":{"name":"brs","version":"0.33.0-nightly.20200928","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.0-nightly.20200928","dist":{"shasum":"ed371e25d92567b1d03377620524b62c44528542","integrity":"sha512-i4pBvWXgOmIWuY6RCKknq8AJfIC2aEcpdLYEL3jRE2PhLaIJwNrBYGR0kuORpFl2liumb/l47sWj035AXekd8Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.0-nightly.20200928.tgz","fileCount":204,"unpackedSize":1274971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfck2sCRA9TVsSAnZWagAAi5sP/2AUYw3MZrX37pJxsObW\nuwnNpXvMghVtg+nGZDhLYAF28fSQpaXNGoFs6xeXKJtN+fZjyydV2XIF+AsO\nfndFziXfV3Qsvv/GT/FvLjaE/cBUjIyvYZbzk8JeTAOQwhN/3iU17sQolTJG\nO+IBueJR9x3KJbYpkQZotbVgmdQb7LWQgrnHMNODx2DcJvafCG/qZ8YRyzUH\nIVsVcoTMWxSsbXGTXEHiyyWCgkiTpOEbfLWdEjXnPJivKjJLAD0C2MAGtnLp\nScAwslL6A/ftZCVX7oxe5oqdPt9PTLvONgp2o/0h6hAtxlVNUZeEG/JPJCcT\n6uLn2LKP2/pLa01uoyjYZ94KM17SiZR9Mf/KayX3F6I3zS0XXvdS/1Cm8M3c\nFunzL5GBYy/iSAdUgPdzWESuafWaQdgKskwQbzbHiimOWrgKAuxw9G7NXYfH\nxAVizkR86yh01qBdGWO2UhYJCMcZLawrTs6obIkug+dyd5OhZxxU9RAtc7gr\nAfy8IHvO/ymH2feB26h9Kg7ZO8f8WUR1MbuVaWzFONc8fPjgM402UkfPVGNF\nS4sErAXq6ucZgeKaJsst2CPKWNUB3bJzdywpeUAWpiCdaLO4G6YUpVrSTvwz\nDuIyrd/+ch4xbtOyS0+s0s34q7ci5Y4r1wg20+n/OGFANK1h2p8Yn9qtQKGF\n3c0T\r\n=bGG2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID6HxqG2W8+AX/3tw/ptLtGCZMQJ+/waLt3Dcl6p2M00AiEA0ikUD80DadKAPW7h8Sbw31cl20KqFZ6PYrqU87kRaL4="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"lkipke","email":"kipkelevi23@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.0-nightly.20200928_1601326507785_0.36872221332562094"},"_hasShrinkwrap":false},"0.33.0-nightly.20200929":{"name":"brs","version":"0.33.0-nightly.20200929","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.0-nightly.20200929","dist":{"shasum":"901e7fa93103363cb44a77186b0d35ba33f82386","integrity":"sha512-/c3R7P4aIA2EU4L6NUad4PX6eC5vqXvXy/prQxFKWdRnqe+cSOPr/dV8Eyb8s8JlTzRREnpKg9dn4OKJmK6GaA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.0-nightly.20200929.tgz","fileCount":204,"unpackedSize":1274971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcuCaCRA9TVsSAnZWagAAel0QAJMMnWGhW1eh1WDMHcVN\nrFQiCKjCaeZZCn87cxgLIra7jVx+gYYcBOw3/DfLCl+QJ6y9OHRbxrN20Qni\nHz/BbD4s41+vCIEl/NSQ1d17hD5P8GM1ii7gikHnjkeswvRpl/nUpawAXEw+\n6jJCRsAXljLqboLpS18x357bbQ1HyUGXvkANcbORsUoDskHuJuaob6ATASQD\nOE9OJQFOc0SYtsOEFdQwbB1Aaw62IXinxmCEw9lbkycnsHBbR1xYX9vUd8di\ncuctVUrxXM6ghjGW+j9rlECpa+i0KZlF1f1hLM1iIxQG/v7oRX18UPxv+Kmz\n46U9GL6XdWZvfViokm3PaccpNj6DC2IFNYUQOMPE+KvPorAgczXrKhtdXF+h\nqHc3SrGBjIvoFjIVmYgOuHfsqK/eq9dPTPuk1/p5no6ARMeBYK7YzrEq5o+J\n0qeW+F2E5IuCTPSdAXXmv5BBK6OlHXu240zEe78wASyxgG0oNZY/HsA+rMWA\nEF5t66zG9i6g17uhjow6OqxDqBxrS5IPJNljDU2yWIkyjX4XSAP2741wm5oI\n1xAWTi63Trl5GAXvBtYX4jJ6zVKnxWNcAAhFDkGRyuRDJS53FrsBiqKzQPGE\nSc7p7NFUSUtkoLeQximin2ViNJBU87nA2Gs7jX75NIk3Vj72qH8MrfMdX2y6\nQjsR\r\n=CNfe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB37Y5m9RXvQ0rlBZd3B0/QUa7XvAd1UAYJplRK1U1X5AiBCUe9/xfENiMX3D6mmc8fnLfaM8yvLAk6TQZ2dtMpcRQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.0-nightly.20200929_1601364121713_0.31054990535007954"},"_hasShrinkwrap":false},"0.33.0-nightly.20200930":{"name":"brs","version":"0.33.0-nightly.20200930","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.0-nightly.20200930","dist":{"shasum":"fc36a5b0640fa577cca3124e07e17d8d9be40aaa","integrity":"sha512-xdOb6JKX5LgGdJjHROIqbUOxr+ZGWzUrJAyjJ+qgSOFo6rYv1bvntFP34O0ZWGmUJ/k0QrBW4PAGX3dLzP9EGA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.0-nightly.20200930.tgz","fileCount":204,"unpackedSize":1274971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdDKKCRA9TVsSAnZWagAAEioP/iFEAzRy7I3eD7/Ofd//\n7KSSLBzOFqzOuImY1gHyZdw8H9F9grCsfhptzNy3FVCw6/KMcOFOGVEbsT5d\nb2UNO7cBW8KTHfzjTH8u1T3O510zXvpPTsBRQto7wh/oj1cLqgF/v9uv8uib\nPmrGt/lSvLMUO5K5LLgYnE1UHB1nwXazxho/49/9O41CDhlTe65UhBMrh45Q\nmeXlT377qBZcgT6DV5m2wT82kXKZtW8Q9Rn7nevlb6YhHJPkRb2wG5Bjo8dn\nro9IXl84/A9zDYpGfefoqLuvXku2bttiwRBBWytNSLPLI6w/QCpb9tNqFaX5\nhGWjevqyArPrLxBaiYU7+CzWPNPhzkSGjCHlxEm7wLLz16bD9eFkgva5l2V1\nXbQdW178bW4kKB5z7lYVF9p+lSRTsay1aHPzdLLXn1o9iYSYIUx/3ae3kFcQ\n+LJ5rJEHffxLER9bW419GZTtynY1MZPoI88uQ2CNhnXCrGtBI/M2biD7/Wgx\nbvJ8S2ym+xffmNRdFkwC3orWlRYMSH3pSQlb1r3fKzLCKprnuBQ1cbiaHweo\nd6HLn8tNfMsS8HEW6c28XfM5PG9/3Gtbbiu3epyCq4olD3duoU50ndg4DJt1\n+TjR1mewPVgpgs862TUJ3SqGbEfgnq9x7zE/GcuPtpCauBSu51qyZYEazXiF\nsFpB\r\n=FhzN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFG8fsvh5Fab0zRvoS6v4fcngLs5Z52jenKTZ1d5X+O9AiAqREyz8mvzlDmYot+N9wpcj8uDhtqQ3uD7oOwW4vApcg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.0-nightly.20200930_1601450633945_0.5290834068694135"},"_hasShrinkwrap":false},"0.33.0-nightly.20201001":{"name":"brs","version":"0.33.0-nightly.20201001","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.0-nightly.20201001","dist":{"shasum":"339c3ec1465856591d44037709047f07aad21cd7","integrity":"sha512-NTOCZXNmD7wUF1VwK6pQ9HyYJEuSuFzvOd9ZWX5kzJBeDRRtIc4/cLqY0MHXrBW3EzJm8UNiVQ6Ffs1oGrgS6Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.0-nightly.20201001.tgz","fileCount":204,"unpackedSize":1274847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdYPlCRA9TVsSAnZWagAAUA4P/2kn5FFDsHOn2dvhbvhk\nWpMJRhvZO9STwMWeoLrSQAZ0olINcOHnjGqyTVCTGrwjqk8wzgbYyNEKTgLE\nfGm6EIw8MPeYkPSTLEFc8J7cm1+RXtRaJWKrUIft0uGp2nLJuQ02VXb5qLCg\nZIh9UtwNAWuj2T0gmzEgYHvbdT1vJdnH6OasZEUf9w6bu7gddlwjDzYKyljv\ncFj868YtIbrpz1owjeqFOk7w7A+qwUJz4vG2izjRTY65HQDeKM6fOIeJbUm+\nD/BGkvh5VqAJzJYr2yj6HU+LOVixL00yDLx6qnIVTthOsiJMvRJ1HZA+UQHs\nwFvEO7WeInSzyJWzkNXJZLiZ6rMDnZ7oYDoI+uutkCycVYL6luK6BWbIlton\n0cJ3cHi0sQjR/llcWAO0TEJwSg3xJ9E49iX/6OZeskeOfZo17nLzAJHE9cqv\nAOMzpVa61goElrE7vyrA/qiheZEQApwwu6GAjDnjs2eqOVLHUF3zsMjKI1q4\nFTgnkXDt9s1xL9SE3m8D+Bi9Zeo+wCYPubJMfRZhAtcDHyeqZWSh71WIIHPA\nyBjZZkqioRLQq3jl6nV7cXWORPrloUNyN7lOGTt2ZCZhq1lGL4dCmhD89EFO\nweBgDdE+agY16XZ7kOQ1NRXk9aUurBrZvHrbqp+r7cqbIOfW+5VKOtosjmQp\nE62s\r\n=tcOO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEXUUkbWaj36wBwSiMq8i6n5uU+rmGTNm/9dwjrLef4BAiEAnESJnlGMYpnXikRSywAzIFTczzGL2/1dilfW9rgoc4I="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.0-nightly.20201001_1601536996861_0.5151466713790747"},"_hasShrinkwrap":false},"0.33.0-nightly.20201002":{"name":"brs","version":"0.33.0-nightly.20201002","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.0-nightly.20201002","dist":{"shasum":"b727c89e4429977375f0d7f326d7c10a7fd31f75","integrity":"sha512-OgpaOeaMkLNhv7dEzHHHHPgJJ85YYBFADYYmCVpAvrboVmnzQVPML4OiJtEh6o93jV7ymeOESzyEaD3sWfTHMw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.0-nightly.20201002.tgz","fileCount":204,"unpackedSize":1274847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdtVRCRA9TVsSAnZWagAAIXEP/j/Tb8ECyKoxlz79B7+F\n5Le8Opbtm5ZrljFZPaNTE3RNhKMJ3Fa/XVlZhpmy9P+xtCRvo02kfXR6083Y\ntm4u4CdqQzdd68bv7ARqGzpxw+LszPtrXCEptEQmAB5dFjm6VmRqLS6kiRhs\nmMGOHmDlxkI37+Bht8s8BGiOdVAZFnCvFrivot92koHLqBUCslx6T6OqaIcW\n3Scgmo7Lw0lXJmTHwK200VWMhvtrHUdOEpbmZ6me/HrdnWHh22xfSRmRPuOp\ntlxDq4Q2IDqS592KGHg1vaQr5PB9Ov/XqUN1GTRm2vjwoxRgdqPkVbxGU4es\nbNEA4U7YIx/9BQVwOWvllWLtTCFHMs16OjiANBXR1e43CLk6VjO/E5G8Hh+f\nkYf/sPPnBTwOWLlLtvN+GoptiuNTFGIn2Sq9OlVZC83lslq7fqu8u3n4bz+2\n/QDZJd0sebaG+b5h4GAE7egxMUEV539Zp4EFQv6/F0sb/nH6E/7n+aDxOuBQ\n5ktdcIwACLopSd0LZe6x4W5qnjwDxGEvcqeH7s8fzU6Tm6nuECI+gloAjI2l\nvEUIqtGfBleJyTZ3J9kJQWPqui1hBuxzNyYfqnF+T6neg6aI6owULgoEg4FF\n6H2M3VMrkEarqqnaliGu9ZJD7kCDqKrXkF3Cea1cli9w540YF6jpj0zj1WEf\nTPuX\r\n=tPCm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAGr5oJIhKSWie5CPYOtLaRj4yPAM89476PeJndRItxaAiEAx/7EwXaTNvrEy01ESda7gVQQNuBMVsZnPWFAduXeeDo="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.0-nightly.20201002_1601623377017_0.5896448644616397"},"_hasShrinkwrap":false},"0.33.0-nightly.20201003":{"name":"brs","version":"0.33.0-nightly.20201003","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.0-nightly.20201003","dist":{"shasum":"3dada5facf82d2d4247af3338b7ccb173f5915a7","integrity":"sha512-dPVf/l04+X6XVcKf7CRcmoP+WX/6K/vSnwTUag3z1NeQfEO0/orQbsMltPcHEwoW4QzufFmQ4shMddU9IalKbg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.0-nightly.20201003.tgz","fileCount":204,"unpackedSize":1274847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfeCbRCRA9TVsSAnZWagAA+5YP/jzKDrCL/VQjY6GJTGOS\nIJVQso8A9M5asGXhYcEktAp8mDx5hdhSZ4hARzTYSJJw5e6ZSfV5m3qtcUUU\nUZhjx5LxoQD9QLyLvIGCdPcx4JwdZ8culuONaIPu/DgUtwqIPJGT4i2DaCKJ\nSIxxA9GQqtnZL+trw5iDaW39/pGU04lkMhskeOxXSMl5+M4Dqs88mhc/tyFj\nnRwiSWhvi1udJVAExRnmUbv3E9B6/7NbcL0Y7x3GDOQx+6V2YNz5iM5Tjur1\nc1yRvpcvQ7A9T5wnzCcxV4VXzoPI7X+sPm/6FXREwXeDLh92n86h0Bv4qNjV\n/WNvVWiYWpUJrDOvlG8xcPWJPkq1gsZX2jROEGmTZE8RQKxDv2UNjTUoGsHn\nyXlqQcHKMom5vSdG16l/P2decIVqg/WjKUCAn4xV6PScLkaGVnTb8aIh6eTb\nW7eWjdc1gFA/9WCKmF1Eio9qj34EHqRQx5mLWmP2g+TdrjsZfEzNLvfxTy5b\n8Ea0NEQj8AkUKW9Oq1nvDu7Eb+rSb78IFt0/MRxImTUXQWZjjqkv2AS9DnCS\nJ2qOyY8/8FBAgomwDMqvVxH5ZzXFaFxZT5dKhqGQgyDHBvowF8kmDou1L6m1\noMwtbL2IZu2g5ciLqeAMWKr/yt7/LljrNuW/6jviSJjOnZMscwBmq7ltDQsB\nnpsR\r\n=DuCM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKc6B5sopXmJaGKFw8humKu3FbCRx8sscX+keu3xQ57gIgTo8ul2t8VLbIeuq6Vs6exL/3Mbo9zuxur4bzK3GkHkU="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.0-nightly.20201003_1601709777115_0.5553024530903636"},"_hasShrinkwrap":false},"0.33.0-nightly.20201004":{"name":"brs","version":"0.33.0-nightly.20201004","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.0-nightly.20201004","dist":{"shasum":"a0f48442fb0a2abbfb050bf0cf288dbfe7a4a3b6","integrity":"sha512-cCEEghXvqfzve8FPyYozIZyVlm6nHL6VGhF5pLFD9B+GBoJiUG3ITwfACAMMAVesI5bK0zmKtgl7oQoaGgbrBg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.0-nightly.20201004.tgz","fileCount":204,"unpackedSize":1274847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfeXhyCRA9TVsSAnZWagAAygoQAIQiGbSfC0uKU2F4hM8x\n2tS+j4TU1mN28Y24vbAPVQaUPTMO3iyAllJtENizURfiWJMtx1pT5RRBKk92\nCWX0IMBoMMQTAV9PWS1f9ty6lxqJButDP0QUpP4Syq8joLcBoch7Vf9X+LAD\ngEN9uR3IWTSP8qtV/p4EU/9ecHzbYsZ69U5i9y1DBFHb7wLmkqfvLOCkLE5s\nQsr/bEGadPe/34uWd3ehOnd0/p9I/3aMMz3KpaV//36zMx7rqlT53xCYrn3M\n0kcYnMLevW3jcD4ymlzS2nG3UoIwIRMkaOkoeyV2ChiME9zdi/k0FfIVqLwZ\n/ZwRgId+0an7BA+WMVXKopG6YQqaHlm7frNnt2uNDtIOiDybzYB/b00Or9Wj\nZZi/F5Xnz6x5qpKo2SjfgbZNaxPqCKGowI1ubdzXUkToms3IFCI8xTlhJsXE\nmVi9tT9o6wgcmQmPQrX3I9ia7wmyGVOQSS2aVFDi0CBcWwa5cF07oxIugQET\ntXUV/ySqQlSI/EBsBhKpmCUAwwQ96PD1S9mExOnbeYVXIk0qjt1fO02bRQ29\nn4YJfZXf2we8cQIc2ZuwZ45GirnZMFIX46GqcXKvGB+mKr1eVBlZ3MrRp9Fz\n79aZBtr6FM9KMLdbTjM7rGR34ym2KREZatjgChejUtsE2UU4LYlQktBEPGLJ\nJjX9\r\n=5vxW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAsyKHXlP68RZDHQ8ovmpGsfP26scZlBvLMCMrFlAwY7AiEA+szk28NMhePkByVHl7Vl8megHO4fgRW1ylcOlWrZRMA="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.0-nightly.20201004_1601796209449_0.06641915511646257"},"_hasShrinkwrap":false},"0.33.0-nightly.20201005":{"name":"brs","version":"0.33.0-nightly.20201005","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.0-nightly.20201005","dist":{"shasum":"d8ccb853b2c53a51bd2705cdd4746f85d824e6ee","integrity":"sha512-HyZVAtTz2wvfRCOKAHOSN95II1xohRl3pMCBx3fNaprOmQb36SA9cR2qHjhkD4omILvM84bekVCvVH9x4u1qww==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.0-nightly.20201005.tgz","fileCount":204,"unpackedSize":1274847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfesn1CRA9TVsSAnZWagAAsiYP/RNNKcB48RL71hEpSNBr\nzWihGNWwHuLgopbz2baqv9UqX4zkzhM3Esf4iRRXNIlbz2qXPC5cxSECNPbg\ncl/tUZeZ2L3M848YaFefGR915+SnlA0dDYPt/8+lTL/NZ306knWZX2HokqD8\nkwm8n3jR2xnHhIKYZml3NsDlo/hxxfhE1exh0uJ70svWk+QCKk2SEcpVXXvN\nPo8/Il/2ZHgTMEl7GNz8krcYRVbDK5Oid5XvdP6tCNShvpr3JPr/qn1QDA++\nkTrt6BjJUNy91EcPNpiuxEwefNVHJAegX6jDky3EowFIzHL0bHXQ/bVdAva6\nNr1hIZ6UV/cQPYK/5xYrSSIPMffhLmcqfAgMvy4Bsdvu+AEPK+sGZi/Sl0Qq\nWGAgi9Ql4gdSwpgrnbyfv6KOfRkPlR3gXGpEJBFpCWcD6qTiyNre/1AEApNp\nWbnUkG54zHu9lGYw2kiZtfZHOvMfBTSCyEuQhnRcFKXse9sNOrWxZI82/jMp\nTHjWCc9yG2EdwJrJB5Kh8aPLjO/5a6lZjcs3mt7XZTWRJXJ42asulS6ENsPM\nRzbBzG5rvB06WOy+x0rkR7R6rq5XxKGcGiQgnMmJlZHfJywmRpdGc55NvNJE\nJpnsKZdLo2iqNFL3t4VBXhz1Dmz2OfYnptHPznIZziz2pIaycQ8dxHvRIrGQ\nQ8Ns\r\n=YYLK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNOsxyNEVPFKPFt/tZBdMRxNkf3HL27RtScT8bENOyXQIhAOltpjPWRboUMAgupsLZ9v2zirsUMofiQv8qz3u8N6DI"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.0-nightly.20201005_1601882612950_0.4688779637914975"},"_hasShrinkwrap":false},"0.33.0-nightly.20201006":{"name":"brs","version":"0.33.0-nightly.20201006","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.0-nightly.20201006","dist":{"shasum":"798d4eefb1f28443b777eb26526b8293d2b7ce1d","integrity":"sha512-QlLgcs5k+DSQ2WgYQhf2Ed9LaQBmM9N8dFnAFgsE8jMG0Z+rD+rCvUqur3NQxt+U0lh6DAcfgs4hULknwFtORQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.0-nightly.20201006.tgz","fileCount":204,"unpackedSize":1274847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffBuICRA9TVsSAnZWagAAVjwP/RCJyYHG1R1stBkP+Z/4\nATkQeabUfQ2wWdh8FwtWMX4lMX6lpowiB25Y79/Mr4xaQKlJc6qoH2NGZxnw\n99VRPG6YIdhNlkegmB52cq4MNG/P1XzTti2hzI11OBmOI/YOT8kEwgIXN8Yk\n+DSoMvyNrShmSyXfuO9LGIMXcZGcsErsaRpPyb0m3m6Q5V/0mhkozJ1mdi94\nF4RgVfp1ozMh4GgvL7QGimPGRuFaTQSnALVK+9M/qHF9cCfrDF5Go+fjGDMZ\n0JGjsPQgCTyMxqQei6qplKxWFrIs+EoSqWVX67TbhBT+uBd5QEbw/xH5mA3x\nopQXIPMIwnNuA99fsxPpKGvVmNDQkVDyDR4NS71vPawdRpC6aYmfbVN8Mnto\nlaqr/CEaYXs4xWNz4z2ivhEHxTrvjQlQNkxFnC4+FDOwTxjA1sjCXF/DgiLG\nMzCm3crRa+9TT/IhDzvZ1hTZzSi5afES/XU+B1E9TxQPYfF2KdU93kkLjjWC\nXTMlN2XpqNkYV67Aov7Amz6hQz/kOhOQKR02DV9qaJsyxImr/0U6v2xQQo7s\nEcx+Z+0KEiwfGTCqlKVZUt6BfekTxXDsWV12ChYotk4G4aa4IIZfSbayOcOW\noMTZzb98iM+680/XziqmIf8jrLIQJtS11uufyiglfHBIa4uM6+vF5171MzcT\nudxF\r\n=swqi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDv5hJ8YsGX8O0AjSL7853QEpDWm2pHwezD5qc3PHnuAwIhAPM4xk7JrU1/6mksI++xAkED4RmtSJD/jDu5v3Y1V1Dc"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.0-nightly.20201006_1601969031419_0.31303020186139907"},"_hasShrinkwrap":false},"0.33.0-nightly.20201007":{"name":"brs","version":"0.33.0-nightly.20201007","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.0-nightly.20201007","dist":{"shasum":"3d403258886ecde3fc22892e7bb0d694814ad777","integrity":"sha512-TFJ3mgwF5A+2gdMQgbrkDVvpVbWmfQ0cIXABieLVRAuNGIr3da8bAVE0ZWFGuB9OOo1SLupMGBhHzKMDPJ7z7g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.0-nightly.20201007.tgz","fileCount":204,"unpackedSize":1274847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffW1ECRA9TVsSAnZWagAAAF0P/iT3zl3PgYU8cegYuu7M\nZ0M0fvOgDqowgLiUQag77/OIhIvAb7I/MNVYigoCdp1R7IpA0Ce3LB68QHdT\nQpdeT+mgwUnS1AJeWJo3pOh6IcOTi5MJDCcyLROzpR+P300mxcZ83Kd7ICjY\nJ/n8kc4LDRXEg1PSAzOeRhJAWmMiuj77soWlDnaswCJuS6QNy2uDOQcvEhFd\nAthA/lAZZCJxfaNA35kaI70U7V0zHedneGJdWkRV3IwAlfsG3dM9MCwF49sa\nk+xhvrXGvkcf4x2ONwvqC5EjSamPtOEej4+E6ZCL/Kud7LZpWGSzyT83hzKJ\nOj4CKMbUr6wTs9ufgrOR6hK3opN2zkeyuLamLAeDQRqL1vrgvFB+65hzu4c0\na2buLu7oqTx3RRSxgy0DMX8G3RTdUrkKmMQDMAr1GInOWED4VReCMVxa8Liz\n0m1Bs4Eaa/hSHbmTOyoAKAKVMKm0H7iuLSVffngJPGFeLLEcZE7gwu4IQMHj\nQ3VBIVVOS1i0wvJaOkiuz8+Bqqp+C/AW/VNEREUecfs+aS9jBZQ+tTeyA7wb\ntm27RSUtgx9+iavZh4j8OLGwJOTyRSThj+OTOojc04gIzPTfHD5tRG6q3YoZ\n18899JavFbe4mIzOJBibCnTEZMCqEHBqMyDUEavjfk+tmdhf4Ix4/UJJb6ut\n65y8\r\n=8oo9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlVPFxL5XO9+Gtn2OmFQ4JWuhi2aNCCIeq4Fmq4OBR8wIgSQ02hJCmS3LOzTLW2c3iWCKPAdBrGhKN8MpabbmDJMU="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.0-nightly.20201007_1602055491525_0.018014288985233717"},"_hasShrinkwrap":false},"0.33.0-nightly.20201008":{"name":"brs","version":"0.33.0-nightly.20201008","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.0-nightly.20201008","dist":{"shasum":"7891ec744f24977010fad020f7f29f5ef351984e","integrity":"sha512-+TrbOOYKsU/2drlO7vCf4ASJJbsjWTYDhopezO2ZOzhRW0IzvXx17EIDZjVwSnzZNkvlyOXZGCgYTeyegzm3eg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.0-nightly.20201008.tgz","fileCount":204,"unpackedSize":1274847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffr3ECRA9TVsSAnZWagAANjYP/3qszUpvjhAVjmppdV+7\nFzenG0D4l4ipMWNL5UhVe1bEQXmGsqWAHH2vJVKA6YNosrH+DUmS7TcgvF6Y\ntZ4Cjk3KyMIJl6+2O94KHZucEwHkrWZKcqqEWPmkApGNHSvTy7n7Xm7Jx25/\naIwQsYug199C/T+19/MGyKyo7YuzeXXIQjyMohjqysxK2M+GlDNt7nmkKaxO\nB7x13nAneKN0AMMMqNnbtmdXyzmsqD6pC7bCy9GE2K+xt5+FGyA9LvGDciTm\nvq7e25F8okziORIWjwHXbd+b2InOoCjNYPuiOYqjyfo8noSghjCBFMM7sfUX\neN6GO5Z1Aw9xP6+oPxJJX4x/TJBfbIwBsgfc/eg0CffhhjlSdw5zDi6RXhLD\n1iSctz9MrhxCIbRvKFm7gVl4PnkynuKb7/rifPSaSVVR0KqQZ5mESQQnowAY\nGm5mXJoLTQfRGaDClXxTK/m+CsBqSjVRKXQgfN89Gx9nJgeIoeS04ZkMJC9A\nIYEtUxHp776zqGzEfVVfjizTELFGKtNboXPnk6jsjqbrpzI2DHPtIfdE7Ap3\n9QmAK7kbmm5IWMyujPvmSu6oYZy5rsV0XHsL93av5l0+h818cph0w2GBkI9m\njmzngtoiULntNYPj+3o40pvIVsnXTLENp9R7Nj1eUSi8ddyFyFADWtk0AQAN\n3q0V\r\n=/QzL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpU71jxiyuL9NRjGTPZuUbHlx2W5vX9YbTgVEBsh9DxgIgXbQgAs1Ob6vPu+Oa5jY9eg5lkaO18jSSMOpP8b/mvYc="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.0-nightly.20201008_1602141635796_0.3102196339037526"},"_hasShrinkwrap":false},"0.33.1-nightly.20201008":{"name":"brs","version":"0.33.1-nightly.20201008","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.1-nightly.20201008","dist":{"shasum":"2efe5dbdd98f55dff4009a7f9ccf974bd0d3f6e5","integrity":"sha512-eVTheMYzlizYf/QcCBiWBXtosPrQqoR8/J5PlMnTEm80Wj+q4fNyRsbIr629Lfe020a5GwXvi3nQe3DnpPr+oQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.1-nightly.20201008.tgz","fileCount":204,"unpackedSize":1274915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJff4IoCRA9TVsSAnZWagAATzoP/1ygssp2Tk4O+VcJWjo2\nfL1b6aHvo+dkUCXegwvlsXtoNIDuYUGU+O6/+OhvdftHI/UiZlsxqIE48nIz\nJIgyNHYB46KEyfWn9fVAQcX2/SytzWRHzA0EX42vQ05LTHNI5RYjt2bIqZQl\nHXJhKIGXqDdVReVMyKuBGvggh1XXDtac8duRBEr0CKpJ57HVv4NUAno44r03\ncLZJwBtN4RtoKO0DswP/7vTEyk7i+y8hhzmapCKIBJ3+LbGFkVun5HeprLYF\n02H1hz0tuCPCYTaC6Tcj9eavUUbu/vAo5RC1R6Xaulpyz6ulAQaC9agO05QD\nvAUdEE60HJuUgljC3oTZvA9aUow7PpmARgbqp2JQ+BoemAlfWlEj634vsJWe\njKE8+4C3Ly2kUGNZoaVWjwihkWHMTkrIwZ/jURQ6F8X7Wo+I6qEwkrc55BVZ\npyr0GuNCmFNeCu+ZSGIrlrQdZnqnDhl9ndfRCyt7W+ydbA3Amu6AZcOccbXg\nd/fSkfr23IVZpcyBHgqj4eLC89oOaqHxWaSkH4JXJyGWRUoiYyKbG/nasKL7\nPZ5SaBvvJNYHifVVzQgWiZC4upNsNkX6+BOORIdoCqeyepb9fsMB2sl0BSa4\nyNiGqaSwH5mVC+IBMtQWdw8h1dtdVEk+3PCHnHVikgzxXyp6yMTw6X6OvKP/\nMkRP\r\n=AXQN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHVKXvaWBpIrFZ0de8RB2QEylBxzxfghk3cUtaGuyCRmAiEAxvkmwHzlvbmjqk0QbXKRIWqNfBo4Ei7xh1z2A9uma+s="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"lkipke","email":"kipkelevi23@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.1-nightly.20201008_1602191911878_0.8897791299388023"},"_hasShrinkwrap":false},"0.33.1":{"name":"brs","version":"0.33.1","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.1","dist":{"shasum":"a4075684f21eba99e0ad4bac349581a24e35e93e","integrity":"sha512-6UuEfbxvrZt6UWNEM6d5ICrUeVUWOef4YorfaaCTELc3ExXbtUwThDYm01YCHJ1+eSOEHZRZeKxwmu7OsMIuUQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.1.tgz","fileCount":204,"unpackedSize":1274898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJff4JICRA9TVsSAnZWagAAwa8P/2gdSXS1sEdB2IJ/DiPI\nvL4ilLUIZObzRDkFatQHB3VIGjt3a1E/kxfmc4/LxSJ2e4QKSHj7uANoewWF\n5cdu1XJ8JxsiKzFOla//Ff/yOq3FCRug+tXDSW0bMNF3ft6jV6HMzWDUqCar\nsd/QE85lYAQNqZOI4F09/lTkgB+H6sm2JgnEIjFU2CDWyg2/hK6ZAz7T1ePb\n9oBiPRcFaGNItI6RKRpcMEbtUJxujJMUdrngzGtLAVFyb+XPXgDauy9yYt7X\n6niBtXI1vEPxnkioWPzg1Q7eseXONAgvi9jfTo8BiXtpr1c2aq/6Pxrmymug\n5dnbhKyRFQI6eqIlKHhBmbYEIDxycVtk8HKPSYOPYkMrhQ9zbG0dV+I8tkSS\naw9+u0aumKM+y4a2+10vXtL4E2XSVCJbUKciGMeIlwPk2YL6/6ZEB3jI4XNX\nAQWZlUs+0uMo1pk/17KWMZaflvDsqqouiCm+jpD9JqEwEqsIz9U+pPMzYsA5\nT5h57F4Ksig1neiQDT3vNHEVavPcjuM/c9eK5K4qvMDPrP6BKcuH5ZvQlUd5\nXWZbebIGtKJiuHJ6Jfig53L43lpzrqVgmTAvdR84Uf9L579tTa8s/3dkmT1j\nLa1RwHLnbHTw2BQTckV27/cuDbSI0aAF0NtD4TQo5H+CTTQyufgb1Cp14scu\n1C+C\r\n=hW9F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFqBoPnsI7cfYKBHTL3WtKosguozeiOB70fzZEfDagTNAiEAiZ9jKF1vdh56C3y1B9Y/GbmuzxGPAlrdbWwiTigloS0="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.1_1602191943821_0.016123417071524315"},"_hasShrinkwrap":false},"0.33.1-nightly.20201009":{"name":"brs","version":"0.33.1-nightly.20201009","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.1-nightly.20201009","dist":{"shasum":"3492ac3357ebc98ef68921e4fc1ce6c44bd71ff1","integrity":"sha512-xQ0dmyWtzdyPlhWu2dcqv0zZqzGSkHXISJm7BVvOxpNHfISquc9T4eZm3ByIDNUBGY3EDvRZIg4SpMQRLpf/5A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.1-nightly.20201009.tgz","fileCount":204,"unpackedSize":1274915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgBAVCRA9TVsSAnZWagAA1x4P/3ruajk6JpWjpbyPrXVT\nz5Hmg5sLlM9rxd6LH8v19uY+Z3FnXTL6QGP3hRlCcIEbN3kSLTwgdOYg6WvO\nRY5zmM8mzx1oQv11yREOdGTHM1xfWYo6WEuZ0r1sHCjyXwesUKrWJGGOS+iF\nlZdxDH65vkPp75DUDF0CSA3JVjbnll67vTjX85PGWn4jLXpp99RyCDnp24/q\nnygipqdwEWKx4LLdTRer77akNfNY0yD68HALUIPNL+ed2MHi5D9XwGubSkWn\nAivpd/iTBRoo1w7bi7vt74s5fEOYVFHXip9lqGtOvqJcwjkZYY/+DcAh1aOu\no80HMnPSPd3Qsppi3zCCESo8/hcA8BTUBsZjjQGO7LRJPEsQpNF8hkgqaFtw\nRZVsdSJHOJWL2yaA89icBgUs95lL6Ab9b18FLx9fJSybXXnMoSotZ1Utl9l/\nfkZwYJaauNFTgnL54NvKoVw4XNH9x0avUnZeEP9w+V7ODd2VTO4FRIxW2Z2w\namNDxlsftcntoEmxe4qJnJ0CNNH2su8P8/pfpqjWJgg1Z9CoMMM+ApYq+aMw\nKAh4cx4P2PWFFq37i2DKI6B2IJHf0Ec22Ptio4s+tLrV609ch1I5ELD7NRE2\ngxy1hRPTclyspGOS/LKinDS4gJkqA4y9/a3bMIN3XB8IGl/A/vj1oGOQZJUY\nbdKn\r\n=tR+N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGnuHKtZaef5BnA6mEmVQN+Gv2jJJFsl03Bss4xAH9MWAiBLOj2YOTuPkl39UvDQLtDlko+c995bQBJYeaLFaUaTXg=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.1-nightly.20201009_1602228244865_0.8514131242968594"},"_hasShrinkwrap":false},"0.33.1-nightly.20201010":{"name":"brs","version":"0.33.1-nightly.20201010","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.1-nightly.20201010","dist":{"shasum":"399d8fe102275fa2e1177eabd4bcadac36199ba3","integrity":"sha512-XlSkY4CaXxSOSOPPPLlC43ZXTsX3ZWsC/NNBZWKwecHEG0w/uqn7//k158bqyQoO+topz6br767zs1+swgYsMg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.1-nightly.20201010.tgz","fileCount":204,"unpackedSize":1274915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgWGHCRA9TVsSAnZWagAAiyoP+gIM/gtFrACega0nQiJu\ntafDzsI348iV7LzwfJfgSib0nU1KDMVgFZmBtQvW8WsTU+0Ra+b/K4el0IYk\ndeLRGSNN+9eipO9tVGEeUVFnf+Bdgb//utu5vuoBWb/4zw1NSJF6SA5LuqJN\n6ifwTd4Y6V61vA9lik5uQ5A6iW/x1HisXc3CN78lEa7WqlcFqz2Kns4nwHcP\nF9uwn00T128A/iF0MfWlef2OJG4baZ+IeT07xvNi2gIDXJyTSgYv/jOfUg6t\nFwJz3cjJDTuTxlSBulf6gmLzYKAOtXG09xrtypFHJkVp6CDr0VflNC0Sm/iG\nSrLK6jsn6uAsQWVbG8UpTzfI6MEDG5cp+8PodGbQylY5Undmf4Due+SWUCO8\nY4BCioybnkaeDKf9rpLdk5nQShOwYr16giRFUzTRNyDBKn93G8SMDHfgyRF6\n33+UJ/nE0GZJZZtIC9gKbSe3aFEJL3xwmCx9Sw+P+LtMI+XqADKNRF+ZjfXp\nUyjDAb3xaYMYmOflGjhRzIY0bhOcrkqL1feqtm+y0jh8VnY36seUYYCHNTGu\nMW/qx7e/AAXlnxLAL9gUYxVTZ+WRNuvJEd2XHzY8kooJ1zYzXlr6d9DULDdr\n/ausuiG3HSqhYEJAL/XtTFaGOZF0Vj00UfdsokTx08x8dyNQJGTStv3n6vjM\nWkyp\r\n=Q2fY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAsrWVpzIfzjRRED58SBFuYY40bdEXTvfelhh9NlGyuEAiEAhBI/KEZVFvNSuDrRUN80M21m1k+EeYODhYq6qI7mkG8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.1-nightly.20201010_1602314630827_0.7246824943049113"},"_hasShrinkwrap":false},"0.33.1-nightly.20201011":{"name":"brs","version":"0.33.1-nightly.20201011","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.1-nightly.20201011","dist":{"shasum":"deb830898dd58b575111378c479f559819cef1e9","integrity":"sha512-p3buDZ/mEnFPIMxUXL+T8opx8LMkyIYIx9yZl9sxKu/NYaftCIeZIHK6C1kQWxITP5KxCs8r75UZqV45kh/UiA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.1-nightly.20201011.tgz","fileCount":204,"unpackedSize":1274915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgrMUCRA9TVsSAnZWagAAGBkP/0ohy9pymaWlw+uyrUSM\n3QFdvGRKnummSZeTy+zSCA6S4BUCMxMWk6jqUw/IjCjWBFH0/ObdgIPiQA91\nDex3qk+h3GgpbNmVX0YwL4qqm+bRr4QEoI1JctWUmYFHBTnfKbKXnkBcKqeX\nC/SAZ6LsqCrMzRZ3lC5J+ebs/TxGsLbpGjALqOi+1cr9pPu/a2NF8QYS+lL+\ngdCFjJh7H3LKM2s8CQqjB92ako72vfTCMYQ/uEkY7MMSVVvru4/N1BOprtYQ\nJloL3JPwtIqYkgoqe6xzjCcisOeVjvN9XC1rF0xq3l0xP306rihYKhYmUVxP\n+FMHxTL4THKL7ChERFO73XQvqkMHvj9hS6i5hwCTU37jFU6H7uFJTUmLNx1d\nJn4jNbD6woFYwlDb80Hug+NmsDrPA5x1y6+9CllaYb8BLyDdgEZFCgXawvxc\n60D+mQb3fD42Q9kQurh2+M/hXcBooapv+T8ZgSUawuQ7zqk1sx1TXjQMcBUo\njzHhebZrtUlcCYl3CvXgR9Uol5QxNYOJ0TeQt35wAhMd2krEltThnNwBAMUT\nIZXqepIdLyrY8S/4VmkwaDWf2SEMQk4CogrUtmRi4UiOYsu8IzDnCKXHBz/F\nnZ1LAipaw9Xs1JEdNLCzQRvpo8zNCR9AFvRfAxnVVAy0HK7NK4zF86QH/RAB\npRmP\r\n=d+j0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGnN2R+mfMmHMsyzVKg/z7idWyx+r2+NJyfcxThVMXbOAiEA6qvMTFQuA190LXecWdjof6EKOM0BceXnEqdK988wQNU="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.1-nightly.20201011_1602401043878_0.7450203592858082"},"_hasShrinkwrap":false},"0.33.1-nightly.20201012":{"name":"brs","version":"0.33.1-nightly.20201012","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.1-nightly.20201012","dist":{"shasum":"d103cac15405b88217503ce64c2b4a55ed95445d","integrity":"sha512-nwXw1YOfGUTt6boscV5p0wmH634wC11+hzd+Q6Kk+mXquG9lh9UBzWz9R0woVs+QuhnsCpYrhmHWArVamCXWxg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.1-nightly.20201012.tgz","fileCount":204,"unpackedSize":1274915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhASlCRA9TVsSAnZWagAASzcP/R+s9mVQZLZZGJRp5Cpm\nMLhCXDPnTKgKg0tgYwSOviOc7d0byk8iskfYDtrA5hWmqBV+/ix7EwEgmtSD\nYKdHADexT8M3MBHIZ9IA8EIWMlKQfeMc5o0jK8fC2vE0dNvyAaNrMlJyAgqa\n0zV+Q2QKnk/jwwf7iJbAZr8tSnyMrHPUDGmkLKcj/JZPluOdiTnaHs+nTm/q\ni3SI4EDAIgTtB1Q+M12UV1hPN2GDmEwi9EDVcCqiSiicuKwHui5cPA5D6TGX\nnuxOy9DRjQa6JufpKRD+7UesuapC1vHIzYUVEFAiwHWTZOCieV99MLKufSfd\nOgb+LcUmC1FzlG2tra4QMA0fnJpqa0wLQHw2MUrSO5nvIl3J9Oa9Dwz7RKct\nzQ4SWdDuJMRnKBxvdgRBuWgvdhFNR+GcXZkV3E1QsKf/ROQOBQyqcJgE4bYw\nO4QBzQn3aTPgmdcC4pmL3cI41mObb06IzvBLOMV1HO1ZPeXSf9UR/Qmc05rt\nomF+o8x7iOOId63dsOKuQ9xJ3ooEW31uhvdANoRlz/sO+1O7co4t20P6/ZK6\n9/EvT+SZTfaGoVegDWmvgVS0C5t+09sRxoMOLZin8oBOOTLBW/v6gb0KH7y7\nB9FJR0GbQ/QjZlk32HNU+wLg9hJZ/yURBBCzTPiSzo7Zj+OIxgpxyeICRZmi\ngxl+\r\n=DSAx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFLmRG4ab2SFdeyTrdK8uauhmH5VzjL3MPukvgR4nLZXAiAqfiZUQu2OEo9pMLRzYpFCbpTZ7DFUkPQ6YnHQJA/Hcw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.1-nightly.20201012_1602487460582_0.7862481104234864"},"_hasShrinkwrap":false},"0.33.1-nightly.20201013":{"name":"brs","version":"0.33.1-nightly.20201013","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.1-nightly.20201013","dist":{"shasum":"9f1d6292e3a3b5dcfbce6bbf2158b618dfe2773b","integrity":"sha512-v55JOKHFRCkIG1+t9E7cteUuCdsm9yXV5kvpUuyyLqObwFUUsaflrma1KbNTv2fu03bfAYyqfAeqXd0mdxDgEg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.1-nightly.20201013.tgz","fileCount":204,"unpackedSize":1274915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhVY4CRA9TVsSAnZWagAAMs4P/2442k177gBasktJxb1l\nTVlDsNctXbZ0c3lflCcko3N0Y9lv/J2DtZckgR7lVaBe/4f6UtHJSwtra8jF\njIQn/+HTW+tp/Bf/ghJU1oVL0iBGkPn+QG/1wVe6Etp7B1fXfNW6btZ66AUs\nnGav/LadvpCG+gUU2xwBMTFyHspsDVADGlocw8LIDl0bm8/oyvWhwuGAN2AK\nGIjsB1El/z49+6bWcFq1/VppKZ0C/rnDMGNPRXEELvsD98xLvmeA0ld4Txsc\nXGnEN0RDTvsV2NaEY7WfdwZ6rDtNCA0KsX52VZaIYtKBWNEaAb7HeDndZwIt\nJOuDlL6QRBRFJHbliNqB2zYlyBUZrbUJ6Tu3GjS0b/goBZPPHll2qA1kdUV2\nmRdZar40A48hZLDISfVHoeyYXJseouU7buRyEX/eSIGcVQEmbYWaTa05WIRp\nB93bbU9jZndAjG7/ahLrQgOvoWr44VoyUDn0opjgid1E6vOAfAJsRtVpqMHb\n+WTFt6/GnC5wq8/Bf93bKA9Zcp447HXUx4l7pKLkH/Sz5nW12N4Bl+iAcjXY\nssrFBvDLENm/7bKab5VueenCKs9mrNIqiwETkrMRvjqkXFNksyKvI9934EPz\n+pK3hv00EEsz8wzdVd/HKAnFon5qq14I6aD61ZNCCc5fh6Id5WrvZUaVXGXP\nHeKJ\r\n=f9MI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEJSVb7jEtjARBa9MjFjiCkX1CzWpAJuR+VqGoEJl7a4AiACMi28QYYl3QIZUbz3dnZEo/YxLqkpmRmsAXlmtdmPLA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.1-nightly.20201013_1602573880145_0.2812827743566435"},"_hasShrinkwrap":false},"0.33.1-nightly.20201014":{"name":"brs","version":"0.33.1-nightly.20201014","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.1-nightly.20201014","dist":{"shasum":"38bdc79f8d4173927218201094e84a30ca4e8c46","integrity":"sha512-rPKSYLTx4BUMTFii+ujlXrhwk2xFGauXvYzCUBegNlD0WlFO+jQ8muw5IUAfiYykxNjqolL4eYXuHJGH/cJe6Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.1-nightly.20201014.tgz","fileCount":204,"unpackedSize":1274915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhqf2CRA9TVsSAnZWagAAMIQP/R+psQ/khSKY4sSU6dfL\nQg50UEqTYkxHE7yrf4EDamQXJBVGDHKNhgFsbM0VmdB8IC6mocPbUopEKoOy\n/QfpOfcHnEeaowBZemL4951bf/Gf+ksXO5lAQpqGUsueVhfamgtC/nkDLvGn\ncyCd/QlK6teuUxW/6sS4tUPwkL7r3CrlA8Pkzf85WuiWm+0ed1DT747AtwSr\ntj29v/+wgruQuuJbooVVt1cnEU6T/77VHj/3wWRcdXBmw1RLgl0rQX8jhejv\nfWW9RuAmHq2sCLZ8Tx91S2mBqNunlUqh18xzjdoXL0w22//IX5Ky71RikKCS\ni9i9TA4FXL97JQBM6JqnFN3XjVewIXH2IC4gYNNxczBXj73VE09/5iXyUdgK\nRTDQOu7Ue6zcVwtxFn5QXI6iyCK4k5HfYZnA5fOUPJrsXMv5pmsCK2HMF68+\n9MuR9bEl0hz7SldChi1/u0XaAtb6bfYp5zW2V+0Jfwyc22BMK6b8apPYy1ok\n0MtgeBfxTRUdrAio4nUC6LhZpCW++/4x4SdIfQn+HhIP1lA/srv3Pa+2L1OC\n8JtwcsH59I68OHK/IDcNkgE7NFoyhANCaxc7EKgpgKKLjHQjxKjbhuEsqKgb\ny/PWHg//hiO7wIRSyOL+GaY8JiQOw8BST0RDA8fcTS0imksCpaIwwRENvkqA\nWzG2\r\n=mJSe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCj6095P04TMRoIzwMVska4YYTCpR7R+Gd5cHlw56TF4gIgR82srO2/tyFVOotGm0H8rEwlRfblSajyRKJH0Pmpu5U="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.1-nightly.20201014_1602660341818_0.36707099243543695"},"_hasShrinkwrap":false},"0.33.1-nightly.20201015":{"name":"brs","version":"0.33.1-nightly.20201015","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.1-nightly.20201015","dist":{"shasum":"16993dce43011c7d603ea6a7308a24be20ed85ae","integrity":"sha512-I5iziGqWmPS2m75hlNs6q97RvVUNzgjO+Aj0DGy9Cb8Qc9DaXglS1Pua0VrEEGVjPr3z4aWfixzpYk/IFuCqpg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.1-nightly.20201015.tgz","fileCount":204,"unpackedSize":1274915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfh/lOCRA9TVsSAnZWagAA678QAJImgCnkVU4q5NKsdhcw\nssNkS9zlfh+thgGkQ56wbV6PtMzzgSIes5vZprip0zxaY7Ne6q9J/H8L18FF\nMbgMEwz/TTQIdiRCMRuSbRGZrmbHPiVLiBh6t8oEIM7zvCurOoxSGEHgEdcI\nxTA2GDKGOkWhxEEdMz7/Lw/DCJYmJgGe0mc7GJEDAFkxFA4JfrGHX7/cJkMS\nDnV8l9SmTASdQTLpmWkFPfYfaTfJXtUHR6ykfIa3QaNDqvqT2rT6UoEoybDL\n9iFU8iheNa3xwrGl3ToREQxUw1XjKYjMUlFlULF+AVOI8xPXhwOnuOWyrjwE\navzl7auvDMLvNUKCoO75yKhKoiDJdTV/3+EmpFyoexp3YRP3yNLtRqGOet0z\n4Of0SM2F3XFZ7KP3V9S9YfELrohWcQ2oJ05rBkbBXlpW9yIG6JrBFyIDAg8I\nwbR6ZiIdGEOMnG+uDlc5XxGSXkCOfr590/7hq8wXpwlFfR77zrqLLQJ4wJ1v\nY8CBlC9HzGFt6kJguozRsWuKwhEwFVx1W7ygll5cid5Jxmd1H82PcpvWSkAX\nvbByOuFUHJrZuNSzfZw3voPofg7oLMg5sssAjtAPWhCEkKXOdbzNt2M9gL0I\nK51x/jvEqs+k/ANyjup7QyShovb5MtcOMW3ELatGnorq6lAWSZyIlAiyGNnY\ndEck\r\n=aLfX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGXrgXjjGM/bNrLMgHCtCRAzw3OtQ+nmYr3/rH5LyqTnAiAboAux9K02jHdZ0HZtUlQcPr1b5Oo+UPuW0MtCfdyuZA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.1-nightly.20201015_1602746701467_0.2518526276705306"},"_hasShrinkwrap":false},"0.33.1-nightly.20201016":{"name":"brs","version":"0.33.1-nightly.20201016","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.1-nightly.20201016","dist":{"shasum":"62291402646d5c2eea3c503b3485e12b2609bac2","integrity":"sha512-7vUBcZTe83HOTs2DdB61c3sPy7FHF23f8g64CJojoyPXgHuuT8A8xgiTUW8DzioMAIV9797Ym4nUeb58FacqPQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.1-nightly.20201016.tgz","fileCount":204,"unpackedSize":1274915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiUrACRA9TVsSAnZWagAAxDQP/3FmmpO5RTWnSTfzFl3a\nwt9/jPEBdefijfSYdeedKtxJlI7y+qocOo+5Gmdd+kVEPRS4oY7t7/1RGjw3\n9KC5AfmEnJSJGMKCg2atzHjt46eWRJ/E5w3/+m6QGFHvmqcX9jC3c9MaV/Xb\nJx3bMbFICuIW59DZakYH/fp4/fZGZpd/qKlzKfbRx5sqbwCUEQlt/NgpEIb0\nrmF1PR4gyYU0ompDBYfMA7Nota3v1zqKvtjzZ2pAX+qt+nDPmKQNCQtwanpi\nZBrfyOp4H1ZSvvRDR0y0KrNPaaIFcBowNrnHq8hV5bWnzuGSElxW9uh4oF0Z\n+v7w3EkIfZcPpx9sCvH5JZYURag1l50Ux1eq0JXmnM/w7lLPWqOJ62CjEMFt\nym3qyYRVhv1nFBzRy/9bL+8nsS17jpggI6hle3xOFaC8/C/XrBuF7k8g3THZ\n7lx7RI9/nQzxe0Tg5gwID0w8qLuALAgOVii6HgewkA5R9PdgcoRdQwJf01In\nUHGedEm0H5FmNdt55VfYkWWYa+HnzkHoJjFRh4Y/x8mFUOsgcqzzZjbTOsvq\ndYbtXbiYclYf+5Ex4aDWHqAcGgzih8TCTLBjHW455OW6rL+V64H/7nz3QRV1\n4ZY+EQq1gjvWFO3FKRKYkPIm0en0uJIK5wfwdKOgM2WZ/wJaJpNbuGjPK5FW\ncbMW\r\n=Pmy4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDe+ZQ7cBM6Qok2axsikARY+2lz80XZ6NcjhoWOXexOpwIhAOupN/mrKzi2Any8bx5ozsbzuKXEu445mhkgMToyGBkb"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.1-nightly.20201016_1602833088133_0.9115286127475539"},"_hasShrinkwrap":false},"0.33.1-nightly.20201017":{"name":"brs","version":"0.33.1-nightly.20201017","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.1-nightly.20201017","dist":{"shasum":"b5fca7c5afa57f6b388e0867bc3def1d28197155","integrity":"sha512-Rh8rb+Dmr9Q4YREUyOfR35o+6tvxPwMYI2bTWnqVz6Q5UgYBMKlh/8APftPaLDgKF4Mv932r1Tz6pUEzPMtR1A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.1-nightly.20201017.tgz","fileCount":204,"unpackedSize":1274915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfipw+CRA9TVsSAnZWagAAcA0QAIcwLjigEAQHlswemQZS\nJn++1BzvP+nOO2DOkf6SvSn+CNsSmziUlF2e3MRnm/jFRJvUXar0L+fr40zu\n5d6OQjl/hVg7dckgxkrlqk+rUwF5pnaje+3payhFvYUUjsrL9fOlpNeCAe7G\nWgsYWEWTy3a+k2pawCffWIzf1ljUE2MyQu7j29vHWxVxj5oiIU2/fLEpFxYs\nTkkPulmSudahcUTUKs1GP+WxVhldph4BDpfEP9FvmdKYPhQJmN7keuvucS0h\nzLnkgTFclTaYYDgOPGqySn6Rmxmq+SaxFJtVNM0ueNN9iDV6ezW7n9JcZtE3\nRyqThwX9tj6hE2EtnaOyq2kTy2KfJkELgnlMGClIoFjX4hP9Bu8qBN5BIHzG\nO5wCaUvrQI9gZUv/1/kfuQOs1x/g/GvqWvHpepuv0Ed/q4y5MfJb9Uh95cQb\nKb/1xUi7P5p3rQcrvI0W4LLo6v7TPXP+mpUtlN7A7BY+XdgJGGThxJHOwjmc\nG7wmbMH1Rx4hEdgMOeOp0VIEM/WfbIzOVtxermBg51UbhyHw/MA0hPpY8JQQ\npvP6QDc7D1BxlUbB/LYk97zPNCFdqqRNYje+pYTdIpfVMR5L3ytoFmQyze3P\nKwLstxOea/UE8YjSgmLo8IgtpByUMnvoTzPwAsUeAGet8fAOK/zHHUaGtKGe\nqSqK\r\n=T8uy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICS6tlpAXBRxm2Tr185yJGdCCoDNYa6mKBUIg8TTOterAiAnhjdkWhKUNl/9XS8YYsGEM5Lsvc673uncNgVmKJjOfQ=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.1-nightly.20201017_1602919485383_0.2099826972246046"},"_hasShrinkwrap":false},"0.33.1-nightly.20201018":{"name":"brs","version":"0.33.1-nightly.20201018","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.1-nightly.20201018","dist":{"shasum":"70421c2fd41402844813b640fc06f0a41a8f2736","integrity":"sha512-33RJr0JcmUHNdV0U06fiKpNHsm2acbFdSrdqCfudQL0twGeLBQrBa/Wln2NnAz2D3rk4PYX1mmv2C5aXuDyxLA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.1-nightly.20201018.tgz","fileCount":204,"unpackedSize":1274915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfi+3iCRA9TVsSAnZWagAA4tUP/28V/3GEt0E+B1d68M3z\nrYXPNy93sU9s3/TPGgqI9IoJ6FROsSoQOSTOIeFP+jXSGc8YD/vtIrMn2PAB\nZHDG0Oc/vCbj1P447aV6aIcOkXAFeLwJ+p27R1w+N0rEqBJ+NdP5WYzsqQI3\nYU/Vh5VAjFnbT7eTEuebjCJt9NqOaXj4vIriV7wAtxwvd4tkV7vV+n40vDCV\nRcdqP52lC5P6sO2DOVo2FJAo/3oDLucg7jb/kVNCGhTUBwung4g8rf7iq5c3\nB7aQUArn1zBnUotXIll9TysPkgJvH2GgaGXNNQFd9P1FRK89s+mwU1gcWxd3\nUhMFzmJXcYb/ZiOFzmHqmWmwO57/jMidcM9oBEi4bo7Tb1f15XwRud5EqsJN\ng2jz7XGGNsIMvYaWLAn2NSAi7u4EoluexxK+QbAKrZOiKMIkA7wlyIWVgzK4\nB28A3pM/h6rZeMk+ZrA3Tj0HULGzXiRVfnWuYkZbwO1OXGN2giZNp9X6tyW2\n4cewmfezg2Vz20BaO1MZnhUIPxMS/8zFlVndLf8QDh0VuwxMAuqyLUfQD/6s\nL8uJihO8ZiwAcuBQKImKcK3CCiAA0gKxpclw5uvTwlECmMk/v33rOiD/zl54\n3Lv5xA4EyHbuIOsLu4/D6cwkbAWMUj6tWVKg7jBXfIk8DNU/WrFOpvDRW/kV\nlrMh\r\n=qfnJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAakXyQoqBLwWN3HNznNxIrlgJXrI3srii+WIkUnjROAIhAL0O1cYVH5GqJOV0bYHV4hjM6wvde2cNRgDRI+ZMfgPJ"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.1-nightly.20201018_1603005921911_0.779904950224042"},"_hasShrinkwrap":false},"0.33.1-nightly.20201019":{"name":"brs","version":"0.33.1-nightly.20201019","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.33.1-nightly.20201019","dist":{"shasum":"6e7027c305d7684e14cc6532fda6a5052dccf7f6","integrity":"sha512-axbC9xSqT1dRaXs58PM8ajkpsfTYxheAZqDGCe2nJfDmUHi8TNsLXf9/cQDHIUvEZzKMhP0PKvw30zkwEBLHjg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.33.1-nightly.20201019.tgz","fileCount":204,"unpackedSize":1274915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjUBsCRA9TVsSAnZWagAASlAP/2OvajP86YMFwpdR0Ui3\nvQ8zSjL7PVuKTU4YgxCPpMf4H4PwYo44AXBhRvFkIYhuF5kRWb6XnVqf8wfr\n4hf84Cz1ZRX2xujnuBYAh7szK5FlZuctZtj9i0Wv0/Ck2sfjh+BHD519Qo9A\nx7hqCHb91pmun/i11zqWxC3h+Gh/Gm8K30c8vWgwq+TzV8XXI/zkTKtbwOho\n2L91NNBPj1oJXjDGNW59meZ/tGYt8HMbNZ+pS/YlUvWJPG1uwjGxQaIuoeG2\n5puYgFOt/c+X9vrYtGEiHSWRhW8llZeRBhDQKD4NGrJzI1YGq03Y8Hkee0fj\nfQyGEyodGb0IDbBA1Dz2+0+QekukRU9WIMos7Z5GYwOO4El4r5241hexW5oT\n5l0iYHIq5+R8oosWygISYztoQwB2I6W7z6A+qdpxPTmLxPVcNB6Vm7/hOco5\nW8vNhUnvt5Bg71XsCyg4fXjnoBk2V+qTb5jyxD/5CC2mfM2P+w8ChgxjwapB\nIezCQZYLlcdxzO0t8HK0kcs9bnnx0RSOUE4lL9VyelA3QtYSOGidvfEG5KYB\n6CtdIeiutNysfn8tmsSbdj/DIdG0G1LeBDiM3EndxVmZY5RqpLAQBINtbbKi\nD7fVdI56C+hUPxN9nPBLAbwp0YvgPiQ1T92PWhzTNPpfObiefERAcgN6OFhi\nOPf1\r\n=MLUk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTUSiZm/UwShd7n/LqG5mqki4qz7sSegyLy9d4yWTxOQIhAL8qPHOnVpVfeKU09rOgFVGd+/Z6vTjyCHEntHmK0oah"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.33.1-nightly.20201019_1603092587578_0.02040222642860101"},"_hasShrinkwrap":false},"0.34.0":{"name":"brs","version":"0.34.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.34.0","dist":{"shasum":"9c6e2371be72ece2c6f72fed4ebe074e3e8d297f","integrity":"sha512-45tpEcNGZMcRPxsm1J0KLxfF4a33iVjl+71lhEsHK0nf1zJkIvySqPgvwchipvV07YBnXGKgUjn3qpJqjsgYHg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.34.0.tgz","fileCount":204,"unpackedSize":1280486,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjg0LCRA9TVsSAnZWagAA3a4P/2QA3CF2Q3X/CVAYS/LZ\n3vHjIQZvixM7hOzuwI7m5v6PQGXw+x9+2KYsTerWz9dNQxPqahH6sSASVywM\nAcxLgalq9wzHcsdZJT510FhY7qjV14YZ1gysaMA6AzfmrXImCiBuZ6ZwID8v\nmomaFuc4TMHjk6fb/jRnBxnoZ1oaS1b7Gl1gUJ1V54sx1jxKpfnCnnifctPp\n9Xj7LmwJqJcLuU41JI7bCiYVVohnc/ZYtGjDO+s1NBXzQKtO0nr9dLVJ37aL\ngel5kDbK+Fkavic1n4JFmc2/tq4BhvngQCau6nDTQntevVwNq4L9lvO+3BqJ\n3iDjrNgvRX65FweLqimHTJXb4xXEM53GIY5twKXAH5pHYHW3i4hEiV7P33QF\nFuRbRslkfbUgv0VdJn72ONKtQ7qVHrpyPRwWJPDxnpsjdt+x6YAJg2/gKX1j\nzKf0xCfYOffupMtbjTsbUBiJIZo5FpQvUHpg07ZakotQu3DFFE60n3Hdrtub\nxsyyj1OsYAymyyS7lddvH9r2xiWWnQDKOPFoh4RqTT00N/78O/lFD7rUjTgQ\n/oPDQrLYISP5HWAavLOTG51dwSTN1M300Ydb1uYfzjpg/Kt+vGFp707fv1aI\n23LpoyyaPZOmC0hSbVBXyZfGkm8TswKaUr4PZ8yGDZ2WgDCe5kBUBg4KCh+M\ngIhc\r\n=VZLF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYIJ+nKw+erM4tgBDJVj3nlsXkmleB1BYpPJtgGku4VQIhAM8TGTNWpPp01JzAK0/VD1E4ye33ECl2Zalcns+K4jnf"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.34.0_1603144970726_0.3367701223431292"},"_hasShrinkwrap":false},"0.34.0-nightly.20201020":{"name":"brs","version":"0.34.0-nightly.20201020","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.34.0-nightly.20201020","dist":{"shasum":"123b4db92558ceb09531120781fafa7f4379daa1","integrity":"sha512-bs13XoVjgmD2SOCT7k6JyegL2bfdkHk/c/C5cj0CgT3UQSZ7E9QiQVFnHwXI6xohKyuYo/mJ4T/RZ2Fdmz4xMw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.34.0-nightly.20201020.tgz","fileCount":204,"unpackedSize":1280503,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjpD4CRA9TVsSAnZWagAAZD0P+gPzvGqs91wjeHoCGutj\nG2M8iUh4JVnPBk+YG/eMqIXxs0OrOvKym1HpXFXYOTrM2L2ERGyqFz12oXPr\nXOqlzxa34h5WCnO1AxTYxao+P5xPgOT7GU6T1BKZLq9e4CnCVjuUbqte8k8a\nM+RdAq1WRhvvax9QWk2g7qwwxi9m02rvkuE54hGVq4PMJuGcYYY5Ml+3dqce\nXtabQrHu31zKyWhgZ6whYxA141mEp4Ss2h/vS08Ov0QKHPuZQejQLnaqVVIs\nYEuW/pFc8RkyULfjcGdCpoH8fz3zS+9MRNvwuMfVRwm8MbzQD86qmRguUu5F\n7mksGSTtocvOVIUxYwKuEzORWME3itv91AKh0WemzMNvwuQ2fipW22D30WFN\n+H1rQlWP9GuQ+y1WI+09PJh7q5A5djXDsVhSfs4LGaptjHXHI4XgR5Dq9uvz\nn7OQsmCU6j89NM3sE1l+DTQg+SZ1D1xIClaKkJmrxsKG/sm5qu9CyaYkUSXG\nCIb+TnF8rsUzUhpR4UI/oNtLaTO/duZ6heuSINpDaHawBFjSdacpAqNkO2Bv\njDVWi27JVEtiHZSK66KZwagbPQ3LFjLwU+35HIjLfXLTBQaKPmoLiEerPPXr\ndRGVtbc6U1QssENh+3FzPq9BVLh3cuV8E5ahdXUEdV73lI0dUnjuJX8v8w/M\nKo26\r\n=fQnE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICNns0wNFX5BGPF2drxZLAKskdaQJoAy8KxC3Me6HX2HAiBUb+n8omcShI4mWIfta1bZW4Du6+a1xpISBzUC9Zk5BA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.34.0-nightly.20201020_1603178744321_0.5260786146173941"},"_hasShrinkwrap":false},"0.34.0-nightly.20201021":{"name":"brs","version":"0.34.0-nightly.20201021","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.34.0-nightly.20201021","dist":{"shasum":"2670ad9e24f91e39336eb6af4a72088a24feb02c","integrity":"sha512-OYKiuLVJv8++hj/kUuXjE7JpObfsAtuih0ez4JTT0MSwfd5yonpoNUtv4ZDddjfYjdv/usr22NJeisy+EB/bOw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.34.0-nightly.20201021.tgz","fileCount":204,"unpackedSize":1280503,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfj+LBCRA9TVsSAnZWagAAsFYQAJ9R1lwesoI3zpG9X9x2\nS8wf5sGDtKHV96/qXQigXclCg+i2IcyAjB26dzjg4KFdpGAipCJT28f9pede\nBDMw+XQP84qy2pz879ifKdMfVtWvJDs5XSkcwKsZwMeLy/qlAVvUFDM0HIoq\nGH/EA+1OzWnHeHJCerLzZb5dsQxQyXnPLVjeuo0o9w1E1G2VR9d63vGdhLHc\nwsfqOFqkKtg5sULusMnLKCRZEPpzSikXfIJBg0/axAW5tWBZF2LB7BsEBTpW\nYIZWILp/xe92A45HZx1RjvdPdBdqh5VN9V8FQTOBqv3VkpuXCzabV8EZyWHW\nyw/8FnH++aLgD96FzFI/GyJWfjPu1USCKrGsM75M4z9lFtYIRIMW+85P1lWa\nBfC75qhY0TfssQQLet41cvj6F78chgY0ZY/fbc0O0JZesR5AEISgWhAZ+zJ3\n5Q+NYxHU0NZhSZPHyeMPjgNNTcTd0ZwwI31xkdEZAm8PjKlZ/+8uL3BjH1ZF\n6HvLIhxJPlZmPZs6f9SyCWWgdhGk3cb5ci21r62V2ancb6tr2y3w+qx/276W\nIdtBX2wjSIDbDyvWjyvr3tt1dEIjArm+KOutvNAaW6F4P99AfC5dRvdDkQ08\nWvwWIVMWoR5PxKQlMw6PDAlIy8Q2xgPBd7+QmRnJgVEv6UOofTJIfXJLz6jb\nFWqi\r\n=zF1y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBWceiQ3mUbr75sgn2fgrtJy1YFguBe47VL5z0lDUahPAiAma6GxRqyqocahnOZLttTMgU/NecTvH7PI5j573DzSVw=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.34.0-nightly.20201021_1603265217022_0.4530552068532041"},"_hasShrinkwrap":false},"0.34.0-nightly.20201022":{"name":"brs","version":"0.34.0-nightly.20201022","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.34.0-nightly.20201022","dist":{"shasum":"0527c9632faf323293bea07ccff3c7a6a2316381","integrity":"sha512-DWuDJm87i14j6dg76YKoZulBFeuGzOM2V09fHBrRYxBMj6cLBdIyJJNh8v1FZkkTrMyShpu/ib+68FAKCOlTpw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.34.0-nightly.20201022.tgz","fileCount":204,"unpackedSize":1280503,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkTQaCRA9TVsSAnZWagAAMfEP/iOfYyskwIbZE1dmTpZB\n6KMcUDaXVUPKfbcyLYktHBOiFKUWL2IPzUWKoHrjVPcnPmxoFMkqnCFrQYuJ\nZZVLATsmX66yTOqzP1tylj0vv41zckZ1YAuIycpwOfByYH3FZ8C45fz8vnV8\n7XU/umoo6i3b7/EJDFlG8duCNZVGMGeHVT7Tx+dayD+uRt0GWex4Q5IXY9tp\no4WhmWWJj7OCBDzlVgRMVeCdEH1MFb1VbeG9COC743Alt44IM3I8xYIRWPPj\nkdYHe6XwbWHkPKZocd5TK+c2pzXCcaIiLcRm+/zFV47VDXc/313u/6kDeL5x\nnTMD8p+tkTD4z52lRlBO5F6P77r7hNRjb8CcZNHuemvsVtjak3+YsdMpVDVv\nHmyiw+/J0DluV3xhtuENvq+9RCYkgYZ8kfGzrmRkF3zXTUU4b4fBXtlWfEV3\nCfVxO5q3t1CJGbNrOLkKJRryivRCbidRNjDSzpQzFXpWg8XKR5rzmI1ydj8+\nUwGGqquj0GJ2qDvfnGgW1zcsgdRvBmF5IPI2Kv6CKYyQYPpI+dq0yPeaEH5O\nM8OZAjpd7pubS+88L3CpxMMh7ua05M436YLo/8V8BMw8/iN/3LuvzeRtgqLX\niBltMjOCUjHao14oFAE97ID0RNE63fkkc06LTf8HdbIVzX5FIMdbuUd8Jhvt\npk/D\r\n=07QX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBka8mKeEDkh274bVoltTm8aIIggH29rTAhkYxmjMkEfAiA7VeStqXRvH7/KB9hNEOwLYcoYasDe0UdhbolA5vZZ9w=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.34.0-nightly.20201022_1603351577929_0.5604609347207075"},"_hasShrinkwrap":false},"0.35.0-nightly.20201022":{"name":"brs","version":"0.35.0-nightly.20201022","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.35.0-nightly.20201022","dist":{"shasum":"82e0e7d83a4db43e1ec104e53ee515c912c0f806","integrity":"sha512-sBHg1WkAVZk6Zgy5BuafvZFjkXth9HZpgc7P78NGUp9dq0/hP8cspj9oi21YwDPJzrb57tV6X2Eys/pFvzJmmw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.35.0-nightly.20201022.tgz","fileCount":204,"unpackedSize":1281852,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkfVECRA9TVsSAnZWagAAEvIP/RTsU1a7HSlwfcd2MbDG\nxnpt1AWUJNWtX+H6SzZ/Ybdr1we08ts7pdoz3M8UHkAJYtI9KXy1iZpz8MX4\nyIgziX/WKMfltyeEMgLgMqLDoQ7X+sxvEe/+j5A71P2yxCvcq3hF8DK4bGcr\nOdMoONMNjFasrzS5sbCSLZkjvkjcisbu2W/orHWWITl304YOfskeoGuHVVh9\ncaQ1AgRvJYmaAv6gUagXeY4MRLXcpD4LMbMfBrg+uM8Bf0N1pMtT4ksupazI\nleOgk/K9oZyfJprxEmL3/cZ62EfubX25EicR9o7vekPR7p/T3Z32KFKOvYS3\nfLTMIwV0Su3lCF0XTd+KuOQruelLjmlnkjUnlcBe4zsphQaQPe7M+53Oen8U\n3EKjQyNqNBTc367s+/Wxd5vIuPRDn5iad1dOMFVL28q0Bch7AtYSMBzhvfb2\nZo2HR/3Oakz7NxKkE/+py8vNkpo0CPFL79Lfp0E5qo9bk7ci9LNbw/bxCWnZ\nxNA1FuUHPEet1AV+XBSDb40TJ1WMH/yNKjejW+44aaqgW05R799mHq3ioFPi\nzZ5HshghIkJeEfvj57Sl2AyKvw10m4gjHa2GT747IeccNX+fbnpp9DujVG6C\n3BoEshXtIgrv5iCSq/O0o9dlsFhBdXktuPOlsjuYnqQXJlZZEz2tK7O6fdRj\nGGnx\r\n=Tv9V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC52NKlkL6FvgwEGsnnVbMbJx1hY3H4FQ7K7utcJfCg7QIgMpvWMBvWMPTooaop/VUhCR9iVObzXJrKAHTfISrw+oQ="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"lkipke","email":"kipkelevi23@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.35.0-nightly.20201022_1603401027642_0.4158588382231425"},"_hasShrinkwrap":false},"0.35.0":{"name":"brs","version":"0.35.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.35.0","dist":{"shasum":"defa965d23195c4eb8071e64e83446ee209edb8f","integrity":"sha512-5X8WVoZjrm+Im58oAsqTMfs9yx4+wXUxiAdMmYxFTk9CmKZ+0Zgn/463f4VOs5vPglVFnS1kYficQnKQC2ZtKw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.35.0.tgz","fileCount":204,"unpackedSize":1281835,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkfV2CRA9TVsSAnZWagAAejoP/jMQx84t22qUKJMAIdSm\nwKxtlJpLHEtp8I/tZE6ma/p+mPna/4HSGw8R55ie2pV6OrIHNrxRiloeEkpN\n/XibsLJvzWKPAI3FJMyEEnTh/XUVXjF1fftnpwrOwSn0FYP8adFDMc4+Xky7\nlyWfN2x5jVGgGeyIEZfrjKiyWLQPI8zL04lZASWodrCHwGLY0DXo9r0YKysA\n7+xigZfGfbABqHluYGsOEtkmqsRLK10kvdqb4IIBS1Wsi2JpoVQ2PCITgwvu\n4HHJD8HLII7rsnkCBzgnxNgw7CO37LzFDVNTVRFI6kDSXjKuQP6TEt3SyBM1\nr0rkqVUCx2TIeXN3gboLbOZzGFphwaRsvMDDNuuGwibTWAL1LtraF7kZ7r7Z\niwRqW+LML1tR/h7SQ9JXvQTAm+cvtlIe0JDS6PuSuyDy0aUPVzJ0ppRfXBUi\nC2R7etZbMczeKGFZMza78rIXJochkon7l7u8D2ZUE+Z5dRJyGaNw5LFk1XiQ\nkzjw0Tp4TGWVBpRPp9fcH2mXNmo42exVzJxLGGt1gmAgPgH7bS6iczz+RZR1\n7DX8qjA4MMcUdQ1I++6LiynuIn7ulk9aeiqZaSuDHZL/Ane8FPQVdm65RXAj\neVN0Z+Ebmssn2Quaa0ebsVJFwvU0N+N1w0MubV1+Y2xTQngDvOIPH6842eXh\ntWy0\r\n=8rhm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWVbTWtkx3U2llZB7X6H3bBaTw926a3PLk33lge/qvSAIgYGfsjRD5uEqjN2p8mXIMrdyX61pS1ZPKZWSot5h8xzo="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.35.0_1603401077776_0.5894420466327044"},"_hasShrinkwrap":false},"0.35.0-nightly.20201023":{"name":"brs","version":"0.35.0-nightly.20201023","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.35.0-nightly.20201023","dist":{"shasum":"1eb888e3f5c5d935f3ddf5d8a636177baee091b2","integrity":"sha512-TtDYezOZzDp3RSq9ncv8ibhyS2l7pepYZd02r2Tjq9E7YYiiXaqRccsNWsOVEwb42O7iPpfhm3LEjPfmfW8OMA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.35.0-nightly.20201023.tgz","fileCount":204,"unpackedSize":1281852,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkoWsCRA9TVsSAnZWagAAbQIP/2sKV/umvCwWMV+B6Ap+\nHKN4QO9BZ2yuh7uh64fpUiFG5QEokY+BZjQHpZIhNnaX4wJB1DuIP6yLFmSI\nQ6Dx0Bx0uiu2fW/Tc8ymGZkLtLYBWAbom/HlOYHEs6BSz/Rbf8KqNNTsjIKI\n+izYBmqeheIxZlgkaX5cvXlLcvVX2JdO4IlkM6tngKE9bs5eq4lNhA+ZSEFg\nf1FvNP5UgJyDbGySN5cOeKhYDhSiTF7CSE5yM16gskFGTXR6gXhOqfDtFHLj\nFjDzxoAt8/xF3FwSQV0YnqgTKoYOpc5sn9Y/YSptqrNPLEuumwKep1E5EWS2\nldeajxP/iaJo5JMnMF+U5ipItce3d909YTUFUvFhP4y7WftQ5u8m6pM6T/Ck\nbnEUYaUFdtot8LU+LhvNfmIAMP5UZ5HBFwjBkdDcBzHAlaGQ5Uvj/xOgtHnx\nv9jxHgnLRcsPHTE0sFKY7tbD2GOYAqDS1RwMoc+6p8GGWTWE7/jzQBVvWLPe\nBtT/Eoed92BrDjw++U4JwFFAwege2vsutDoqjCgj87RgSaOG5MNMhV1Rls2N\no/HUMhcrEhNGYztKupPkP2UpbzfdQXcHTy29gViW8wpiFYSTPGKzMDX5H5iL\nlRLt77X4enHQuAR19q3y2rHbYXYVc4O3pgPH3oJmP331mood/siu5MOUDrGk\n+HJz\r\n=4yXj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD0Gaw3djuWJUnqG7kIwNxtAa64O7jPaqbXM3rDmt1rlgIhANpg4srXmLbiaIkjf6bvFpVATiDAF9XT7AcJCQEvSmK2"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.35.0-nightly.20201023_1603437995486_0.5708187660662862"},"_hasShrinkwrap":false},"0.35.0-nightly.20201024":{"name":"brs","version":"0.35.0-nightly.20201024","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.35.0-nightly.20201024","dist":{"shasum":"46666d47a468874b0298577eb903627470a24aa0","integrity":"sha512-h6xj44mhff89l/B0RB8hbhib6c+fPtdayYdotKJo2bEnw18Up6kefQ8CvS3Do+9T3scfYl1hfttIecuWubEMhg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.35.0-nightly.20201024.tgz","fileCount":204,"unpackedSize":1281852,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfk9cUCRA9TVsSAnZWagAALk4QAIjq83b1kx5f7KybJyyx\naWIbUumkFQ72V2fOs0Mit68A7DFezs7mqa6/7iEMh/MKZk04GeejtIp+/F+2\nbW9pZy/qlZz/6wgBO7ICiSHxOa/SBtR/y5XkaTmkdsBC6/YJ7KLXHAHtmSPB\n9GjJYSMR4Rr2wddG/aifOG61aDseCF0sZMHsoBnhNW5ETIHH+teDdOBw+6eH\n8XejzVnuoFZ5qSOm7oqbgY+vmy4gV0R2TnJkz4l3LVqY+C3SiodrEszywZMu\nlfu3OSV47vMEcyRdmfTdp3xQv1ut/DBUfOfr4B14wIYCduozqgjQIvYPpwdp\nNUxLJV4YAgt6l8At6CMC6Ll4PZ3ndCgU78/AyXVOiPe0QSZCW0uCokAFv/TT\n44BG26Tjusj8kV7+qJie+HRbx/6Z4BRg+lel0L42rMoeBIdd0x5VtSgNgxCz\nOE8rIy2o4BZQPcygg+q3R86029ioOlXWTiDjKnqogWqtWQvgTyuqGOahpfYy\n1oF7Pi/hrDYM+GJa8BUHRRaQmAPoO9X3MfJhTTnroW3TjXXYxVCmcqxvE0W+\niazYxaQzVMeODG3u394EqLJD5Bx9EYWjSoxoDK+bME6xMy9JByODH0oI7apj\nITBpel1zizzLHqLqn4QuBI4g6wUEaX8e5WX1Kn3a9B4aiCmqsp66HgT3TaoO\nQmdp\r\n=u0jI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG5AZvqtNlgfqhGqbWHVIcVD/+8h3I1aOtD08Q4oDxHXAiBU/HTZo7pC1Mjk1IUfR3X5KleTluh9N9SGGilm4D4juA=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.35.0-nightly.20201024_1603524371687_0.6520378451313242"},"_hasShrinkwrap":false},"0.35.0-nightly.20201025":{"name":"brs","version":"0.35.0-nightly.20201025","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.35.0-nightly.20201025","dist":{"shasum":"894738d042febe90e8cea01f53aae6c59f7e05d6","integrity":"sha512-V+gKd9qzDmpNzLOUF4pd6pezOR/33iZhNuyZPdKzEBOxrfW3kw+9U6DoYkoQBcMUzAcASKKFFpV+rIgCfuBZoA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.35.0-nightly.20201025.tgz","fileCount":204,"unpackedSize":1281852,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflSjACRA9TVsSAnZWagAAxT4P/2wv/eD8L/MhtPozDqT/\nVkSvIA4J6nc9TeAu5AgEXG6btYEiszixbPz0I/6T1YY+0W+BTkL9o6D3ZnVX\nsIDc5KP4LnWqgk+F3Oh2y7Fv9IeDng54TIhGU/NY9hYJUbzIXyobvcfzda0e\nzt1d9L6GfjjhLKHWYFrrPzUtT0DNnMG9II1pJhQAi+W9WjDC86aIZXOEESSZ\nuph5NeWUglg+cAbyzgfqQ1s7a4qkiT1CyKyQaAt4LWNuU7/ZU/ejngiApUaP\nthjskC9WMXW9277mBXNTkejPapf0TMkvaHQBwmg0HB3zvY3nZBJZx+/7EL0u\nd56N267drtG3SfoDqaDX+yDyJo+gdMqoxmg72CC9xJclmpSR4LkDru5JgcZY\nK/SrAP0BEWNXWSNROiybbwwiH0ncOYe18OgYWirbVi+wfG42SX9aTRNhyJm/\nS1P/6hRyhfi6f7FHw01J8CnLbvz8HLaFKBJyatFdijdl46wtc+3asUveF4jG\nU3SS7x1/0ALqpEz5BQXSqiT4BuNn7WD5ID6GADT9bjYhmiwdLk6ZAYV0YK3G\n3usvsghcHkSBmCtTb8ObF8vqaTTr5QwArKnsUu3njTXBN4WcS3D1nWqxbYpI\nPa/mptEtSUuEQ+RklWUNOsma3pW7CkMqQ5tUyBGroEN+l83jIfSYAaoO7n1S\n16PB\r\n=c5kA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCvxNLZUnVO4HhkOlt8nkIAUIbdegDnprMEY9T2PwkwHQIgYLdGZ2dTf71EjbCKeJ4MqmzBb1LHK85r3Fi6GPXYhYM="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.35.0-nightly.20201025_1603610815416_0.8355685429048232"},"_hasShrinkwrap":false},"0.35.0-nightly.20201026":{"name":"brs","version":"0.35.0-nightly.20201026","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.35.0-nightly.20201026","dist":{"shasum":"c084b8084a1df9529e38d324eaae6f82e16056e9","integrity":"sha512-u12rmWW9gQ01WPe9kr5M88yVkMShEWhfrIkw1pp52Cndmk/bjimjrknIXcpPnSmVYAueHJhN8/tLU3mQ1E2olw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.35.0-nightly.20201026.tgz","fileCount":204,"unpackedSize":1281852,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflnplCRA9TVsSAnZWagAAe0kP/1xK3DCek+vsV0kW4wKn\naxfHN3lJfxyWQ9uu2tSZ5Rb1iaONDP/1q784ZmVQPYePjVIyI1IOzM5CUvPU\nZMVlZxIPDCsvRECbZZjA+yytxdzNbQzVn4fSmXzqdm77oY5tG2J4dPZthYkf\n9vnj1Y3XwYUkNUNtIR39NiskzYnIE0yHh9MtWU30XXFB+Q7wrTERtVF+ERFu\nuGi4QAtkRXovI3TXXpwpXIS6eOmA+wDjhrFaAmqvI7pRth2XbVGFrQwwo9Jm\nyK6eKbl8UKdobDoMn9RNTJX85RM74QqhoHWDrSTeP8VW92UKkyG4oGUsScUd\nURMnh6WpGRb2QRnDkW2UK9S3MY/GSCc80KKrEY898CiL9Z/0RvLexa0i0uSv\neVmuZzUcP19GAaTlco6V12YETsr9q4o0GzF8Vp0rSj9p4/nWuVGC2lVchByM\nD5bHC+tIaZiPmmgjbIqxkk0nbIU/Pwo1qX4v+9spPm2DCmOdXn3P8Xse036Z\nBfhL8R92x7xR+0HaEceyKpZLJWqsZYEeu1sBN7SiccuLA4RtXA3K8cOMWGoJ\nlB2ch7I3zhjBwYzfg3z0b28fosYrDCysCTb7E1M9rnUcOqgkUroXoSIKpzZQ\nMc8JIK/qsCckWpFFrHMA8IaKq257SKT3YXKBpLm3xmZ60JLAf56WZxKOv12V\n/j08\r\n=7dQs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDaB2PLpYNl9uU9Sqeu+FXk/T1/RLviJrbrXptFoWHPmwIhAKqDWlJivMMmdrBTcNWyZ33XdVM4Rck6d/2rAz6Avt0M"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.35.0-nightly.20201026_1603697252390_0.1089888895427038"},"_hasShrinkwrap":false},"0.35.0-nightly.20201027":{"name":"brs","version":"0.35.0-nightly.20201027","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.35.0-nightly.20201027","dist":{"shasum":"5dbbca736dff40849465bab9aa2cca51e64b4fca","integrity":"sha512-dMuWVPGkfJvfylLIJ8TkBGqId8kfZEh5swfXbA2evlxNGdLrzstL2jFRtBGcRveh4X7kMPO72i65ocJ3/42f9A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.35.0-nightly.20201027.tgz","fileCount":204,"unpackedSize":1281852,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfl8wECRA9TVsSAnZWagAAj68P/26J3UroKZZyUKvIhFnt\n7WyWoP2OVuNwZJXsWmYp1XXgLbVvZHvvvTu3G0mRtoxVgiw0dOmmr7MwuuPt\nG+SWWfNmwoR8DRJgis9lg3yBVjaHNDpYdUqL+lfDtGpOQqsE6a81Zw6lEQjR\nG5W6LXzJE9rkIUO4cUmv/QqmAUSuveTHg77DpHVlJC08FtO+lwXzk0tFmASX\n7vm68YNnJYPBAdXiTUlusB2BJwy6xt9+DwYW8aMfv1IkK6TOYUI0BD1tEPWz\nqbDy0Rn246zmCoPGUcGAFQEVlloAhSnEUnAoAgbHM/zB4Y9r5quUgujMggV7\n8sqKQZJ4vBu5tdmGC5JYUdCF6rxS7o/FB8/uaNjEuih6zWuUWph5HF3W7Rkh\nAQZFMow6pDB3v3p1GdNPFPCGqTpHKqAfsAcuRawZWIpLBqqiIt8MYXz6pRmW\n8Lz0iNqRM1gmeUbOWyFMytyKDbnS2whgHq12/OBcOBDGuzb+VghvWPjFkUAC\nV6CdU5Ij97XwmAeHLO3gAz33q7yeerRrk4bz1v/+fLVCpeJxRM82cq7Jad8W\nni+Clo+zDlSpRwlsPoeqP9SNWSl8j+OdwnPJtT15Jsh63jT56TvEzImFEEg0\n7LrVxkPFS16Xr1tCspVt7AX6ivYLN/BjBwGLSsOAzbh819qbSiHLtqINhNQO\n6txQ\r\n=QsAZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBqnNtwKLzrlXVIudDgLiUc7oxeWpHZB9IYcON5c0sFrAiEAj36xOitjRQ3HonY1KLzs+Sljdskg663Cj9J0llqHRTM="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.35.0-nightly.20201027_1603783683910_0.5294053793380065"},"_hasShrinkwrap":false},"0.36.0":{"name":"brs","version":"0.36.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.36.0","dist":{"shasum":"e7c8fa758077bc0596f63067980e600ef5d6d847","integrity":"sha512-Url+IktHgI4Rs0XDSnR4fNs2Jwx5aYOpBYpzmB/XemwiQrxmqHY2KIyFg+MPDG0c5XqdvT0Jx/ex0wCXj1ywLQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.36.0.tgz","fileCount":204,"unpackedSize":1289167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmKUMCRA9TVsSAnZWagAAyl4P/R7+9JOXGVD3f0Pdp9gf\n5lyI25DcEV00GxZg68RZ4N/312teRfoDLWZ+t3qyPQacDd/sdtUlNpwtP33g\ngVaahDSHYaAPlN/LUJ1eN6R2viF+mbJlPSrwVYgmzrSYY0lR4ypvafbeNjtb\ni8mqcPLBpPd7LxoUePtmGM3UbvLAfERLbBD8jPh8L28U4uVMHnOuYJfUzzuM\nxSO4t6cYClYSzplCG/JHvKO27QBadc7ntb8PLzaM79d+DpJV5yTik92nmqBM\nuCx65zyl0uc8s/9f7ogDZAfS3X3D/PC2EQAfmRFqTM+b5PIk5+GtwwxE4a8O\nn7PZRUXgI38yZxYUDxUPHGZMx2Uyl5iTxfngiN+oc1dc2OeTpsfNZCJxgE6v\nVj2PUvDs7VXbnTuik76de+Mtsswoy+wNmQpHtthGTq6ICbIrG/lLIVCnrN55\nDyUSzdHTSOhmQgHshj6AzET1xQ9fFZVhtSCfKibNNFeYlu16Zn56xQ2IenV0\nSCcSWTtP2KBXVL3WiGd39hG8YVURHkTSxSSyHOfIJ6bX+mrpoRin1eM24+zP\n4lipGGAP/ErHF90Z6qErEJDG6pI/FJhRDWP6Yt7Vu2BmLxfExYToYHDETmt4\nlGzvWnpmxJgXbYQO+zYVx5kEO551yW7G7EKN8PWSaoU5jhnT8B96uiHBF1wG\n2Xsd\r\n=9uj0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0QQZkR5Jrx2K53P9aJ3muZJ8bZjaHepUq8tLpJnnPjwIhAK3yUhtM6/mHmnygGXSnz4sztYsbi54p4g8Fb6GDPvvR"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.36.0_1603839244109_0.9519283749009586"},"_hasShrinkwrap":false},"0.36.0-nightly.20201028":{"name":"brs","version":"0.36.0-nightly.20201028","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.36.0-nightly.20201028","dist":{"shasum":"14fb7cf1e3bb3ffb38a3d4c26fd8ba57485d5d47","integrity":"sha512-NdCbo3JpAKFhpIWi5fXzj+hLJxeIrdkviZwa23WAOj0B+1Lynt4II66qQi8OE2HCaWwyAlv9c/LpR/I9JdQmpQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.36.0-nightly.20201028.tgz","fileCount":204,"unpackedSize":1289184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmR3GCRA9TVsSAnZWagAAuh0P/iHDVxogJ+DumYlOi7uB\nePHqA42/JiUiD05lFzgXZjbH3MmxZZxu0ZrWCN79vGeXhxIAn7Fm7SjGhVkF\neJetlMgghX53EJZOBk86WLB2UZovrSKlA86iB+pDZDJCGD/Pw6722Y3ZItID\nTwbhcflgcdVxFMLNUZ0px3SnOE6KA3xvWl26xlsbKBbDRAr7yOoc05JsPtJe\n/My28i1bdhj4NM76iyh7nEGG5pbC9GKRh26gFKKu8qcKjXCTv/KP69/9TVyL\nEtDJTWrgJGRzCIp19eZXxl7rTILFf6qs+Ugarwi1hjwiqRg1Jx7kl5G25nrB\nE5+587+qmWZKbZsw0vJxPUde97lhUUHWLEf69567AX48U5VoxJM8KCzX8OTS\ncRZFpOHWRnNYiFQHI7+padxJjDyDwIHT76wZfmvN8uVoe+IgTYItPq1Jx9ze\nedrMXOVISSkjzAGArMaG9wc9x/vTIBzstomNpakHz+i2Az6mFgsyarRepp8H\nAhJ4okINMQfq8DR/NFgYl5zaqHnsQ4sI+2w/dFjiefsTAJ4XvtpCcpG+UPYK\nTyemQmdWFCpJI2Cr7j40gklOeVzZ7OzFRjQWisAHRi2YW9eW8+k9fS9YB9F4\n1dV2A3995VYTUy7f5QHd7WNb7A614SZSzjJW0kr7O7txNGh5P9UE7z4bxs9M\nHg3v\r\n=T8wr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDZBeQW12lq7gnmrR8JoHh+QE7rgeyc6lX/qweb28CT0AiEAinKpFVVlssQmVE48pqPC1SrBg+pl4Uo7EnEtYQ+zcb8="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.36.0-nightly.20201028_1603870149858_0.8895594999996927"},"_hasShrinkwrap":false},"0.36.0-nightly.20201029":{"name":"brs","version":"0.36.0-nightly.20201029","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.36.0-nightly.20201029","dist":{"shasum":"fba567d0951c19930a410cf380c922e20cce3315","integrity":"sha512-04sZuZMNT9HPjSDSZI/QGyxshDMimJHeWlCzjKHZT9C/RtTS93EAXKHPN94oNkVtKjrcQ44Qd2p8vTrEGM3ghw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.36.0-nightly.20201029.tgz","fileCount":204,"unpackedSize":1289184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmm8nCRA9TVsSAnZWagAACbIQAJEMcP49rTKCA3p1/jKN\n434uBP5lylb3NIo5HwDO5//NCsRYfQj4T+2baFbz+DF2l4K3+/LoWDbaIAkD\nxXwCHLlUatDJxonjD5iIw1cDRXY74e8yT1tytDQEjG6Bmjl0DJUzt0G7DQPz\nflV9jlraNxVUOyPN9j+HZCpZxR+xip4223cnRYFAaOxjHp2vP/ZcginE04oj\nY2X2UeTdvMKKDeUzg2zC/0qt/rKr0QPPX9Agrmtt3VlmuqZJbFU3X1YNiJ8P\nbJvKD0tSEFVL3EG4IFI8mR5H98MF3mX6RCXvTIVWa9828V2iZ3JPgLyLyhov\n7NRa3a0yR1NBXmXxfJt9Arq0A19KfGUkpBDxMtXItjcqRdNhKt5ENWMNyyRJ\ntXItQpyxXdaV17fKb21TSydLiPY6ViYmuE83z9y63zilGfBlrUsPOIRSQ6nc\nKmVwnBC56/kxfFgnido67AxGacJNTiGawx6YS3l5Ngg26xNCjvBdtLUPU6aJ\nUB5LFiZJxmeh3GFGn4LPrOXWw1erH1wibFrIslw3c9N+yuN6e5+GeKu91XEi\nEZ2K1ukh2AfJ1JWfEZU/lOL+yfpSCLcgjFBShAeYx90M9KNT9Y0u78ZQzSDq\n4Ox6ID5VFALY93Wt/CySoRAm0jFM7Cr0RSgTGOhM2XcSI2DATJI2qKel+sTv\nPTVV\r\n=aKeE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDU90EZmf/oPaiwQLlO44DNcMNAswMYODeCBEnA07lYNgIgYefbnEJ23JqZbQ2rQUbjZkywtSCpGvhGvkylPDnvNFA="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.36.0-nightly.20201029_1603956518625_0.6511901911725202"},"_hasShrinkwrap":false},"0.36.0-nightly.20201030":{"name":"brs","version":"0.36.0-nightly.20201030","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"]},"readmeFilename":"README.md","readme":"# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.36.0-nightly.20201030","dist":{"shasum":"cdd4dfd87938f2d7be9e03916d50404e3befc506","integrity":"sha512-/jh+lgOZUZF9B6zk4oYmqk3YqMd08yaXPq8Jjj/ltMH92+ZH1D+/Yp78Y8Oqs0J4euwJq3x8li3XpVUu7ToeEA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.36.0-nightly.20201030.tgz","fileCount":204,"unpackedSize":1289184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfm721CRA9TVsSAnZWagAA1IsP/1b48RATuWARBDZQyCwN\nA7gIXTBUcdSqIvqjbW/T7QQ997yekSKfPZ2L7AxU2QqQ/g4DdLOol71vr7C5\nA3Zl8+jNF67G+a7/TQn7f4EjdoaruSy/3xdkZeaZ1nvWX00iGXF3rODKiYMJ\nxCqTvfWtIEf8irNRGQ8vDaLRJEJAUuhMcHBqS6OBCLvZInhYaa399CmF1xeb\nRMx4RCw7jjnXTvY2RTxImJBpSm5kXCAqhZzdiyEMr5pS5/hG1qZFI0EDsiMH\nPHz7lrdwG5EPeIs7se+D7WWiqZZus0A4pC4eajp3GsUBZymry2gMJMnB8bpP\nlUG486MdmlSmRskCoUZuAQdPqt2ndjzBVAxdcNC983jrr0BU+/BOCWlR5F3f\n9X6dqfRqYl4+TQd+7PSX/o0Z0VVYQhpVom/bgZfPv70H61kV2tkv8oB6GTJu\ngmbAhz4inwqUGlwzXnbIikJkBKzOC2SZ9WPE+gKNcvPShI5GSHb96402C6V/\nlxc/7TVRNklwdc/Bs4EYAOqxGluDoArNst7qvHiGSZ27YwYirFHL7uTcZbid\nqewj+RMD3s65R/wTtGgdO3iJkbKs+K4XVdxGKQtNHZ+dHQR+RRO87t9ALuN+\nNavYSbv1J7UJsXlFhR2lYLyeSkIsdmWavueS+bAaHBCGi6M4rDaZt6j9uo/q\nGh+x\r\n=u6Fe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC70ful0ZpG1wQibMeVCRXPM1DW4LFZZJP2AlKO616T2AIhAP+HhGd8fOz29YFOmdxHvOR9T01Hhvm9rekC1B7kUTBf"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.36.0-nightly.20201030_1604042164986_0.7784848612993047"},"_hasShrinkwrap":false},"0.37.0-nightly.20201030":{"name":"brs","version":"0.37.0-nightly.20201030","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.37.0-nightly.20201030","dist":{"shasum":"fb74dee003ec70a88d3fe5e6cc711be80d362163","integrity":"sha512-Ra9MBZKfY3jBEFrPI9untL5q4p/vDgFE8aohgO4nVut7NeDzz9K5GS9kKUS3J8zK4KPwfq+m3tZO87rQYEDEig==","tarball":"https://registry.npmjs.org/brs/-/brs-0.37.0-nightly.20201030.tgz","fileCount":210,"unpackedSize":1303078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnFiCCRA9TVsSAnZWagAA9KgP/RXsE8ETozNK1oQp7tQ4\nJcr7Ckxr3wiA7DtkUY5ww2TZ6rIFxuiLAPQL/YmQTJNXuYyV8SAbsQlMnvro\noC6vufbRKzDUUtj3NpWgADtOZ2VBu79LYeB4+62AOuvyFETIdeaWF2EXebAZ\n8heOVOKfAbpp2MTvdUcGhGqgU9nBd84lFs7s0NIkaOf3WE+WyJEfHruJxlUt\nBVz/R5UpWLLDB8FXDVnmSGjb5SyoKiuAn2AUK7GqMWtqFP3vxq/c4By9MHwx\nEEhvkS/DlCJEH+61PIoLuHLBO4exeNJB8NFryMPMYAGLDPLHD7i/1dIbt08D\nnc2c2soONeeuYW4rL49Bf7eWdMDyYs3RsJKl0mNmWt+OZv+Z1IHCqQA8rDmX\niu4KoWi6xzl+qPPt02gFLbdT1KsttNsqDwBl7bfkod55H7uXBojuz6gt9isp\ntpOMzAEmVkjZqXoJHTjQfp0FyAN7FkTNCBii4anKKd61qnypuzpuJOOeXdYO\nZ4YjcM3p91SjkLXcWA5fst6lfi/Oqq1Sge5z30BIA7SRhU9c2VsRbKQxi9ym\nx5F5UnANbZ3Ar2S/SoHfNFer/10rkM9Jhjo28s1Xzp9vZBYV5t3BfYFLF73R\nbuOiGuueKbzsoyR/SVVdqVILC3UhoZxmdf5lZfQrgqdoEjF8bwAgnfbu8C6D\nahqd\r\n=Nirl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCiroY3niB5OfAzvYV3cjh9g9Apa14AGKb0gidR5SjZVQIhAOwdb85SnItkYGTyumJFne/qZBI2zEsVnYens8FdR5JR"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"lkipke","email":"kipkelevi23@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.37.0-nightly.20201030_1604081794223_0.02785384953492165"},"_hasShrinkwrap":false},"0.37.0":{"name":"brs","version":"0.37.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.37.0","dist":{"shasum":"f5b54c9c9890f5f96e8f85f23337134134d92de6","integrity":"sha512-oRCW+EIxrx/2YP1YPrWhqewtnL+7ghzfQ/gr0JBUu11WnCv8B/vNF+K6PKwa2desFzmVe70GjCWL749nUOjxDw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.37.0.tgz","fileCount":210,"unpackedSize":1303061,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnFiPCRA9TVsSAnZWagAAvL4QAJcHGAHRcDnO8Itrlyez\ntIdHj9anG+Hhmx4j3AYGp1aGKZBkqTJ0uO0psibvK9jpFXKpq8/4oyTjeg2U\nSGpQILubohmJZbnb1mpniE5+KHfjgcDWDm3w0QH+17AWG08MG6c5HFZ0Glee\nqOsCSqJ8q6I7fm9sk8oFTXrHT+/TLdwEHM4+i0qnFBhF8AmCYbGza5YpPKAn\nxkBeIA3Ei5+kj039cawKw+bznxBqHCqtRrIq6UuQmowAuqN/WEu3d77/CGVd\ny2cOMNTW0mMqGnuymCKeV8k720WRkAsg/YfCRd0Mornjut8Am+YYDg05LJql\nLSOecBJRf2ABJJ78LmcUiRnqPYD+bw1oWwf+wF1qx1V/4YVdzIwdDqgZFmWe\nrp4afzVnJsAkmFMpqDOZ6UIg0FLTpk3BNDLHOXkjfCalXuPqdDqLz+f1L+q9\nAOys63bvbndBJw7on1ApZnRw0vLNnRl5TuqZD3AbDbrYIz6pICoH2XnpYJQU\ncuEjhrJhpkelHkw4HnB5IloeaRQFd2Nk2oy1bKiwECsEsYxQooFWQrzq5Rx3\nCVtOZZZOQ+dIZY0iKRixVGSliyesPdm0fjNHa4MC6IcdmM22MJhVsMEpfQRP\n+XK/vLzNhfQQqpUHHU1WxhuAikvv75eCDs/U0pP0xizTBs0FUwnu9ZGBnpjU\ncfyZ\r\n=o+sA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqaKaqfyLwpIbQ+R3um94+VBTGT4p5nNeocRNwmvwOLQIgGTBU/MxHS4iomF+VcVsPYG078XJ/e7jte79DCOGEXOY="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.37.0_1604081806623_0.24675770796628815"},"_hasShrinkwrap":false},"0.37.0-nightly.20201031":{"name":"brs","version":"0.37.0-nightly.20201031","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.37.0-nightly.20201031","dist":{"shasum":"2a2a1175e1d3ea721784f8e9ce145f65f941777a","integrity":"sha512-Mw8E0YkfCz/UW3B0kWD0zGoHdxQmPdm0TnBCKeg1nIrinGB3iKrjIJNBD9YatYlMnOIb75tKvzGVB0mJCTHefw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.37.0-nightly.20201031.tgz","fileCount":210,"unpackedSize":1303078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnQ+aCRA9TVsSAnZWagAA2bwP/jLBw7oHrCHOKO8c9RiJ\nFK43fQy0E0qhEZnvLGbHWrYtIEUA4nZ2+cmHqRzmH0y8kpZnJkG6JcnsffIn\n6Aai88meVEKeR5Zxf81jm5140xX4wzX8FlRXmrahdW49BOK7nUB+2i6i1pd3\nOBNSTCRnCFf1JkLYFKOYRJrv5tQiDMgQPnmvXGk2pjqHrxuKfUg5gHiR33Wm\nGg6ZT6ZculiZ15orn4yeb/ltwrqo+TBeP+xOfVyGL+/aeODTdLp2RqhDahmy\neSi3i99M4Lj+rUbmoAbhE6cufN6HzsnDWce/xXQ2orrr0JFbWPvxya4jA3bf\nj17kY+o3glWjHVZQVQvMyp88meQHsZyuI36L6hYa81W6MsP8n9vpJgoNHaoR\nzPfnQI1l7C78F0jGdGYegF/gZ+jtLOSfWBrS2H94wZ23WTjQNcsOQIqDChqj\n9NfGVt1bhF6/qlVJJuIGJNSNGJ3lIb+JeVoZiGsOz0VqggCL2kJF1nciop1Z\ni6UcBY+ynRwHCjbBfrfdWPvIC4Y4gwiWmCBWAn6lG0ZLz0Lf2iG1p7rcovFn\nZ5ZgezMFcO0O4UlquG3UplDwqRYah/HqlWqaZgR7gl8baq1LM2lwr6LeE3mv\nJhhLznl8fCgSaPTlWIcaRuPryTJZexBCRa05hyZKsircjmGEWmVOcvV0Q2kZ\nFNws\r\n=bHeW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBtPXRcnvXH17Ntl/4wR+NqRtYOnot6iyj9yVSAw4JGeAiBuFlpuPwv5SZQPsbdJQ5Rj6KYLI3oT79WTOpQius8q3Q=="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.37.0-nightly.20201031_1604128665750_0.8998379437543511"},"_hasShrinkwrap":false},"0.37.0-nightly.20201101":{"name":"brs","version":"0.37.0-nightly.20201101","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.37.0-nightly.20201101","dist":{"shasum":"6b431cd4766326672f633cfa61fccffe85ae1b21","integrity":"sha512-KiOEXvKwPqzkGp3YhsZ/1YPeUY/20pqPLFZNlvYYb1BRFDjzcyEpsvp6t/ZSBOcPaa2KtjtlOmvWgm1zxAjnZg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.37.0-nightly.20201101.tgz","fileCount":210,"unpackedSize":1303078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnmGeCRA9TVsSAnZWagAALFsQAIuapQk/rydUlYpvHWEu\nbH+2xCzhE/mNOC3AsqYKTpe6q37ctZROmMXjWoBZl1vxe2xCH1Rw0VtTknh/\nANFBMTanvDFaCTHwjHrr8JEFkgmRUs48vzYs7QlUS2GWx/QcIhXDk0VhR4op\nV1H+i+6okpse9XJwXV/L7EJrffkZAylg/pruY8YLjosF3tTV+8xiYP8nVwx3\nYKVsjTE2tSm6QcftKaIIyjzlBn6gpWV46LYggMCcLSogv67Wxbu3q2rg+gZH\nc79gGvc3l4kRcREQqrMoE3v0KIxIJH2yNuytasGcIIEIJpB7MKLKPnw3Xsn/\nC8AziQmDvpQ0OyfEi7o4H6ocFFIgeT5jV8CPnIpPTMJlPN6qPuivNnTdDa5L\nyNV7SqRMmExwqfUEdOX3BrxZgCFXQmyhCWSulGFy0h/8KF3zjUx8eHpCSrEi\niNPH5UjM4Uk32CXCJ0AGc6Pci8vUyZ1C60XM1Cu45mgTgVAdZjHYy73pKuHI\n6nh1gUIbx1GicMsQiWq5PNa0OTu9fNR7jyDzJdqpjdxCpfbHzVR980LXAJnR\n+qEE7fPz4VAkRvBYDlr8+zDJWvqSC3qRTTs2/u0xIwdTtqA9R2j5B9Cl6hVa\n0vOIsrPpyScPO5qXaQqcVdwbtIQXGUfCpQU6wgHszWGiMxL/uQqpF9CpCPl8\nKPhO\r\n=sdB6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDX8TY5Jh4dqqGAHAs23aWLcWbZpkvK3GBUJyqD6EOGmwIhALLs9fZSDOppZ0AyalsfredV5sVQBIfzGsdI/oF9RQzK"}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.37.0-nightly.20201101_1604215197581_0.10401452212940931"},"_hasShrinkwrap":false},"0.37.0-nightly.20201102":{"name":"brs","version":"0.37.0-nightly.20201102","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.37.0-nightly.20201102","dist":{"shasum":"f5f796e50c4842cabec24a251789d98e9cfb6eea","integrity":"sha512-V+bufBq3uzflfbdclWhBY407B3/2sqfK1kmLleibvAt2w36e+SDp457VHYRruOOTrZ0cw2zLIHcwMbzC9cbNbw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.37.0-nightly.20201102.tgz","fileCount":210,"unpackedSize":1303078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfn7LUCRA9TVsSAnZWagAAaDQQAJFZU4UIGfcnR0iWq3ua\nx5ubndjzqvtBKcYcKqT+rZKFQal+kDxwOA+3U7uJj5Wct5nqCRPd19puIWKn\n0W9qVh58MToMBRyQBnuPZ4uhmO25+jooZZmB01Jfd/ZEedUTdIBZAVXqAuHr\nYOYaJWnFw+ZWfitimfd5Td7RAqLPpsB6Rzyal6WvBIEU/mlcOBlhoCAyx5Hu\n5WAI/QRz0r5pE0sVbrWCvNuL4IviRc5fhmYc8gFP5xtxzw1RJNrQ4OuaGsCV\n4Al0XJDORr/xtIK4tot66OQwEz9MD2sK9C/vSKkHEVqVI0uUKXdzHXplgNkU\nd+RgO/JGWtBTSaIceaaQjq4WOEphpoQsawE9K6qGOgcGSg+1ffXAnYhw9kM+\naxxjx0jiMueltFM8G6JF4QGgd9IrpdKKCIXGl1yLxLa8vh9pCsi93dj0y2Sp\nkyBmmmQ8TVkOsO/k8Pf5dIYOXlpFNhuf7alGPqxNsSwtIYmjCNxHoM+/reJV\np1+YKx1ZCwNOETx7oRfUUaAJZwB5eIBAwbcYqw4Fr286e50w/8CVu0PFtCJg\nFk/33T4h5Un9UHFCpdm3B7bxVps4VBxgJo9Xh+anRhwDtsqgXHQjcIbSgeuX\nz3LY8fZHHr6epqZ3Z53TnrRzf7ThxvcKFeL643mMltmXt5wfGokxd37ZDh5w\nC0bV\r\n=JnZF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCSexCnMLwvm9Yd1D6tmZ5Vqr03n13edj5cMEc9vYD95AIgeim7fwon1ye0qUgUC2Yq9+xrEEaGqzFckQPufLBHfQ0="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.37.0-nightly.20201102_1604301523542_0.772959124771154"},"_hasShrinkwrap":false},"0.37.0-nightly.20201103":{"name":"brs","version":"0.37.0-nightly.20201103","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.37.0-nightly.20201103","dist":{"shasum":"9ea770df0739ac90ed2610fa4278b2d8abec712c","integrity":"sha512-kv3j8djybliL4VRRIEt2fNYKO7/SABBpHTRWAZ6zdaMo+yjWHaa5WMyxPQlonlXmPH+epk/qcuP+Lw0rbA1vSQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.37.0-nightly.20201103.tgz","fileCount":210,"unpackedSize":1303078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfoQR2CRA9TVsSAnZWagAAL20P/03WxZM9ikCzIa46Pj9X\nw2DBQVZ2QdfEZvO1y0YkihBIrVRg64nHk1Dcj1nev4Up/cs7Ej7gv7D9vswy\nGOrvmrgUPhynMkDvhYHQlx6qebElB5+vndiMEr9ppKsUpgMDI4d+9XhrM/hL\nf5ky+MNcsi9esPbscTLBdUZoDswCXXWg3xfExgAXkpfyXLaEotNBcffj3T8R\nnENaZxIeshq5Gok9pBunFtzj+xeZMi+ANKTflkk3iE8DfB3HvBbDAG3TzVJT\nfTNJVG+SNHRCCFymRX+ls48dkf9LDUbHPwoW24hFZlDNgSVUL3v+6hm3QzAr\nfX1mF2WE7itDKkEEGVzBKyNx34Z1Gsku+qzq6Bd37FeqB9IRBe9V9UR581AH\nKFWQ0hhGf5oHOMwdmL1CxgF0NvStUO35y6OHq06SEGNERnqNlJz6x4gXmphm\n81v9acfy7MWLTLrKN+3kdqHCorCYx7DzIN7RbGsZXcP4MjrpP1wTvtYntxK1\nSRLROMJkUC4wtFS+VhwIE5UQbybobB0me+07r1+i2+E/HJMLTmArtR7+XKHG\nd92dWkY7/nQHS+wcj1PXJ7y+Y/bfQ5QcJs2hEoUwBNs9Yq39qUjHnW37/7qk\nu1nuUYeQi9jCUAnNl6YWoKHKngrAGUuBQZiPlsqRH3Jsvqiqo85iA71sd/hi\nYvxZ\r\n=XL82\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0l+FuBaISmUHnaAH6tAyFGpS6blIp1rIFaX8SMfmoUAIgKO9EEc2/wiT5VTmTyWLc/br5DqCTyQpToWeExzc7LVQ="}]},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.37.0-nightly.20201103_1604387957678_0.5097445053687679"},"_hasShrinkwrap":false},"0.37.0-nightly.20201104":{"name":"brs","version":"0.37.0-nightly.20201104","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.37.0-nightly.20201104","dist":{"shasum":"848cca1784bb27bd70d463313375c52b994b0c0f","integrity":"sha512-fsKiOMecbZCj25o90yeD0/RxiF8+3n7Uz6u7jXwlNUXr8VKY/noSs/d51rlgMkgEf14/mQXcicQ/YGJf675jmA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.37.0-nightly.20201104.tgz","fileCount":210,"unpackedSize":1303078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfolYqCRA9TVsSAnZWagAAaccP/jqgkuALVHQYGlyW1ZR3\noT3DVgSlArNM4b3e/rcExwDg0VUNh1r/Uf8rp+lP5yj5mQPB7MOlEJyJpJCx\nQAMuTdPMFLaGjDfJSaQu8J0u+ixtEpYCOY+ZzbkUGrDJU8ZqkE8YWMx00ZUa\nFXw5b9ynbQ9KVTYNh7Pv7IAb+SwDzSNZ5WyAqzS9IIQ+wW5WnIgrSScrKV6+\noDtJoy8oUWVGj2/pRlx9UnQCbuSDxjqMpO6UkYo/16VMqZ6OCCmRsiRAv124\no6Nx0KjxqkeaPaguM4C2uBVc7KlTVRoPSVRWrvTfGgJkJEj4HwrHjC/B3qLa\nXi3KeW9NZJR+VyBgcw3PNc9/EQRNsQo7SaCPfGUjg2e+qCQil21CMEK3WC4H\nyXfGfOwgg4yqCu7FkYYipQZiF0pBbKeeBNagjtzq61Ez7le1rdm8kApNGJ5O\niUGgpxgIRXrlR+Ix85wztzRZFVQLuuakAls/pXCdsCa9yA26FdGwV2+aHeaC\njkM2abEDFYgSPVLLM/m9TVbFRx1H/e5YV4Szq6mNRPmNPOMjb+6k12pUbcQJ\nR9lFjVWvUK0nLbpiW2/tK4fMqPCXeo9mWwTdjTy50+hHYJvi3+4wURpfe6tr\n1OQTkjRHTdEf2HtKqiFjxm6ctoXV5rdiTJpXUy89CyWTFJeo+kMmMNSvenvl\n3CYk\r\n=on1J\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDmglysVV4H+/ZlXTJt2sj6E0dfq0sz0e+LdciTCZr4pwIgIRC9S2920Hhc1UJnZEUZz58Hqy/c3FKJDMi6lqP/ee4="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.37.0-nightly.20201104_1604474410097_0.13123934069375265"},"_hasShrinkwrap":false},"0.37.0-nightly.20201105":{"name":"brs","version":"0.37.0-nightly.20201105","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.37.0-nightly.20201105","dist":{"shasum":"380dc0e61542e796a8c341271241d5b4676b3fe4","integrity":"sha512-LH0eRpUs0CKIIP3XgnS/+uhX2XbMo6cgxgn8qY8iJiSAR/U5502ggRxcJ8TCzbf5RaDSwrYdQyRQc3yJPyBj0w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.37.0-nightly.20201105.tgz","fileCount":210,"unpackedSize":1303078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfo6ebCRA9TVsSAnZWagAAKIEP/RSUn9WPdLe1BU5Vsz9J\n5T1MZnc8R/4ftYdkJZMQfFE8I3vmCbTeQys8TwdwcR1DReKoQl/2ei37noqn\nuXOzCFeU40wNeuucqxFj0KxDg0UqUnabz4YcUrM8k4ufxRb/zdhP3H/VW4mE\n5vlVDA58TQucfwibRJ+FBzP66KD0dPqgkuyUdQ2av6KT/rUPvna5+ylngZNO\n7hqg3NPqIJJgDkYPLdFEVedVSoW8rl79p/pOBumxZYWm0jl41OPM5UlNAvKp\nec/bIi0OAxf60tCbWXZijIxTtdgRI835L5rV6HLmeBpCKqGTj5vy3mYM7exA\nTWd6xdCcdcH3HEdW/KOCLg54y+GPR0HDZ8mKmG0QWtuN0l3AEuakkMePo+NF\nwyLuyTiq0uc4IhOIlmllE9cI1burGcbm2Qe5wgnu6fAAtPGXLQ6qXD70PRNg\nEd9qkUeTLbK6MGcaH4pnROnXIFbupyh9hNaZDHIEIDFDNLwP1iPzva9GMi6D\nA2u0t2aC73/kUENcKJzw83QXtQ0LF1hsJffzIvH+zmkYY7E0pNpYpaRc3L4b\nxCPdE+WmxOPH//M+Z3dskK9ZAUEgmKObDtUanlnOvDTT4oxgwfWWd//k2ZJ4\ncnI452XdOOw1g/ya5qsQGjRcc7gUgPcb0yk576i8gORBM+Y1gQ3XPtAOhgEQ\njbZ1\r\n=IsZC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8AGGoeu6B+Jn3ZByI7XvOwVTwiQ9g6j+uWnEnrKG4xgIgNkga2uQw16rID7Qga4dJOiKkzZcmdZv6stfJ/azcmDE="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.37.0-nightly.20201105_1604560794333_0.6381132549565849"},"_hasShrinkwrap":false},"0.37.0-nightly.20201106":{"name":"brs","version":"0.37.0-nightly.20201106","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.37.0-nightly.20201106","dist":{"shasum":"d9f0995eefbd7bfae2ae166dc99bd9e30d08e458","integrity":"sha512-G7IY/i6hkUXP+Pqn1YN8qrY8tYP1v5Twn0SgaQVQ2EGk8Q3DDerSMCISob+jPQGqZLNFJC8dQ/XX1PRxDNkcYA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.37.0-nightly.20201106.tgz","fileCount":210,"unpackedSize":1303078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpPkvCRA9TVsSAnZWagAAZswP/0l6E3QqBHuoO7Jncztq\n49Wf18h39iGEI4llv6i3+3cdplWjmNEmHnlwsbSh7eWvVv96XBQRhUHHJ9Ca\n4TEk1vWrZmSezbFNYVvKQLEcKPZxtQ78yWc3zVXh+dBG5LVTP23DB3RiFNec\nN7HS/QIU0F6eHmULCNo5Db//lSapbECxxKQ1jcvgX2Q43TaxW6CVMmBKdVEH\nDMqi/fEUs5oEgCiL05fQDXLWNxvD+RfmrD3xCj9YgwWKmtKjb7MuJAVqe7Ye\nDqfNbeY/J5ZiRGyoLCnW0AR3nqN+5LXoiIiN7uJPCd561Nj7kJJyWvRcFvWV\nZ6sXJWSn+oC++zmTWXF0I0ZJ0kdSFy5xAsERdVJXNWsiJ4BnrQcc7ii3Y1yv\nPBSwjLpDT4WtomTdVJTRjD9xwmdFJiWETlVhZ08xotW8OFoZoVyTgfXFtcmO\nqjn7LKSWWKMdCSJROR5hycPvSrC9gPUwlUoEsqEf3ZBR0t+e5RJ8Ujo2QNJJ\nyfcdg07LfSv/IzXKB9qVZ1Gb+9aaZfC4zIqP500xoR9y5qbt+kc4if8Umj+g\nJwVGeMbjKqSufPtz/L+jUP+7BKVNH/Qwk1vNv5yIwpoiRfJSSy/SFb9Q8FKS\nlBX0Bjo2R/3jeHYXRXmegs+yQpRt8OT0z2d8GJfBJPm45KlGZkEjJbFdS/U8\na1hC\r\n=9tWP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9/6iLhtAPFUggYce7lAhiUAULoIYxypSs/6lwR3iJigIgMFGfwkKCkcxvo3QLaupIcmrjS+7PQW8xY+qo1d20oO4="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.37.0-nightly.20201106_1604647214480_0.6583135178839341"},"_hasShrinkwrap":false},"0.37.0-nightly.20201107":{"name":"brs","version":"0.37.0-nightly.20201107","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.37.0-nightly.20201107","dist":{"shasum":"68db97950275ef5f08771262a250dad95f1be657","integrity":"sha512-W6f2/2V6/0/NY+2vTKk8mdFGnHObCbTRe7yghlRROP8PsCv322N8QD9BVmSpsWtJ7dOvJLm7WamCUdlgMPqWvA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.37.0-nightly.20201107.tgz","fileCount":210,"unpackedSize":1303078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpkrJCRA9TVsSAnZWagAAqoAP/ibPyDxEnbVmGFvqiJqF\n3YwPanKF7mpnbDW23uDM39fldb00vi9G+8kuWOKwunYIdyzPCC9hxdzd0XlW\nY0vPXEJdmb84yRcN7/burmv51WnWztnj5hjCQILHwgBdYlg//5rxCTC5R5/7\nV/oscyBBwDU/YcF6FmEx2fq6mlCVJSMj5UcqdHUs6wjJQt0xj7hOw8ia+XEx\n8s1cMCJWBU0sVWH+gkGdLAA6m4XYIPMmJtm3EUJeuYYmP2faZDeSdES2B572\ncJ5krepfpqaCxR5mDD34dxDXXVYR3GfrOJyTXkOfHk4ngSZUgA32YcByKqBW\nPjeMTlTqCKiahmVEIKNyBY5YzUwpV9flCPA6kdjYyJJPhiGTPgAhWy1Ekcse\nr4Hmdvps6yHDYoUz6MbyalUvVBO4H84g01ddS5PBGGpDkve7fOtZVw8rFAAp\n4+aUrTGTnsujFGQ7FdyOPL7xpMLQE+BtXTDjyJcQnlRioxup6A9gi/I0uFKX\nTPnr104/Bq7gEf776ch8JNcQHfrctocKZvMAtMZx6AscJ6AO3yelN++F3RtJ\naG9/w5KAAy+8ZHMI53mMJ9Szki7+TfB1iOwcvRvdafPfUA7x9WTvn49vn6m0\nB98V1orfDRPoNach2J5KCMHlWV+vCnTnU4MZcToM6yxaDv17Uw35S/P5d05/\nEJey\r\n=vUFi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDUDZBe+JXGBuNnb1EvpSvdrTYlr85NXRXkYz5v3DcVrAiBRNs5DLBllyD7588gm7klQwtk3//fEhfjur5sHPU/UEw=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.37.0-nightly.20201107_1604733640827_0.16500899852905615"},"_hasShrinkwrap":false},"0.37.0-nightly.20201108":{"name":"brs","version":"0.37.0-nightly.20201108","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.37.0-nightly.20201108","dist":{"shasum":"cb078a8d6c2c6b3a3abd8c4fb4b056069eb8a2bd","integrity":"sha512-6A7LuR5yo3d5bGlOTCSERVUZRAFkBnKspe+oJujNZsut/9I4l9HUTszJzAMlTJCuOPRjKvDGhg43OBnOcqRl/g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.37.0-nightly.20201108.tgz","fileCount":210,"unpackedSize":1303078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfp5xDCRA9TVsSAnZWagAAsIAQAIYBV5P536/QkXKlYla0\n90bHoEvBWSnX1s3l5Q601GzL03kVmN29/zFXe+/ZGn5ELHb5boPDCjtlhXa+\nrsmRzhhdbbZ5TBYyjpEKaDPJq0QMCrIMjh0aB1tuROqnp9wwm2tn/F2aowwV\n4PFrCr5dQXjcY/2bxB5mKHm6PvfjgUatWXSDTpG+q99M/uvCGMEVQg6BmHoJ\nePbiJBgVqk+f4A3VzykshJPnEpdJc4nkn0tWFp9nRVhkE/nuv2BrJlcIxTIC\nMAFOPLmp+VUVRlzr5kPp963kplMcKquz6J2VH/b7+eMHo2chIn/fz/Mwa70m\nyKTCMydw54Q5sJvnED5WJJ3L+ffxvxMZRAnNIwt6Lfm4ZUN8gumyAZoGwKNy\nI3U5nh43iWYT5h9nWv6EdrzkU2pkVH+YnN561jp13o/iewDv0ukgfrc/hrwk\naFkqOCTmTNYMbLV/zKCQNjNpHjlkSv4OOfiiI1kIQQ6eWQyNPAYN2JXsS6As\nfqSHMv3M8o0C6pp2PBaK06imrGYAjCwZypbEjTTWcMejgJQ2ZNMRjSJIlAJu\ngRb1oz7l7nvRWMSi0a2uc0AfyZMskcivuTbPqGTH0LiJUUAhRQqhRsGqwUsn\nthhDhMrx1/hIEg4aYFt5XYsRmr0iBnzzX32j3TLC4iHXPZAtYzcBngL9r/4N\n0nZE\r\n=Epyh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXjxcr9vjI2MIoMgB8zDYHe7tYOXSSYD5RK5RRBO0/AwIgZiurb6PIcePWxAjDfWKGuyTVro49ryGIAClXCvvSBC8="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.37.0-nightly.20201108_1604820034685_0.04539681880768276"},"_hasShrinkwrap":false},"0.37.0-nightly.20201109":{"name":"brs","version":"0.37.0-nightly.20201109","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.37.0-nightly.20201109","dist":{"shasum":"bcadbc48862af3cd0ce2af6d294f7997a50ff7eb","integrity":"sha512-/YCFAEwoGuGlGjom0o4I1nVDeG6MimVbNMIXSka0LPpxLW02eH8CbMlbIx9bQWn1mns5XMFybmoqZJLn0oo9aw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.37.0-nightly.20201109.tgz","fileCount":210,"unpackedSize":1303078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqO4HCRA9TVsSAnZWagAAvT8P/iVisL+0mHbkAMrcb/8f\nt/0dqZNVK5j4YzA+YiqYP51qwMupCaEsxoDftm78b/tCeClkeSFKg2kNl99x\nAQF/RNolWga/O4iWXubI5zaznxn3LOdJO13QBDUUiLKYZ3FE25I+Q7G1EDr1\nyYtlj78h2AU4JvY2PEK9WasXqNyKAVAroUp75JXz0XGDXHBjPN4Uqywsyqlx\nVohKp+WH1L+1VXXMA8hEVlqHjXaIQkmENNlCSqzYozg5RrtH0lfVDyRNCS4H\nmAfdjiARqclwlraWPZtLFsqj5xVtVBWaD/qR3SJ3STIgfLsxu/ShkB3ggGRz\nalTiGlYb4KtKvSqtlCr83z541wRESCkMb+82SyMSkrJdbGoMK5sP6tifqXwl\nlAIOiIbAAk11kkIu2sANX6blXsSbvu8skSUphLI6Co6d5og1euZhwlyUlcsM\n9ToEQIA4Zjq2MQpQpH/5jCZffgRNS/hT2wJvOjZiy1thTGj9PFN3nrdqjNqN\na8eSG3kg5b1QOVGGIWWieJSCnh5rlXjIyHQvDRihW92KyYW8kimoGxV8AOZO\n/FYtx8NXKvF5Y+GbpQBHRAdRveHtsamQkIN8Vb6AA0HjuZ6Dn9lPok6zk/Rr\nTL9jL13+GQ7GWdzO7GyNseQBcSOtDs/kCXogkRcSMdiMI+aNABe2wktWe48f\nhxZS\r\n=UYjy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG4t/z7TjygauKdlQ2rnvOHaS/NRvJzo0KipIw7p6ugrAiAMZCcPedNIhvRZnuk2UN06/uVU26cGgBi9eJNfpwnDWA=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.37.0-nightly.20201109_1604906503219_0.6692901083590872"},"_hasShrinkwrap":false},"0.37.0-nightly.20201110":{"name":"brs","version":"0.37.0-nightly.20201110","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.37.0-nightly.20201110","dist":{"shasum":"6831ed195e54156fab88959c0bc7fccd54e4a3f0","integrity":"sha512-hH+CA/J8kVfTl9plTvi2dm07dT5ZLowHLflgSb89I+hiWtM4bRqSm6217HGpSd/Ythwg0LHhj1gFEzya0Nkc7w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.37.0-nightly.20201110.tgz","fileCount":210,"unpackedSize":1303078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqj5fCRA9TVsSAnZWagAAuQkQAIOGCt707LRxjE2jc1lz\nfJK03sPNC6C6ImTSnwU6gHNcRkkxFd8YBPkn6qwnS9Vc6ZpnSf925nBWwisn\nNytWG6wrznvinwtfKk1Z43WLN40OcjmXquTdttpoIURzeXoMN3rwIZj34m0A\n5bLDkQSQjZ/zlONAAfifSV2eJf6vLdQn5Nca0UHVj/eGJnCma8igHZ8wdV1W\nZA1W5HNx+56Ibk6MmNZ4OtNfgBK8CsiEerBGpt3pYE0hLtmJH8dAI/gEgQGd\nymFgX9gAleSclyIBnXSpZbrPuY2bn00DkVOGT+xuA+hOjq6aRD53V5hQ7rsw\nFB1px/dMgcC/aqCyoOTkeo+SVFObSqv2hZ7pNhZVNxNO8rEkIVY1x/vavLQt\nUmYkrLqBh6cRfh0dmPF2E/obSmw7SvM9mtL+tI85TzUmQm7XbsmwssGQqxHX\nCj9AHJOCAQi/VsNoMyFiJKVBUqaBMOwnqIq1Df+12IA1TpFy9ren9sdxt/tw\nyj70fpOsnyjWpJ+DuX7/VbB+mK8dKd3qHKThBZDDNtlw7IBsD5lamlJkD6nM\nOTBKnqoyAv+qIRn7kuelkHALiGxhOJpCMyar0lnukETAztbaLqoJKqC2DaxX\n6Jn3MezoF/unaHnf5RExCi9k1f039hBTpK3cviOMnWCtKwKqeSEIrkQNjG3h\nXI3D\r\n=W7Ld\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICiUSaXmCbtUqM2AJgfVSjRonZixvbakldQ3ubkpZYXIAiAtAmw6u9HqwdQulhjM8y0hhAsoBQlZ9T3zE/LUP4oYOg=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.37.0-nightly.20201110_1604992607376_0.9650689389893179"},"_hasShrinkwrap":false},"0.37.0-nightly.20201111":{"name":"brs","version":"0.37.0-nightly.20201111","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.37.0-nightly.20201111","dist":{"shasum":"c38ab0253d0ec59e261abb4865af8c9606fb3a7f","integrity":"sha512-rCALdACiLg2otOx7LKfVw0pnX6DNmE5g7gz9G3aXNx+XgpER2Xc5m0u0Jhtpyo1FqaXoERIOgjFc65hiV6AGRQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.37.0-nightly.20201111.tgz","fileCount":210,"unpackedSize":1302646,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfq5BSCRA9TVsSAnZWagAAztkQAILz83bFSobwyHDHQpvg\nwz1thXg22Nt5yx+J+c58DUHWH1ZBkmdUfaIhp9wL0zbuP3ttKGYxv8wcgNQh\nEbLniNlM/Cu/Tr6qIhF51wgjHTMjG3DRsJNIfyBefRCMIjAaasLtkVJAR97U\ntrEVTQkFUWzE2tbubvOmnzi5lYag6153yALltrm5U1LgAMU1DbRJR0LqdvTQ\nEoIhNiEBF0p/rkWHVxGEowWpNueq8D9/RkrPcr9VzrWGprjGM3sOGAEWLiNU\nHbSIimU1alH7cKFr/OL1cR8PSIOM7LApqdh3jmw50eV51jtD8dfC+hXna5jh\nKjECgFDlf1m07CPPAXgwa2/1PZdk8RH7Pzc6Rgry8tgU4U2tu34hDh6bKFPb\n7Ch9/cmoThe4sEp7ce6Hz2+FId1Po29BE8rEUYlJqSBBcQn3+KtG7sFEL5+8\nl/kush72awo3w7/dI8z86+VEtP4hHzWtLmqaqeU6SQZfuCz0DhNYVK0SaEob\ng4FGUQemJmZQBrsWle/fek/4oVtwWzBTQNwoiy4bJZLc9XaUKXdYBcuddxDP\nbkQ0rF2j1w6Et5r9CY4mCbTVSEne+TqAqEMd2DXy420xk0WzZFjz10beP0br\njStrdGYq39CJlNrQbqiGsqhxrkXzVbUkEW21SaHVu4DwMhJp+LMz7u/bfyAB\n/VYO\r\n=AKCr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCc4X7zwQ+yfifu9Y63220rftZAUR2MFho8tiRb/AtnIwIgHxLlzDkfSuNsAFVCELbDzYtlBesqzLbaEdtwucVx8rc="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.37.0-nightly.20201111_1605079122125_0.25052018530302655"},"_hasShrinkwrap":false},"0.37.0-nightly.20201112":{"name":"brs","version":"0.37.0-nightly.20201112","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.37.0-nightly.20201112","dist":{"shasum":"bdef2537057b5917ea7ae4e73ab2f131f1855fe8","integrity":"sha512-CKIIMdeRMQyKYeUH/ObV8v5sgaqjOxRba6cmX8G6PW3CKUM/F5lJov5sEmaP9YhPav9HDoWnXI155rB9CKZj5w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.37.0-nightly.20201112.tgz","fileCount":210,"unpackedSize":1302646,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrOHECRA9TVsSAnZWagAA1NYP/j174YAIJNyYlm5PjD3g\nW72mfVqlu3gXPwXzKn3KZUbLX1KGKSeqPTonrdL61WVoNt1A1TvjpZ6ggMhg\nGN4OWYTGySMXF0qUwKeoUT93EROn6uTKuqKPF7XxHMqZXZa9fD/URSjdoLpR\nGmEYqMrANmWc6R6FaYmIo20eHAhIUrhCMWYMrnzOqTFphqJINGf8L1cYule3\nPpmrh+iatZZfP5XSSp27byZL7xx3NWXaV4PopUKrM8BLstYRdpDsrpDFRv1w\n0wsDqVnzrLeeHS51o9JGJ+bBlT7JtF3GtHp9VxBApWHAp+lSYQZWvE1TxILI\nxvndYiT/w2WIITbd4g4PPBUHT8+kQTnifrYr1PcXEZNUVPWGXLbBeOQjJ9y2\n+DBTlwoM7az2M2ppQoGRK3ZzuDZiZbsmGjw+TbiMwWD8Vepl8ja3Tmo7aS2F\nGp700ZwmPHqhGq69OuC47vaR6fCSyeNOGnzd7o2HwEZN/z23VXYx4kFirKJz\njn/75My7jL1giI9pHX907xkIjV7iPRkfnqN0Y8VKV80+TS0XqEi3c6DpMV/d\nX1QCob7UCFHXkEe0kEKezN4LUV1Rkf1HEKDcFEGHuCKoSM4aUXBiUBYwqk2j\nHwAQ/Aq2w2LVfuszzxbF2rtJMwbvAu9cmc0zd2cmEUVDk62sWfYZASVD8Tau\nwksU\r\n=EGoU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxatudhLtSUIL6tpIMfyuCBhOKmFeBTEN0Ye40BzUz2QIgPVLRizbIk2n5mxdHZlfXCSUyRX7ByKrNcMW8Fw+cdDA="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.37.0-nightly.20201112_1605165507703_0.8359850166568605"},"_hasShrinkwrap":false},"0.37.0-nightly.20201113":{"name":"brs","version":"0.37.0-nightly.20201113","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.37.0-nightly.20201113","dist":{"shasum":"d8778f1f098251673142c843fd0622dc745bdae1","integrity":"sha512-/JF3f77WQcZFR7ioeYnRmUyZEb62f6OSPF4Y3ORg0YpXj7+6P+TMN0bhbqJcGePmTMc0ZcKR+AYUsErlgyIRBg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.37.0-nightly.20201113.tgz","fileCount":210,"unpackedSize":1302646,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrjNTCRA9TVsSAnZWagAAtHgP/AkjOAja3d1C63uef3gK\n+jUBxj6kw9309haPBY/gKNOSBeDDVba8fyWzwamXATWh1BxHkQLLefu3LBt7\nDaWs74p07fIeqfk3aRZJtxydGVDzypLwwtZfjdrF9+Y6tK0CNo4Xf8zkejwC\nBtrQnUbRhO2C3Ky8c0W1oUt/XXWj2XuQp0W6mcZf5yt4Ik95fe9OgGhvy/pO\nyN3xLZkfB7yL2vsaGSlRatRWLZDQm33sPS3/P4CJkUJFb/xE3lTl3wbBG869\nBVTYlZoIMtWw0d42PhYkmBOntU05SSdNL9Kt1dKb24+NLPcyI6n+lh2b1fzh\nKO2r8NmZLzs/8ujf1F8UiM5tKCF8SA2Me4QTJeHx40bt/ctJUapzgewnxuv9\nRt8ayc5QzGKpH8r7JGB7YIsftcsdsqPAWUSXwUqT3R5wWPCueFHhvy/RXVtL\nGV8NSJU6yIayAVCfuVt7CNkkepHm2vLZpIZIp5Dvq8i79V156ZS7E74f0WcE\ne0gGEV4Lj1qi5llhxdjnev+7soG0SlbHqi0QvJBnxy0J15WxlvikjgZxE+TA\n4/5QnqwW/OZAoz36eD68ekOiIQSLGMQZLMXPSnIrwWuBC0eNNfbBAqQ1lwPZ\ncQ/XDd4Hnp5mZw1WrUF5QHsSXQAFJz8S+oFoIfGzpLFCWOvdClpf1Ld2qYFR\nVYVC\r\n=9lv8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDY4MbAcpuSWX8f2/0oyFxzDr1//8Lmsn+2b3icqOqeJAiEAq9WJP9Dmy/8JjlRllgrdFLMBAjg6GUnQYT+F1xOse2k="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.37.0-nightly.20201113_1605251923004_0.11357186097618333"},"_hasShrinkwrap":false},"0.37.0-nightly.20201114":{"name":"brs","version":"0.37.0-nightly.20201114","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.37.0-nightly.20201114","dist":{"shasum":"9fc633e2f4bc24f1b9a4849f777b524dc4964641","integrity":"sha512-IzwbD3uxBiRJM98PJ7Ar6HSeW9gJejOikYNl5ChprscK2ZyuUT8IuW4kX2Y2rViMBXnnix5H9TOfJBQiCMRagQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.37.0-nightly.20201114.tgz","fileCount":210,"unpackedSize":1302646,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfr4SVCRA9TVsSAnZWagAA7WAP/jAnZ70a3BG3gDoOYFEL\n5hwliDEP8U0L8qCmVuocatO/lzJmYEmA0BRmcuN9fRRP8qEJPL0VnHHoroQ8\nFqfIt8Xs0/uDZxNtdEDFFe07PA+QaBYd3ZRQdIBtq0D+LvKjdUOeiJccpQtC\nckBrMv9XTV7bPm01YxKrKPdBc/UK+OsZKCPACp8FnUVazC+3Tyn45Ajwp/1A\nkuXcUJdY6DKxS86I8pBVAi9FpwkFRtJmWijtEmvw6mqlm2cgooQbhUhMdCwa\nTINVERsv4Bx1tZbFQqK1y57Fx78WPzZPMNJvoYs1qN1et4nPQtMy4Eo/syyJ\n0o6gNYaEANfv/HH34nvTVdilxB1g0NAXyJ7fPEeCntyo8IcwYpGAt5KvLz3B\n2Q0guoQ4/c9Tl5KTvXxYTN7YGR4sbvwYrPwORgMwUd72KYO+dORtsTG94U7G\ncJ25TVBm0xdjAbcnWXQesYMGWUKJG7aguFjCj5I3Bu4VwRa8jdVG2E6gTX6r\nFxgDTNNvERmaqqbrPDe3dBtOkZbSeU6W9pjA7OkwkQTOKPLnp13sHLEtF7Je\nbfJnK9NIE9rhRw2PeBbFMIlthhIVIJbA4cixQlCc8K1XNsERE2IFg00CWEf9\nTNDFbyeH9g5JCllRsRVVy/XZy/Wv/T/STbpLnHahC08RsyVqoiD4yl5xBk9J\n545D\r\n=epI6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDSKDd1aiFfaU8N7OyoXRkWB6+9263MHKZFmeC1OFuVAIgbmCyjc+yHfdFagEsg7D8gMSEUIeWzwicUC2cMzNS9Hg="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.37.0-nightly.20201114_1605338260775_0.16617516314801084"},"_hasShrinkwrap":false},"0.37.0-nightly.20201115":{"name":"brs","version":"0.37.0-nightly.20201115","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.37.0-nightly.20201115","dist":{"shasum":"c8a7f9c75c85f25074f12aa73aa9d48ba360cc83","integrity":"sha512-sJdmliUhlSG4Dl744IK9ZZeoRMc0WAnxeTnv/nnbdsO4o7AUVzEDym/a3x0gk/fPKCJtYiWlAuQvQvhJgu9vIQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.37.0-nightly.20201115.tgz","fileCount":210,"unpackedSize":1302646,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfsNYgCRA9TVsSAnZWagAAOeYP/3HugXm1vtskfcmnH8qb\nyBT8TK5zWu9f25GpcyUJPWR87QRuADdzRCTr7KGr4FK9kdL+0ml148JogSF2\ns89WG9qHKS7nsLK2j6nYrK+Ivswq4Mp0TI7i3hGgSrDDzp45pkJL5WA7aq8S\nCLOVn5/ESkcf8KhRfCR1NycGpof/CNwLAM9ERitFFAqPD0JMXRqqBoDHhQPX\nNdtWQmtAQeT6qUZq00Vp7xsGdj5IuvUujq3DVMlmVkxMs2QCTxSugNGUReZk\ndBgvCtBWpH8KB34h/StjoCgvoBUFDeIulHv19Nf3aME6+ktF2+J+L1ruYlTS\n5h9r0QDLm2bDEJ6isuPWhlmfJ24/PXi/p9kE5wRZ2ALnwf2CIcsHA0/PLIFS\ncVh7+yHFF4h7B/7wuDD54IIwOwoA64gx2tWcKgiEVJ/J7wgTISjCqUyfNjiZ\njjnoiaRGOLai7K4N8v8p9fZAK0IttHyuCrNhy/3sWSCVEyMEgGIvz0SyjCOd\ndlTqhty/ye50hR9hKaCDHgi/wU7gySXMolRcxE6zI3g5gv15u+JzMdEEVDHt\ntX+21ZB8E4ahVtbNngArbRbx5XhGtyLJPWhd8gVLsSSYzYrCSosojRhCcl09\nhjMP0QUH3F+SX9EEuekp6P2s4oWOt5E6M6GoqGeypJwhVii4DN0yg8oTsmXM\n548B\r\n=q4Ji\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+UHaJK6DXYsoCAgCcjCF4wkrH/L+pACkRoBzInphdAAIhAOmc0T9nClAIKc1pIPhHZWNeUETUW9yr9o8AM3Z2IXPn"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.37.0-nightly.20201115_1605424671856_0.07433207348868787"},"_hasShrinkwrap":false},"0.37.0-nightly.20201116":{"name":"brs","version":"0.37.0-nightly.20201116","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.37.0-nightly.20201116","dist":{"shasum":"fd8a6732e7afe28f53697fb6585fb47e96574064","integrity":"sha512-pG79vLBetdDTO3AbuTdElP/ppJIYUpERD0nnAd+EhDQc+ifjHKfCr128w25WYMEERVZWzN4fBzt57Bwxcyv4Pg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.37.0-nightly.20201116.tgz","fileCount":210,"unpackedSize":1302646,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfsifQCRA9TVsSAnZWagAAxZ8QAJSNJ8iPsmffbV8sJkGe\nvTjTqjpVuyvCxX1q5E6CSyt/5Ybfc7uFttibELGnyFg4ZrVDuKE8LZYrDJGV\n7JwrCwd7aht/RJIeSYkMR8R0qHzxLaBQlEI9qIiZl11jyqsFTR7YVex+DrP4\nQ+wtj471aw8BqmjMtIszS8vhb9kM0eJbR0tiI8lVyEFTGW93djiP69ucNaGi\ngs10qgH7F6KOyJNLGRYNHvr2b5wWILMrfDDOcBC1Z7dotdAE9bbB33cJaXq6\nTs4RZPqLu3/QEelKu/TtJV3eAlFHS1XfE8R0wNcVjfqJHLCPpdza9HHLeUBO\nxaUoPhctWBd9KHINWv+dm/tf2o5noEPI1dxOu5SJ2GqWJToraX2FlLWbdcdf\ncVbbRALS0wEwXKQiSZAFeniAUMMAVrbv2mSBHSjxwdBTbVI7hzyNZUpCw6wE\n2foOrO42a6eD2b1yHP99lNwc3iZrApJzCvUHMrRNl9NHi5kN9C8W5zkMBFup\nsNMMvpT3cpMt+xFQUnR1MtQJx5c3ZKLNieQ3xduWDN9/r5cJFtdMRGMFEIOg\n/GbRqrP6t3BVzo5Z1hE4JIK71PjIEgp4OaxAAlK7NVkasdpevan0/0FoBPIF\nnTKrA5sNP7INQvKndTdlcv2XPpsqHE0Sdy5oc5E5FpEPUp8CqM23gBvsVCh5\nM6Z+\r\n=jiUf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDS3BMtO1kXdfM5Kl4cuIOR4RrPUdi8fqmfzhixLN+QkAIgDbMMNrkPTu0tXupiyMYYfuImfC2VjzvAVJLOxpkR4zQ="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.37.0-nightly.20201116_1605511119659_0.8686816180705992"},"_hasShrinkwrap":false},"0.37.0-nightly.20201117":{"name":"brs","version":"0.37.0-nightly.20201117","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ]\n' }\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.37.0-nightly.20201117","dist":{"shasum":"15b6312c0cb77b46bcc4a2e57e661dea1cb9e709","integrity":"sha512-e69mk8vyn4QGhnyh0Z4EQEA78KMxMTmIQAXR2jB6KyrQVOjnrzcex50dJloFKbSwSwrnz8yAs9dwuLK8Ggh4UA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.37.0-nightly.20201117.tgz","fileCount":210,"unpackedSize":1302646,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfs3leCRA9TVsSAnZWagAAUkcP/1hEZLIxFIJ8fGMs4Qng\n522Qw7qB6C2hPhh5ffqU5hAm84NC/i/IRXflIJNvUoKNLB3sab8k7wRebWrw\nWwGKiDS6/OAIlOCK03zaIr+YSlOXreinptg9EGUCjaszUL/Oiz31mtM6vWJf\nidhvfVVXDY2WSOAPov8L+ItP+kNZYvVKHGfgsZ3OClqeZCIG+0ZodD9z/NpO\nOh2HA0nvnZjaNk1KHL6ewcg2lgUqNoxYEZp1sLitvRgeYORIjoUS368PMR4X\n+ug2kNbZ0nbHNraj8TRJIY+9JOOiEPghkm4Z1QIfILx3syvIAAu2RqcuXjEE\nrw58C/XOu/CYqv2wcpuHyRtNTwM7VkLCw58wz/aUnTBykUPCfhdmd/suR3Qp\nM0aUGVloUiO1B/nhBJAcwRVlOfRfPNaok0dxvwzHzRxVK2XF7/vYmkBNDma0\n+C3NYL7FjgZiEkxe1gNDc+VEgVuMKMhcphEzUHfpdUf0Fg5/Si2nsWgWJSwp\nrq8xXY3PJQEVexugLq5TuBL2GAvZ9OBcBFdS9gp1/E8jR1ocCWJ0z8/7T9oC\nBaUSJ/4iL0ohqWtPIB3FRw9lVUv1Eoed8+u/tRJx5BRgnhC8QauwheqOOJxS\ndF/F2pP6dqzOQG44HxytFOPhDahv1pC5C9G5a1CkEdlMQ/oQAd1M6K8MNqQp\nvRxv\r\n=xwwy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE+iB88akc2DYeembUPLW9lB8kn31I44jjKRFwpXghQhAiEAnc7CTKwWKqbIHNdjE5Lroc6VEHLCj2Q3scO/Z7Wzgxc="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.37.0-nightly.20201117_1605597533844_0.1895199097614666"},"_hasShrinkwrap":false},"0.38.0":{"name":"brs","version":"0.38.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.38.0","dist":{"shasum":"1f998b0327a8b9977af3d1039f5e7e67b3cf3273","integrity":"sha512-UM210gPVGcW+WJU7bWniKQ1nHcKXzKmRpoJI+y1y6A4munsMGFllhXQQTU65dfANJm7tfWCyBrSc6CUfTjOFYw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.38.0.tgz","fileCount":212,"unpackedSize":1312670,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftFaiCRA9TVsSAnZWagAA6WEP/jKeoWWoK3qT2mClZzbb\n4+1UzdFPvGq6BgE9cVHgL4pSkFP08MUltQbND/k8dYP22lDYVZK6QwsiA1ui\nZJ4vYjPLTwPwanL3H2coCwqPpu5HkbRr1QfpamItJwmZdsb9e8jJ8uiyPMaF\nZW15h1mJ28lqiAeIU5iiWrwsQBs/5IVuSuiRALU2sEylQ9HpsMXkTlfauG1P\nc4UGWQ+iXQIJduVD3UBLP7R2hCw/sLM9Qac+hsQYu+xY/v76Kc+y5eqFK3da\nP8mp7cz4wrcIdTxJ70v0mk8+H3gDG8UGDhEbntTb5Dg4/0P9ttYdLlwnNeQx\nTp6yIJ9WFDjsU/AalPZTFIDmtthEGyfV7ZFJAws0+ngYQTA9evwxLdw7RIFG\nWEhuH0kYUfq3cYvwacm0tbXh+17mHOfjcDbCIQdLtGfTazs6s2pVZySRnJW+\nN7lXor4mSI5KbaS4wutMy99mKALqL+2oY6p1cNC0MqQCooLxcWGh36/5Kawd\nKZjUCToXuFR7tyjZntmgPQuMreok3eXHvA42JvoRSBxVBJUNlhpWig/XBQ6z\nbrJMu+WZFMXLgHz/5pSLjkLzzBGb6POEhttPv/QM2iiVWp1O/ExkPlOcFu1E\no1MqquXhKR8csRAHreLicN84JKzF48gmo78DZ61wBMkzzUP7w5YwslQ1MJiC\nOI7T\r\n=rQv2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+8kOy7EIH6XOqRG85H2f8q7usu/A2OlnlfpkDOC2Y1gIhAOFAJ5QR9yKdH5sYzlTxvsUCGuUezvt6Ch9kzOTOpaIc"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.38.0_1605654177498_0.892227493340455"},"_hasShrinkwrap":false},"0.38.0-nightly.20201117":{"name":"brs","version":"0.38.0-nightly.20201117","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.38.0-nightly.20201117","dist":{"shasum":"2ff07e77be112d5c2de7b4e850c1cad09c0348e6","integrity":"sha512-1X+W0tuQjob696N1Ui6UoayqJvxZaXCa8JmzCA/WOsg1YAmOyQhsfsIbOiCET6wZlQpk4WX/NVwJN7YgYbFdgQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.38.0-nightly.20201117.tgz","fileCount":212,"unpackedSize":1312687,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftFkhCRA9TVsSAnZWagAAKtEP/0ku5ufDdCNy9eOq8HUn\njupqI4gbqODAKYTDK8BwHd+L8hC4S7GNMdPWesHJlJjIB/qA5dlZ9R3kHYzp\nPD049L1Te/lxKwjvZsaLNfs2QDhmlg65sCd1HzMAPHjEL0V8+yPsH8LCyrsU\nDHzIDk10x0GHsQFhR12La6Aqw0BwW+XRA92Q5f+UZqT1JuigH1iuPQwspFVu\nP2sOu7qCCWyUjZET6OQ3fU8l1vMmi8i2cMKS2uW2CEOqXlM9eqB9R80+dzih\nBIfY7jVAWQO+QQ+e6jgvMlC/WpNyzoHZo5gfsviobfh/7q5ZGWOyTgw+qnHH\nQtva9nEAkoAtUEZceebHIwHzC+bfA171tAlXC+BQDbxOgS/5lebXR103A/0s\nKtrBg/X1amszR+ulS+8O2zRpvi5myDVimoSa7xWz24rUM+lQ/luoD8A069+w\nx5tffZyOw09P3730bPQ0OHPHvng5Kd5jziKBYLRQm3kj3/oQnuAkAlq1GPVf\nOSljMGsUC4BCSm5I45twSZU6JbEWaEgWpmll+PTV5gnwVwve2wPrbUzhsVXv\nPfaTs9/ElFp88TxmpEuGsSGZ4ii3IFFBR/Gc+lcAOoxzNj2r53d43UL42QVP\nN6bsH/zbm/8mKaVqoET0abUiX4nSiFVJGHlwTv/acEQuGz8h6lIOS6F0Wc6p\nmPiK\r\n=C/OS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwfZsZgwN+4NniZmHdZCsHCZN2hcUduy4/FtpqC2bN7gIhAImCW/8zvnVk86OUyhn6YUTHP9EtzJ4xSxOQRO6ty20r"}]},"_npmUser":{"name":"lkipke","email":"kipkelevi23@gmail.com"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.38.0-nightly.20201117_1605654816582_0.8926034396047635"},"_hasShrinkwrap":false},"0.38.0-nightly.20201118":{"name":"brs","version":"0.38.0-nightly.20201118","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.38.0-nightly.20201118","dist":{"shasum":"17baa9d7d1eb69405a86b23ae1f5e35fb7f5e7b8","integrity":"sha512-+nzGtzi7trgQppPHOXnhHFFYoq+lRJvrbB74HmjWvpDM1dam1BsVwkIXX5JMCJvVDty45xqO/T8xVKc2A+CuGA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.38.0-nightly.20201118.tgz","fileCount":212,"unpackedSize":1312687,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftMsvCRA9TVsSAnZWagAA+FkP/2Y+6JQ3qZ9eUU1eRbYw\nY1f60v6dSjWzle5LeUI6gsYbxPFer+yCGcC1XEPI60ZJN3JXMmyevHQPi4DP\ngbAjRiLtbbnpl86rCJ1LAmgem8QvMo2pawwFajk1q4w6cCQWfPlIAxQDQZ1J\nrQ+p6HQbyUxDMBJpWac0ntR0c7EicM4Y5+qAodLlqA47dCrs53s9W8Ni49ZO\nbBaALcjlXbVI7IYVt/PrWcoKp6P0XFvACAX6YK/PHR1MTOgwd7p7/d8mMInc\niqBM4l2ZOzaT4nGOlQH1yyEb7HEtOS5FyAzOjiPCsch0nDA5R8f/wFeHSq9u\nZFCUPDtXJ7nB5bnBz4xM7dIvM52i7FLlh54LSHp4ZkWGslvz2/ABzznEWuGz\nNqzAu7lu6A4FeEvO4X2FbF+2T0QI18yHbJ057zIMuzk2UMlLDxHQi7JsMIxk\nS98nOmspWkLfkq3G2g9XsSlIwksk+t6ts7xDTTWSjhVS0h26MdzH2PziVSPq\n1a5uzOPPKXTAKSuAByWWDZqVEPFGJ7mk/jLypcAIfVJ8NDVQhomKuLwH6zLO\n2ssELc2QhjQURzP5IIpUppzi3wcGQ9cWKDNnOlQecI64rAW8WSxyYqJRoOec\nMtBz7AgHH9nuU9eZIqYqjpN8bmCQbIqc4pin4P30hIo2A7PkT+laeNicjRkn\n0VkI\r\n=q4sy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHz24KifE7mLq29ieiraJ5abW9GtSEhjv62Yvzp0yGYGAiEA/ZwqoV7FpiShp3MMzB6HnH4GljyeVyxDkhO9lo2mUZs="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.38.0-nightly.20201118_1605684015005_0.7745581332667395"},"_hasShrinkwrap":false},"0.38.0-nightly.20201119":{"name":"brs","version":"0.38.0-nightly.20201119","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.38.0-nightly.20201119","dist":{"shasum":"843af5c1e43a1d72908f133e0b198bacf39caf8d","integrity":"sha512-TAXs/fibDqAeE5iSSfEabEanmiYQXuZqD48x76Vv7EbPEpGKXKPIGrhfYsim2OwNxK2oTWwXLV4CfFhmdJv+wQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.38.0-nightly.20201119.tgz","fileCount":212,"unpackedSize":1312687,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfthyJCRA9TVsSAnZWagAAKVcP/1xg2UD1eG+xLF2I79c6\nXDt4TGkrhZz04Pe/txgB4g4gf8j+6WCHhMGj4DHKMCtvqUK2I4Llowm2wa5c\nr9uvTa8Lu/ZPWTQQUVmNmPcIaVCFA+43jwxbqkbs7mJCp2oGszbCM4pn9ciS\nqQGDY9eAJsbIB0RdkLBYA13fhOkzzNPd8QMkxfhD3ZuEzFdsRx3rJ8n+pASW\nJgOJXBhdXl2wu4MVhoIpLxQwfb66w5HIu3ZxvJgTviW+sBmk6nWsOm2v3ySX\nECzKpHLJfqHqP+PIsh0hpFX5vV2+UOZk4n0DmHjyTlf3EALIfdCZtPJrKaP9\nqn+Zm9naXLHBV3VBVxl2esoFwho68HdhePznBXbxjxC4QegSfSLDN1JKNZWq\nr73Y4OZpjH9fNzn8GfLwqx+Um7tC0esi+Yzdb9ceaC+BrhNpHRIw08No6+iK\nUml9VbxElr6sOgmVQtGM/Ym9GrnscQM5muBQkZyv29S/LhsP3TzWnPb7hhkJ\nfaDtGMlFtXXmHmgOYZ9++j/fEi7YHm4zvstBfH3waiwajW+kob4euW/zOOIN\nGquQ9xX7P9je6evJBp9TVwD365iicCgcLPJGS7Kk+rxO1rOWtseON3fGyFDo\nEKZtxicLVq4yBJcC7DvPwGWaml5Cq/XdU7VdVEGKPgXutkYwLmriEMVavbgQ\nJgW/\r\n=v202\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9S2dL4qGP5WL2R3Pj/h4hYzJWLshx1YfCjqv/jxeUJAIhAMXDVeCGt6LuaGJiSg12ZxJ/T70yxBcbMISF7PiuRaFn"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.38.0-nightly.20201119_1605770377394_0.9562838535182063"},"_hasShrinkwrap":false},"0.38.0-nightly.20201120":{"name":"brs","version":"0.38.0-nightly.20201120","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.38.0-nightly.20201120","dist":{"shasum":"17fd5f3c4b0fca20762991360aa8b7c772969381","integrity":"sha512-ugYXGZguU/oq9uLvPWfuslUN5A54MXxr5iU/jcpf5jPECpK0mOk6QPRH/CES18A0EcstLyqZpt238fwL4HmVLA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.38.0-nightly.20201120.tgz","fileCount":212,"unpackedSize":1312687,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJft25FCRA9TVsSAnZWagAAog4QAJlgcWYjhn6MDzF+qsmK\n1RtvieeEgQT+Haq2NtzQH6E7CHNFNkyN9F4ct3thl9iRZ/uAGhoX3tDJQegH\nGNKjGlmu9fyjOZSx3k1B+H2+mdf7ILZ6Vqlk2EfW46cHd+t4AhbUkrVvpKdc\n6e4yZVW2OL89U3B0TQ7oIZf40KXSEDDPotzjKbuYwco6h5xN8d6vFAj1jbus\naUDXFu1KtlRqDfmhdNpS0oy1ju0cuzGnigas+1FJ5QM8MtEAkTT4oLQ1DO5D\nIR9V90HnRvPbT4bVUYVSYGZNv8s/3cJZhOAICVPrOpNb6aKIaqON/20kE6B1\ny51rhqf7N8dMDraunCZNjP098Rrp5v4qKDJVAKdcCMZbUsy3QJG+lLF0iueS\n8EN4v1zb/5wEZJuacQ4wAAI74gKRkCuI+HLQKIBz9M5e2FNHMNKN14hBTk0E\nIaAET4/WhMyiGdMC8n9qa3mNawkqAaki7ZA2Tm7LPFQpRG4X0MURCCXs0JRq\n+8oHJ3xlHuoGSh3IbIXnUeNsADuin4sccmqOm3UmqX3SI2+DipGUieme1pwg\n8QNkMiPHYswWVEYDRvQRwoG5AJD0/EQ94+gk1qHpxGyxInQeM9wD5KlTS9Pr\nisZhUQGxhqdKS/dU166rVaE33Zybhqic/T2SVlFQcZanNivfdGPeNrChdjsH\nS2Bq\r\n=3L8p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIQD1tunwZyobbYIH4MXEYDjiWo8y0U5U4OGuVMP2iA8bbAIfC3ibJWUoLWmGSmhDqTu41683FwOZYkRvsig9BDjEwQ=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.38.0-nightly.20201120_1605856836398_0.36255203736414665"},"_hasShrinkwrap":false},"0.38.0-nightly.20201121":{"name":"brs","version":"0.38.0-nightly.20201121","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.38.0-nightly.20201121","dist":{"shasum":"e1168b3ab0993c5970af0dc71253197c006bbdda","integrity":"sha512-jaPG3U19FiZOmPFKttaeaus8fAoe9+E5Fcbuw09OnAYVPl2e7TcNYMcHg9e/hZ6S7GUUZ7fA8wSUvvKu6sv/wg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.38.0-nightly.20201121.tgz","fileCount":212,"unpackedSize":1312687,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfuMHnCRA9TVsSAnZWagAAIAgP/j7T1U8gmBh+Dyxfq3LZ\nVXvt86TMPiNLDJzKrRo+MJib1tt3SB80YdF49suuTKQwX7kxHn1EzssnAYfy\nRdeTOImDW0YHW3dAU4wtZgNGbtXi3jtgWQ/Ba608qy5evsZyM/ZfgFs72Pl+\n0Qcj22A813c4Suffr+cKS0CVyjL298yW+pwwfoCZHBmlKWbklwuTzZTHSEJN\nR4AYuhilEhzcf2jCU5uddfaL78kHGnRYKoQIU8Ir1sQ4V/jlHhjzO1l+xNmN\ntmgMrpbPGWtxPQzBUhfU4WH37wMK/FbSesAx+iqOCor7jf6SUxH+l7W80kGJ\njkEl4vn4T1m/zXVhEsZywr8KjhOG6zwxpcdxKAXzrw+N/0oBJGe3kMv7+w1K\nj3hn9XNKXw4kgx4MX7L+yrCcxlIF3F5h7l4vGHp73jOJL2n74XfOO3Chig71\nTmjcaadcRluCVio8GNoeJDNydLdLyOr7jpXcj9fFewBRNbhUnWUymeSj+dCj\nY5PRJPzG0MiOJsEu4ls5zGabcV/ojCm40TC3F3gH3aiTfh6TFz13UN/gtK1s\nBGm3pcATI/x6ZM/4EFEbDHIJbnMNBWkXgTT+lh9aOYyMAQvRQH9OVr/lntvB\nt3foeKM/HLxQNUPwWTZAXNN/qtMMY+TLFixSum3lfp2Mw+OXX7gOS1+164g1\n7YuY\r\n=MR1j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkStfRYEjluSY+s6r93tJ4eJHA7cQy1tVHBZPkkVrv6gIhAILb2UWOkAb5Jw1giYHA7vjrhl2VcAGNOcFPuaCtZKA5"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.38.0-nightly.20201121_1605943782354_0.06399476328594678"},"_hasShrinkwrap":false},"0.38.0-nightly.20201122":{"name":"brs","version":"0.38.0-nightly.20201122","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.38.0-nightly.20201122","dist":{"shasum":"250ca050b87c3f5208a4d8e734a8ebacce48ede7","integrity":"sha512-CvbVn12DVXl/tIdS0nJmkVvnZ7/kTOjWSewtDy6Xy/I835ElLcOTyRGsNHLUSk8DsJtmyiwptKrDNZaO1NbsIQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.38.0-nightly.20201122.tgz","fileCount":212,"unpackedSize":1312687,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfuhD7CRA9TVsSAnZWagAAdogP/0+cfL38Qsw3HWFUIBAR\n26RBZx39sgLeNA9oZNQaVclgSMusdLROEWbLVoUI1ysIJXMs/f7isKwKhgxc\n94EqgaKhFlEReU29xZ9v1aV8w1/vPQkO1EiQEmHu/aOSIHKYlI/sBFPg9DP0\nolhqrmVLyQkO7/UCyEB3GtK1TCuXL5VFnnDI/L+6DgbEzS71AQgyk+Ab0cKe\nsFGs9yEs2/YPkezmH7BGQwA5ETYRD7ev4JNVou4LqWYiffTxvJz1KzqY7X3b\nrePzBq4tw4dAN52tTHLKBgUkbtQk3GpqYaEkp91N3v8guU5PBfAE8Qike72r\nTq2FRYJ4cf0JuzzlIuXtko4+YceWhzM8S0qAGyrEayvQQGUadVoJscXjBjS9\nMtiOLhVez2nI36rWiAxBOl7cXrpOvFGiE115UwRO9RnRp5Tgtk/0y52yo8ic\ndto3tD6lJ6+unaZUIEBELuy40HuAjSlNErrrOfotbfw8rnh2oj9g7vpfW/4E\ns2f14k9sM2S9E3KPlNA014x9RAZEWN42ny2GYy5hk+IstbquuioTSC5L2brE\narp2MDcBZdGmTkMGvUREipHwSmPkXOCwGoDhI0mlgGqmQXZDNmpIIiKR6MX7\nNVJMFTCKK/HlCAmkXfFXO+2ltA9/qF+YWH95z6GZSQTfh3YTtEXOEGxatPU/\ndmB1\r\n=SWqT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICon4lptt86FysNSsDO906ChsMbAMVDoCfpCuUOrsvk1AiAJkQz4tJrwQy+GTsP6CJrBz1srxhjZ7TFuqAMFy3uuJA=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.38.0-nightly.20201122_1606029563195_0.48209143943075494"},"_hasShrinkwrap":false},"0.38.0-nightly.20201123":{"name":"brs","version":"0.38.0-nightly.20201123","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.38.0-nightly.20201123","dist":{"shasum":"966d545f5cce3a8743f6b2f1a8f2172450a683a0","integrity":"sha512-jEyM1oVrC4A8VUtIvy2O/DSiB9hfERIGhKyIE/dCchEPposvqRpLQm4reSNopBnjBSi0XTXx3GjQT9G4dfkBKQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.38.0-nightly.20201123.tgz","fileCount":212,"unpackedSize":1312687,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfu2KsCRA9TVsSAnZWagAA4hoP/iSjSRdZDawO0Y7LhGA7\neP3ZuLy18sy7q5xNlumLsm+V9CRrXntyu009ctb7211ZC1Z2+bGRoixm7nyG\nUXczzBRHsAj5R5CAl98irSfZVhsIoxDMeRk8+H5fGsdYkVFZ2m1yU50+UBDF\n9p8oG6oKejoehELiZaw6vUQCRcE8ltjtpiN7m/JuEOipprYggoZlf4k6YrD7\nzF2ZzLOwfnP2m/f+DIZLw3Tjz2ssgwY3ybapzPAoa312bJxWSo/nYk3dU8ix\nwvfsN8IhgGhJQ7OQhoBwsYb1gNG+miTXxv4qJPbPkjaZ/S174biWXfRx7FEH\natnkl1WpGetHoFMfWZxkevQRWdS40qOgPzwLXhQoIJ+MOkxbeLDFhEu2ECR1\n2d9BYCICJ4B89+hkcMak96XumfxfzL5xNIRT2CAInqv+9uDJhzkllkXocrIz\nySM6fBBbWrdYDdFTrOd9HakGz6u8cZdBuh78p32YJmFnorxWxdaPgrVe1diB\nHBm1ShogaR/Y0N39wxQsOd12B7xh8wYQU+gjtWB4muhECT3gxX7XFgsVBMrO\n22K/wS54nEVuDf83+QXSQaUQ/y2VOPnODKkl/nHGhQToEkeqyf5pHxYzxmvG\nnY8R94EphhvQuCZ2mJM3EqJiksCeVVaEuDxDc6+k65ScoI7//YCmSULwThh1\nh1l3\r\n=8qGB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA+m65daLXPTP/o1aSUgi+wvVmxJyegL7W9FjOrMxn7UAiAujM8c44nCvrJyjeOAjfeceN2PzO+/lCtmAGc2xNckUA=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.38.0-nightly.20201123_1606116011435_0.14771485588614652"},"_hasShrinkwrap":false},"0.38.0-nightly.20201124":{"name":"brs","version":"0.38.0-nightly.20201124","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.38.0-nightly.20201124","dist":{"shasum":"bec7f3d7e2279cdaa59b3cfd4fa1b1f14ea26259","integrity":"sha512-3O/iuPg12e7w1rYNmOU56JDzsCNTOqzVHtKayZoobE+8E4RIVCbab0KGhP5S9TMYWZyC+twtF9f5KIvKuBaiAA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.38.0-nightly.20201124.tgz","fileCount":212,"unpackedSize":1312687,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvLS0CRA9TVsSAnZWagAA4GEP/2L6B47sibn/JhxqOpeu\nm7Ri/Pb69X8qForbvoRlS/BQLN552r1aTaNubjv9G7ywfeV6cpJWJ72lc8/K\nJHVannMEAvmSqvPtt0j5qjuK/1ps8/Z47HJAfRNs+kW6VZuhH9RgFDtgP6Tf\n/qrjH/yYCWc/EiSN89AKuG774mhde8b6dSsOg/qa+b5dI7KdbgRxOce+/qlP\nhfjiqo9Vxvzcivy4JcM+nacBn3WfXoynI9JttJbwkaqF+oYHcnuQYqMrM52X\n0uAsKeicp6IUXlbTIzhZx0Oa0VO14HK1onFvkFPeEhMydpAdVckaQ0/oK14l\nd+uk1SX5KDqfv0nNxqAvqggjDnOo3N0pFPUtbkNhP6TSUtLP4/YUCM2IUkPw\nmFx3nCaZO997cYa5tggzEEeIMazZz+vXTKgQUDDS5UeqW/0vBXWd5x2L/cha\n5D1Rh2UZYg5Hsy1vD8Sjbgh/yIV3O35xpLQSC+5sVmUYtJnDg5MzqrldW12V\nT1WtBENV7W0CRppvmjR1G2jObInLfsrxUJTpc30g+BKOVZ/iLU4tZ9gNaJxZ\nmLyyJkgDcyO6kkkejmytywYUgnibYanosnZtA5lmrJXq3cwA3eEtIrehMbeZ\nG4k7slk8uVkgeaU4GXdyYqyLfh9TAWHfbGnvjcYMmxDMIF35TsaMgw2B8Gfe\nSnr+\r\n=Gf43\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDISw0v60kOP0YkXTFtKstVhXcf1S0HtKeJD3eq/TBAjQIhANh83Lt8PdKtmWB/yG5MiH6FI8os2fZDC6kVUNgdlsf4"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.38.0-nightly.20201124_1606202547706_0.9554146042196916"},"_hasShrinkwrap":false},"0.39.0":{"name":"brs","version":"0.39.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0","dist":{"shasum":"90b10285c697b19e9864a98199fe1c565add0a58","integrity":"sha512-Arf+iGNVnWYfQM5RL3FtOHkancsX69M6khq1LuvC0rLNYqYW4U3PDPjl3sPZuvxcLCCUmykj+3nhO7K3sTIcJQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0.tgz","fileCount":212,"unpackedSize":1312084,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvWJXCRA9TVsSAnZWagAA2/gP/jE9WsGBIbnbwI0sh4Kx\nRGM+jL9l0Od0CbMjKjOeFo10nIOxUt7XP/lolapSehEzJoGeF8evl0tKmvmu\noYF8iYVppPXQPKtA6QVSZeriQl3vLSoXb1hLG9WEYGa/10H7SvGBy5gNGeFD\nzzvK9uahGx+bq/phadRzWItYPlg5VLfvILtob9wG+rrxt48QHHndT/PDLcVQ\nzwGdoRlZ4h5P/YWTZ8U0OWVde0Df6yRnCQWv0EVFrm46lWe+yC78huE1zgWc\nUxRN5s43nJxNmcwo9wxzL2br4AcQuarSJhlkNbX2VsChzubze4wRUGostkUm\n/C7iS4wDyQtBaVYy1rZUIYERfC8pdn5ABEglYQWTt92mTnyWmkg9Ez00RCwI\nIePVU/FUhT8Tm/5MgveiLthwJeqE3h/C6ZX1QGqY1HYHC/SBhf7oDaGNv7Js\nl5WtVeaP/OpbGBOABeMDJFGXDdpV6fv/Ek8AGXNIF/RsLWiQ1qdiCV0XnSns\nJBPDKstOwMnPAa67AinD+w0S8sYfRlCvgZCZIjzfJNiC4XuavSniQmY/SQ1k\n2GanWU3FyqMEn43BP1Bspm7UF60oLtNGnxa4nqeNIIgTYyx23BvxKcmah6/k\nrkaux+vW6xWNb7Rk3nhRZUoJhc2OvujqHapjSgt5rmi3kCHNskWKik+8slel\nRUI1\r\n=30M1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAOAIwRBVWbjnPztex0VbWhBeQowqWGPfXy+Tx1G5O6rAiEAvZexOURh0h8YNdQ3oUEqUPm0ZHAb/9UWftyEqRB2XY0="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0_1606246999260_0.910226628400767"},"_hasShrinkwrap":false},"0.39.0-nightly.20201124":{"name":"brs","version":"0.39.0-nightly.20201124","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201124","dist":{"shasum":"22872158dc8f860d72fa256da718f8f9351dd6c8","integrity":"sha512-cxOXl8eRDQLRmYKHtTCU/nBpxESzMuMgM8wRswTuXyrhFHANne+8q0oxSV/vOBpHxhDBkQNtogKypjA78BHvFg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201124.tgz","fileCount":212,"unpackedSize":1312101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvWnrCRA9TVsSAnZWagAAmrsP/RViVBUkGDE5/v9Ij1ju\nSFEqan97iRjbhZvv5QsLNdaLlY26EAB4RaKigtMcG9zdfG1fbzBmdx8wUbdm\nhQSM4J1P3nNZGKcgt7xp6J3Uwl7LXdQI45dQO65z9hrrkEbOb6uPq4ilzLuZ\njssfGuvrr0o8zceRpOaf6CEcQ/i7nmYSnUR+8tMLc3Z4pc8keR6+6ZbiLF6N\n+ddbbNtBksgBaHauFG2oddDgfc2KEvvPjq/+qMCQdjT4/oVtwaIFx1K1Jea9\nlc+uZUl5wNAC0HV0fhta+/Yzc6sYE02NNn5E/CP9pSWud3C8ifdLpvSh+dZa\n+smGyF4yOWK8moW+x1J3NWgZmCG5yIMOZoo7eBguL2/yC5kJpPCwiK08cCJL\n4UFT7o9oGF52O8ZkJhZAj5DQuHPQRb4ASB6DwUwv2gXy5VbPn3nyqMJkLG64\n8qS2z6mRz5wCw+rhqw6+bumNhuECbCQ/AkCXu8BF8nqqKh4/SWD8i1qvxvAb\n7c2LGTAon71B5TJEib7eaylFs7XMqgvOqTTl4J3UTQagyMn9BTMkoJx1+hcQ\nTzN/XIkZ1nAEArtIPrngZf9cTXRPtaWk9fUjaz8z3aiF289pZbhGMG1bQD+Z\ndU96w32vTwwFmxefFibiE+sIG7D7FVq5qi75p7WX6m08w7hyIKv4xf/OAoRK\nc+e/\r\n=X4Xv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBZXNYkt+IioiPClBGj+HtECuXwW7kLavzm1xqV4FLcgIgYkoMHfSVdbg8d2wasT4oXIqTqlTiO1/qlwF6hMr68Sc="}]},"_npmUser":{"name":"lkipke","email":"kipkelevi23@gmail.com"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201124_1606248939190_0.38998134626239844"},"_hasShrinkwrap":false},"0.39.0-nightly.20201125":{"name":"brs","version":"0.39.0-nightly.20201125","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201125","dist":{"shasum":"1efba8d596282d99b393d3402cf5021b97f3e583","integrity":"sha512-yMIjJN3Kmce/4vbT3/kWbZe6m9nP/vsUC/2UoiKX7lKY22jeFVi964KlzRFb6cKLgE8pTnfDnQZholssBWXF8w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201125.tgz","fileCount":212,"unpackedSize":1312101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvgXrCRA9TVsSAnZWagAAOdsP/3YniSvWVL/S6w11wCKP\nbRAqkR7GxAuZAHgvItZu77QPgTWK8Xw0golaC5OI/X+PgLP9Bso0BexPEX1v\nIUspLTb75QetjZ23Haehz43Zjddlf2GkYRJQS7qoaNAHBfOuhdA8xFnYdM4P\nur6msIhFI2cME1rTDuXxDHf+Tm5LuLatsw7dLzfFTW5XlvLNfr6nhPtUNdzX\nONfjNXe2IwPdxC0OnQVzEUs/JPuKWxWFh9M2Qkv+pkWUIsBwtVUaIdWjxEq8\n59CC6Z8u3USfz/ABlt9jyqz26MIwr3y6IkjkfL3G6MBQrle1T7wOvS/nS3Cc\n4q32De9BMIn0E0hhJr8nJM9sj9Ez1O/GSb8SCyj5V3q6Zpj/6bv8U7k9Bjs4\nt/5aFnH52eQGLkHZSUw3Dmd4j8CvO8SCdv3Ir9WZB27UFdKtNCc3qi3tiQdh\n8/c4rSTiTfALdcfudZn5f9kTDWN22Vx4ePTpHrQCEzBJdFKvTPdKRLmUVvhz\n078ZPzg3UlkVgXTFtgrtBHvZ2iiTBdYNJMnEzBO2gHmJs1m4k6A+CgNsI3zf\no+9eT0XwYIvVP1Lx8ifhT+Wu6+hKeWI4J5pi6fRbcQ/iiKk4eVXTZhYNlJY7\n/qSgFAoz9Y3+QzlA4CxnR0NaLqCxg9WmcGX0cHe1IMc30xphKLZbVtMufojd\nl5bb\r\n=gCwu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDP4Qat1XSYKLlxhCOfPG0En5gWhyceGs1JFsIPuZo2LgIgMnfzEMlMAOa1OLHjxm+BQXzfefLnyLox8Xt/NOhVDPQ="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201125_1606288875219_0.19402524569413182"},"_hasShrinkwrap":false},"0.39.0-nightly.20201126":{"name":"brs","version":"0.39.0-nightly.20201126","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201126","dist":{"shasum":"cb0a11cb84b80d6c0148c39c1d70f03c72ef8695","integrity":"sha512-sSw2o2yasJA7t2z2brKb7Hr300hddaCThqBuVgyhl6D/2pimXBCUflkLdA5Jx49Dwf5PZmCv9Cw88lXkcECcZA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201126.tgz","fileCount":212,"unpackedSize":1312101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfv1dTCRA9TVsSAnZWagAA+4oP/3b3gzC/Lq8qHCCBhyFk\nRV0E2XH4VSVcFQBj0m9JGF+jmyIa88HLaw0aaqDqO6yjigJ+zDFDKzLa/6pS\nWugs5y3/0v/AWX4EN453Yvkn1Ylt4xmo4UtttcBZfzk2TY8+2BDoSEHkyOGT\nNS+SOxcCla17YpTB13In8tGgmJaP4MAGfwaDRUmd4MEdMn/zYIThtZGtd0kV\n1IK/fpxfxTi9NL88ztZTU5FYXWKLulE0oYurFFxxJA70smgXhEU0H6rwybpU\nS864HC+mi/JqRCCMyWctdzb/Hp2nyz1xGmjUPcRh/qQi3XxcK/PW84eisqX0\nJuOxX9S/ZK84+YAoOcjl9HWUjvCS2fuLG1tdhsdmqwGjgNPH0ubTiNdtrIoY\nXA5ILxkCVWujH3IUQ6DWfWnIg10xza/Knn67oQaXP/Bx9J8hMjh8dnS4g/7F\nkw4aT9wPxWJQH06ijv+iMK/Qlooz0C9T8umU0W/Cr1wF8+NcWlxRHE8DYwNI\nH4tWfxB7Ggy1aGw6d+puixrYmQVRLV1feJT5etTrM93v/vXv/Xxn3CLdmNRV\nD6QYuluLTn1Mhj2743vI4t5Ya0Tk0bfunMC0wZsODZmy3/cxA7KZZ3sQVy43\nsBCpWZ5SIXHFLwd0jhOKCMldKwLoR7WseNVtMvGKgH9TWtNv51bswZzQrhYN\nIJVx\r\n=UDbF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJCNzrvPe6M9MaVCe61OibJxu7n2bR2kn5MsdkdqH5DwIhAPscAhcN/wLltBY4tAnSL6XHaAKl8djDoB/HhrJZq/42"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201126_1606375250979_0.8344938558227266"},"_hasShrinkwrap":false},"0.39.0-nightly.20201127":{"name":"brs","version":"0.39.0-nightly.20201127","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201127","dist":{"shasum":"bc9940a313d68f1377537edc7bdb81ab4b1111fe","integrity":"sha512-4a7yHTzv03Y4arU87ohKlBPvH5LxdDyEGDC8G719V/GZUztS/m2vCdMqHuxb6/C5DMaJfQqHCuecBXvYyEtDbw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201127.tgz","fileCount":212,"unpackedSize":1312101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfwKjmCRA9TVsSAnZWagAAMqYQAJMbTX+rMAIbKy23EyAz\nC66ZS/G8LMkAFzHspvjUA74ILoG4Dsil6tgcIHanRD+DuOEt0dvjNW42ROxG\nYwiSih8DJvvVet3hxDlrXAeDj26AbdZgYbRnWAeeHE6FO/GEJJ/Fj9JtWJXz\nbb122r9ucvntY7tkomrrS0xMxAcSV9MM+/lbmmy+yGuwXoIj5o3e7hIskcw0\n2EFvLKHsu/ukbFtk6FJupN35/eEEyOZMX//1xulOahxxqD8K468hPqfdj2G1\nNaR+oeDGfC9qy2piwuxTnWLZQGJ6cv+DgFwwAdJJCuCp5/K2g2Rq/tPdupEb\nlBgoQpGu8F+fdK54Yn0pLFJNnudkzFLdSWTmvKnLYoRVFCkCNhUaB3Tz+yUo\nHS4Ja3aFMbOBLQk24nvPyUufnd+ELjEyqqKTFpuelkQqmlGM5cqP0QcAEZrm\n4IRTTiHJi0MZT1DA+2k0fKh1hMKdl3aHn6UUv+s+uDLaF3W4bJH0o2yVxvgw\n/YJXl0K6D+CKlgATn+X2kMIDTWXyzIG5BnOkg2jtKJHagCcMXglOXaxqtext\nz9eCQu/Kuv0LG7rambBdaqOfhtVug0YkRDmct6PyESt0MUgE3IkMYYkLEdLn\nAvNyMm+eERXHigOxF6Ynpmswaiw2qk8IWM4EDI+MkBO+fx5JszfmyT7zxPHn\nvBUk\r\n=rbuE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFxyyiEK1UG0NM9NNBr69A+B946v913GFPlxpBYwIogBAiEA9xXrJxvxxhKU0C4p1ytZMWJ6XceMSUeB6QLMdNul4U8="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201127_1606461669977_0.5186213494232028"},"_hasShrinkwrap":false},"0.39.0-nightly.20201128":{"name":"brs","version":"0.39.0-nightly.20201128","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201128","dist":{"shasum":"2c0f72d473b7e649022793a22728f1b51c807fba","integrity":"sha512-yui10cQYJ0TMO32zvUsnsjZmTZTvrP6pSjcEoQjBjGDpQjQlGoDtEzel1jBwuKYmEiGiJfUly/67BA7x97+mfA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201128.tgz","fileCount":212,"unpackedSize":1312101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfwfpzCRA9TVsSAnZWagAAuHYP/1ETiXRtaUxVNA55I1ny\nrvDbNErgh5QIVpQB/BWHwfT3q+Unz3/62L61oGcr797+gA42FIWP890hFFDr\nIYAtFQA+0VtO53kF3cxDALUSGFNI+1vPPaMYqAVLjXXsaKRqx6DQN+z5Cdci\nxcedQJRJYuVJM+36C0iiaN7YTXs99vwYsUSVNtBSYKbETdZX8IC5uS0fhcwJ\n5BMNTI6kL731GKhdIzomtzvtvxEbOm81h0RWoHKOBbdZ1QANEDBnrUi9/j9V\npUjaq3HmI6ArDWL6dbA2h7x7dmrWBvXt0onTw4ZP8MNN4pcvnWViAKgfqxVk\ns5Bpl7bcCmnFzpL4y+oecgn6mJgFO7QWqtMD/lnJINcKcCsFoUIbDZx5GcAK\nAkoPrpn/U8C1Cd3d6y8feOMLBNHhHRI2a9fbsKkTriGWwRt4XfrYxltMfjWe\nQOrqTQovzTXPbiaEDGVhUDOjhaMRLE7WbVK/wrr5NHKdDjohcHNryWkobj9m\ngEOSvuCTSVEMiMpnozPWQ6DAF2u2PMYKOiCwTDTjAVBP+92tD8sA90lz28Qn\n6XAdonQ68i9ud19pNOlEk6JbBFu8uMgDHBHEjPMlaPjKU4WBjpT8MEe3+VFf\nXSvpApr3s5waUbQFGesjrwnGfniYjTbffuBfOjU+t6Ewof3rzFpGgDkAzQ9o\n8E/z\r\n=uplt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvivXSDZy+5lbGNsykbBVCUOED3KX7pAdMSRa9+55TwgIhAImzW+rxj8RVYhpDpgICPa/QdK8oeT268BuaN3iOlDV9"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201128_1606548083098_0.8443344295426782"},"_hasShrinkwrap":false},"0.39.0-nightly.20201129":{"name":"brs","version":"0.39.0-nightly.20201129","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201129","dist":{"shasum":"ef2ed77e1f3b2621d52d6bc7c7c340879b697256","integrity":"sha512-Q75DFnorcBA3V8wHqoAl+dBlDWRJxQNFl9uxDSRMslB4QMQdOjZ2gbPMFOPiYQM6eeb3LlviqC1wNPudknZymQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201129.tgz","fileCount":212,"unpackedSize":1312101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfw0xlCRA9TVsSAnZWagAATEcP/jp8x5yBLigZZHZT9hvz\nDhN80Li98c8H3qNylD8x4/ja9mmIwq43O5py3zD3hrIbsIKMElSYSw05g94u\nPr1GAZyL+lRa5m0nOl9CGWF2BTOhNJe7bzpFw47+a88gBGnsvLwtUAtHInJd\nrZDzZJ3mEJz90+O7+WGfuB1QNCFx1pBptGO3TZnP2XVbdD/pfa3Tom/QM8l/\n6qIcWCv7KXhpSzxg0lW4ktZVFsZpgO7cJ7gjDvRFgmzNzqNRaZHsfB/9Eg7q\nV7XxzH156GTQ3wtpllFh19ejWgQ5bxbwcWoRpO3lTB4NyAVmhh/l8Pgww92i\n5fFUA5Bxd4HnBTpkUl8OOAYimKC4aW0+qrs2bb4YdNOfYT7qrIH5jCs+MoJX\nwhhL7SFX/4GOD0Qop1tweTjUO4PPAEFCm9kbjt+An2CAX6qg6+odJvP0Tehw\n4zWJa62LMwg31tN5jxpWshI0vNCfOJOMYkcxQ3dtQ/UBNq/00s57bs7TQGK5\nMBab+lazOTurck5GQHU+ynnNb6KSIUbzmHVsxlLBY8gi0FEWOxELbeQzdltG\n7Crs8N5PmRbYdaydXCYg7yOKaP51vetnxAzU3xKGW/4Fx1q6It+852VZYwkz\n24YZ9zAuUP9uC2eXF3hFMZaSeJm0R7r/ttgl7AXdAOr1KQyW4S2FnnCx/2RD\njjsy\r\n=CRi5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDknLY2d/UrepwRSFqfDA8LiJzn9GkJX9Rmhm6Ql3mk+AIhAIt/awUey3A6b0zezfuEGCckRmLKU9ljDDduPLf3pURO"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201129_1606634597051_0.6164203095345941"},"_hasShrinkwrap":false},"0.39.0-nightly.20201130":{"name":"brs","version":"0.39.0-nightly.20201130","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201130","dist":{"shasum":"a2dc794009cb4e633d3f7d2002515283ff4fa355","integrity":"sha512-kYia5VaOjitgPls4TKAyJatMS9BNvN54uT1q7VAcYaedne4Cp860kkk8bklo3sfbxkcJokgCIc3C9hhuXq92fA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201130.tgz","fileCount":212,"unpackedSize":1312101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxJ2eCRA9TVsSAnZWagAAJDQQAJV9QS+vZQPjNjcR8ijR\nIEbZwhDLXvNJJ/Pjsis5/dT1PA1/tZEVaEOJ0OLQryWbRKtRz2gD8dGUiR9S\n8EzPofz3ODbJXgho+nTjXwEhR5AXVn+YSJL7M59COhGKIgc/QA4wFW37//yZ\ns7kOyYs6uki6N7S9Ce/ODAHYPtxgKkrLbZzaM7/WdgYAg5FCzjWzeSlcdTH6\nELML1sd5bwqdXRunLofbMJr3Nl8b+pMOvMYKmKYHn92Bowvk6DTn4ZVlu76J\n87biUVUuakzGKUG/IaQuFLLr0tR/qG0N5pCRlIORWIhA36ljoRSzhmjYpl8C\nyHz41/s5b62yN6btelqNOSv2LksGHpFlXiupqclieQVid820VS4mdgOYREvg\nHNgiyJXvo6JfRqnWuiLVNKRczXuzH3ROFk/wdZkycsYn8DL431mxtA4xz8lC\npQ54+c5V2jLrMlCaDL/sRoA4MPULrjv5c5KHgF456Owh2GkgEmHLpP2wGFVT\ntJK0RLUtyWPNDL95WU3upl0V79aj++p/ARCeIDB2jZoWSBUemDiSeQziSziL\nAK4T5qlsbn9baLBIE9xJvdo38P1zfP5dARiexIjZgDOWr1wuFYEhKbl3dDpK\nZ/qRM7CL/Aaly2PFlnGwj+B5ifE+LvjJO5L5Q5jmyfLSQunlwVuxvZZshP2T\nR1WO\r\n=3N3m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFyuvDSDpg7CGaKsHjkfDeMTbu91w2MDm76E+Kz1KWNkAiBz/hOdfAFjL4AuejydtKflHK1Xdws4eAq+iZc9bTss1g=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201130_1606720925722_0.5831515210722789"},"_hasShrinkwrap":false},"0.39.0-nightly.20201201":{"name":"brs","version":"0.39.0-nightly.20201201","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201201","dist":{"shasum":"71d0bb2c7749637d545ae454c6bd34f8c511a197","integrity":"sha512-b3sssRXcXjHG9SjGRKMiU9x5fDE8S7Um9LSBwOyfCr6XgeC1fWKGQ6waJkC2gfHqS8UbhUkVfgsRnbedDw3dMA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201201.tgz","fileCount":212,"unpackedSize":1312101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxe8fCRA9TVsSAnZWagAA4sYP/1Mx9vp2coGby7L4vCdE\nzzhhmG5A0q7fl+WdFoEvfBd9X7c+TwyEMUvqI5DiMv3LKV+5zpv95p2m8YgW\nE8SzC+gf5I9z2HdFLiUWwSe1luR0nRExZRFM/GgohRbTt6Sc5eU0+KAxGosC\ny+sMOnHH8KmpQ2Ly04FQtFKNX0zr12Kjfb/fDO2q/4GMLGWNV6ECmJCqiWuC\n3dqKXfY2wj2jBKyNFB0k7YxRL4EdHAxYDf53E8gN87K+ARf7r64oksFxGPa7\nLHEqqfKfm7KUatq8vOwE8TvrhtMc5W0DBdgNm1ZLgMyia3AQwRIuZtK6pj7X\nMjJGP8DHjxSafvB/Ehey9WkQusmqoVzs5/AC0cSPANZj/rEQKtgnVTmET16B\n/DCeWXkGpWie/MKuUxicXJbBT4dB4jYx/Oy4mcCNExa4OaSUVdKNbLUCsCYy\nM0aozwEngMfBsRz8E0RzaFZt33B7JSt7qGvgdMzsvN3MkLi4GyiAMaTiM0XE\n32cAw+NkzzcVIXa4ksEct41YFcqnFnNwrcI11owIuxDJ/haBYR1NlQ7Rhp5M\nUqrL9lqSIpmut9O6wtqFOAd4F3+A7ASGdnfokwYWN0sl5tMsX2ffoLJOofsP\ndrnCuA3YJgBfbme2aMgALygifROA4WSOj4DH5S3WglvDpBedR0SA+tHkfHZG\n7IE5\r\n=FZXv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzRgDxi1bVr8ywYyokoMO4hgke+/5mj2dPqOQ1/AvKdQIgKkQU7rIkEGkCeU8gG4CUzPPgon2bfbPfJWioDnxcH/A="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201201_1606807326926_0.7588347689588688"},"_hasShrinkwrap":false},"0.39.0-nightly.20201202":{"name":"brs","version":"0.39.0-nightly.20201202","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201202","dist":{"shasum":"69f250dec784b967aa134272d3a66dc415d3dd64","integrity":"sha512-zuLpnw9dliBC1EQk/l1crqHyhioi/9UYbcv8zzoGIzWfUJ4fD22KPYMNFlp55VMmAMNgmkmcGCybYbqAUQG5UQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201202.tgz","fileCount":212,"unpackedSize":1312101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfx0DECRA9TVsSAnZWagAAJfUQAJx7sJB+hm6tre5kaLxk\ngE7rq5iiXwm4cTIGlVyXYCNGOl30FQbWFD614nVhB++8eo63lH8fRY31GTlE\ncycdvp5QNX9RwjcWeWFVw8jT+RAmQXoaXZ3bRVdlPvUsVxJQjBbMjSUV0XAQ\nNy4Vvk2BNNDQ5lqj8ts8GCvR0TlHgdQpl70JMrVyN4Pey/+EqpnFLiKqUbSC\n5Hi7kYnT5LG6+KvfEaHBBGl2UZEF4I18P8myf1HlENvq2R1t6/C9+770vSug\n8YsSc/X9Izd7mE8Iq4jbdL4YWsVm3YVdgDW/hM937Hhrl+e+iIhotaWe8Jxl\n/hsfdwNnDxzKBS0wCTUNuDHWl5NDNe7B0oWobt/7n77DtBfBmw95pkOwHnod\nh5o2iuMZVegOLbWz3YA6tAF95btkI+q4Ui9VOFbSpiHnEplB/FWDZhQh/+9r\nE5U7+SCZ+VN7H8tuZUC48ylvaypGO9nYkP2tj2kQfI2d+iN2WrVqbWj8d1QX\nW2cNU96GZLFLithFYh7PZ4ouq2uumOmR70kkH59YWqaRevDy+dsLEm6BcOi8\nXYm1ajxiIYQnkUg9bR7RbFanku5So+69vH4+kbXfZlgATTjDw/Cj/SpIiNPx\nlEW4D3aMCxTsSO9yA96YslvoKR3Ax/B8ThAdyPWEx3lx2qxz2MlFDyRkuPx/\ngVcT\r\n=09X0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF8u/G2Nn4N7wBNvxzXnfpqWhlOyLYndXz/vl7gPgDUjAiAo+s2WFOyJI6Ck2iU73bk2JdSvLBfzGzI/tnfkoKBcLg=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201202_1606893764167_0.32372164580847707"},"_hasShrinkwrap":false},"0.39.0-nightly.20201203":{"name":"brs","version":"0.39.0-nightly.20201203","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201203","dist":{"shasum":"1485476fb754793888eaf50ad0503dce56780743","integrity":"sha512-BuZvqjd4Q3rgEZjj/0pQAsPQBxJXGGU+mGyw8c6Q7QOXzwG6ZuqmwlghoyCAAc+LQ9UMwpqVHWA9O1WDeIvM4Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201203.tgz","fileCount":212,"unpackedSize":1312101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyJJTCRA9TVsSAnZWagAAlXcP/RPgpeTO+wGPd6+R3/00\nayiT9bb1/xS5pjVTFO2xep1RQbgYyyfKfGLZxrJ3aDkkE/jgVu4uoiYztzOM\nVvOKJ8mQapjDu4HTupBtHGUOkHSG7YnOZJNHnTsIxUo6xWYUQKccr7xFpwpQ\nNEB74k6ZKxG5C3nXL1FNSL/8w/S7fSFEAGyRbRnSun6OSaroou7okWAdIGto\ndMeeJNuBBzQJtwEt8ohzdyHg8hvvvQQHhcKMrZQHOix2SEHb1kbk1PgzLzed\n3TFzmohg5RVMrAysYQ7ss2ULIHcDgZiVR07NVM9vxHQQGkGQk36HFBoqnqoG\nXSbKmQiIbNQy9bRhk4+nJ6bq8DW3T9hRRYmg0upS0jeAwlMVpJc0Fe9xh1gS\nGhT8LElQGNfAq52a0yNV5P6AuHp7OoACYxgo3P6iILSVWgH55CoIErS50X4K\nI+lggmUdEdcrTI3I3CLiqqx13nwXkj0WLoOijNpkqgz8vMQFbeYoq/yqNXrX\naqlImEcpnQkFAjwjmJrAGdo5LZRRH8iEL6jhnbwYwfbJmbqUsJJCXkMX1RNE\nU8e3nLyznCHKkduPey+ojV+uBR97wacGUgmI3KCuKuRbMumTYP28nSU4u8LS\nONxtrSMWY5ZoiSqJS5xpkRcX+9VoUhl3+1iBxp7gaJgqk0WsooZ421HhfrL/\nguNV\r\n=/C9C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEId1o0UiCQJQgwPjKNPa2kLE3zaRO+15/C81YSLv7tfAiAtzOE7MNFE5lKkhRP3eTLHXfEqx4/uVAy+TuVL5yOnjA=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201203_1606980178593_0.5291371451602143"},"_hasShrinkwrap":false},"0.39.0-nightly.20201204":{"name":"brs","version":"0.39.0-nightly.20201204","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201204","dist":{"shasum":"f14d7c5f028fea4c4a2f5bc1e5aeaf402837015b","integrity":"sha512-c8gTq63h6OxtSdEoJoCbFZtgflBCOgOW9sFTUj6bvmUEcjfw7XTDe1pMV5+pVnh4pKz4dx5E449NEe6tG782gg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201204.tgz","fileCount":212,"unpackedSize":1312101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyeQ/CRA9TVsSAnZWagAA08IP/0WRcTZNkynesxLmU4Yr\nFCCbhK/LBf2TGQQQertZa0Kj2NoMG0OLLwjGZ80aSqZZLBsuNQsV4OVoaPC7\nJcEX6KET3RaLd3hwEZWghZMWu6vxP3uw34ng4GAz+AlMRq967+eLpG7FQi7b\nvufur+PiRO+oxg1iFmsCCMHnPGWTZ8m4s+zvm0MRmI+YlcoORqUgRZZ/NaNJ\nK7LCfU7VzmuIqvsnDtD9SxEsmGBp86Au456xunT6KztOvA4DUUT+MLS1sdwF\nF6kr5WhTkzEaOWayxPRRUlAiaYsQsEgzlnSIFJZYj1mvFVsKbFqBS8pVJpfE\nYwihvGYntdFa5XrwvY1ddS210dFoxyAJXAzicnUSurQS9MNWpXPVBo0WXIsB\n9qCTDXLJ1zYbKAH2CjJombyr5mWUuHxeyGIs+GYJbcvouuH/4SIrdP/Ytds/\nsltfsjwe02Dp2U4zEp0eXU7tqQMkassZPsjaZmk7Dr+XPvig5+QzTAGOycMK\nXQYJx/DXCAY8QBHFaXTY56n6Skv8RGI8AmEeNOaYOhg0190+JC3gVODEgfxR\n8lMuOZzS5Vv4ejhX1g5hmBpbempQxT3tBGaV0w78Bo2Ym7vLgMO9AZgi/sxR\nOX+Qh2Uct0xDEb66UTsywj05G+HAsXI9jm2o8tMSqn9FoJD9m7XQjHATOwJH\nJZsy\r\n=Pi7x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICB/VNXJu9q51aSRKU9i8+DpcY0ioFjkcZEB2BqzwmsFAiBq841+MKZklnjjNdpi/UwMrZrW8N4MPn8+xZW+eiStqA=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201204_1607066687124_0.8184409562738941"},"_hasShrinkwrap":false},"0.39.0-nightly.20201205":{"name":"brs","version":"0.39.0-nightly.20201205","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201205","dist":{"shasum":"8d9717cb4da29fb81a0a51a7136788a35a8684da","integrity":"sha512-LlKaUIbXhhXULEtUKa5izF8CjAb9fcYZw5SKrHedXELVSoPTZCpgKZNUyq70P4+sG82Eak5kDrVenNLfAR5FSA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201205.tgz","fileCount":212,"unpackedSize":1312101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyzWHCRA9TVsSAnZWagAAYtIP/0TqHmh+QrFYDw8XATOR\nxM6KwyoZkof2fk7UhviFQalyJmfVcYASUmp4KiFbtldxxG8WvjOFnXKD0J+k\nWokdre5gn6lm8tOhi5561k7ZkvDHW5jApwPMcmR8vlPNVu5Ao4mFOza+b+83\na6iej4WtYHhbpvkhSUKZOLECg0FU0Y3LHmqqbrr2VZcQUy3s6ahYIC0kP9p9\n1o0mwaeHO47FwtCUg19vqHQynGKTD0YPvtrlDr2oDHMzkwxBgqAQY2xO55ET\n4UJzMCvub9Qk2VZ+u7gGETOo6X9bx784UpQsEhltM/V8zthDQCiyLIJoAVXk\neeGgl3VhGhQSfRrdO/H2dZgwNsvqzgxwp6a4BHHxlpxb19EIuAqMtAL6jNtu\nCZW59uWTklAR9Ml//hYw5240f+lVYsQYxd7VJxbhABOqRxfBTRsw2xTt2CPf\ntX3T1BJ4maAwk67kZafW3bv8QO0hy56SstQgpGZRC6RKHt1sj+K7FliryfRL\n7NWvis6tD05baXr94d/hBTRnkAu2GTj2ItpkA54a9YfL57SSF9VV9cMrhYek\niiHAFoED7SG8n/Yt2llyDG8v8PyYWUUTU6YYKzEknYgcAOfuLInia62axOf8\npnBXL57jELUXzPm9u4CXzDhuEwclwMkbf1HXj7dXpUTH8FGGZt7M4sKKOSiG\nFzhF\r\n=XgSd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICxKLke5Ag9oXVhqIgTzl1OH+0Y1urzdE6EOgOqWCAPdAiEA/nkFzLvU7Y2rvifLqqX5nzb9NEVfgrEM7i9CR933dVQ="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201205_1607153030358_0.7643866874929348"},"_hasShrinkwrap":false},"0.39.0-nightly.20201206":{"name":"brs","version":"0.39.0-nightly.20201206","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201206","dist":{"shasum":"0674b230e6160215f0e3d967fdd11ca93f452fc9","integrity":"sha512-iWlIFlxrReRfLlYKtH2fEehxu/PrLg1e2I2ZXhY2Ttfef+PI45knySvXTwnvxf4kpZoft05NdYOtq0B95SOV6w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201206.tgz","fileCount":212,"unpackedSize":1312101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzIcoCRA9TVsSAnZWagAAWvEP/2RO5cjfq7NA7NWcHYTh\n2pEwqqI0e9l6RmalIrmwbiADK28AVIfOfJZXhzy2rci6LuAp9tQ7Hn/epJPH\nfd0/Dhl60sEbppLIhsfZdZVSmk9HldsdWoFGro8yE4siHOWG511olKLc1t48\nqlESIzg7WZ5CcpyNibewgLb1hOwvx4dMV9yE+MNtyiQ83eJ9LtkMFCAWaJsY\nwJ8Q0Y44MbAGy03UNCrSFHKSr6XqYab8FKmmfUxCsQq7E2EiGTq3H/qfnLuV\n8Vez6ekO27UfO8S+4vM/au/QFGbP9sn+TLdM9ploZjkYfgTG2imMw+MMdrJ/\nNAwboRhrzC3YKPfQlD6LOvQS7SEzhx5pCtKtqsNwCTFhCQIh9FnabZpiM1F/\nXC/wNq59zYvdo7awaBvM6D2eb35EJjcORkOtXT1vYt19HzkyyJocl2lOpCh7\nvn4Z6qE7HibEh5xCIIuyz8fZdNWcq9Ux1wPcaLSUHK4tb08CRto+GDs0QyZ+\nDrduk7ahUwvN2Yw4e+qpjoyBnRfGIg4Un7wJPIJjMRhOXUjvmqGS28vYvR0z\nXTpudjfP+6dZRgb4wj022SB7O2JasbaGJ4GTVhi+udtjF6OZ9hu54czP/7aV\nxoM5fusI1Q2EnLF7FvDURgYgIfqWsZlMA1kaB+x+GJupAJI/1IVFo6LWYWhX\nuUF7\r\n=El19\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHEly/WNJ1SVfbXiGwp0Cjx2lTD6R8hk9UOI7DarCX2AIhAMixqrs+OO8xp+56mgCy5KCiCM3wc4RXVZ2xGOm6IbZV"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201206_1607239464170_0.43378558167372816"},"_hasShrinkwrap":false},"0.39.0-nightly.20201207":{"name":"brs","version":"0.39.0-nightly.20201207","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201207","dist":{"shasum":"551abd3460fe31adcfa9e8050aea192f0593a92e","integrity":"sha512-Oc8SknOWkisJ54yjnNGyYHz1iGEMYtIsLembDPz8QC7Dd8B4rYOz7zqjA5nmSPluuCYdhpO1gp9EX05d4MprLA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201207.tgz","fileCount":212,"unpackedSize":1312101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzdkDCRA9TVsSAnZWagAA41IP/i2gGst8/nb1ZxkevRkz\nggt0EGTH6qOzUqKD4AzjMlOSZ0iQF1eUxNi1zY8sMQyzHbgq3XslZ2+RLZDa\nyCYpVNgGmLp1GIL6cww32oFhRe/116BRdyJD9I4bGwdTimMO6n3Yokxurx8Q\nGHLRVD35j9DMXEvMxOe8xCSaCrA1cPJEtofp2q4YQLtlINBNBhBeiCLxr3Jn\neFeRTanSijPNwPZJCLyJ+aokjbAWMdnZtELgeaL24dcAdH6EzWy0S5cnD2cH\nNP7Fl4eVqsCnesaBU2YwS/lsc3P0MfsZWKYM6zViHMwm/6UrcUhiY0ZR7sZo\n/xcCIOtxG/zujdTyh7Zi6FZZAhfyDDkwx6MS/hy7LafcF6d28YrhSqysnfU5\n4vdzTOkd1qvnTdvCH7eAf1Y/ZN/gH1UG1ttod7hQPvj/pbdw7fJTRgLp/XLQ\naDq8bFZlIJmAGVgXrOYN3Kp2Y8wDAZKzv+V5g6pFbHFMzrLU2qzm3p8RsFp7\n8/KJGHHupv2wwQK7LwI9/JWddIQp4uL+mHPi5UevOkLuM1o/WTyCmPPysC3t\nirJYd22eapADLXnvazxjNlEZJr+WizBjLazckGxd4UPqLn5MlCsdhsIiQNoe\n/zNlGFnOshLn78Noci4iYagid5uvocZ/+6X8CBwkZXvGtK2EWVX98r9cED6M\n4YWy\r\n=UJft\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC36QWJdXL8uarjVKsz0vwxgxoPzI6TtF8p7ENI0sx83gIgeLBEPpJNmHdbjhPhcWUvWTlL7n2I2sz93Z7x5WVgZFs="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201207_1607325955118_0.2622537705797552"},"_hasShrinkwrap":false},"0.39.0-nightly.20201208":{"name":"brs","version":"0.39.0-nightly.20201208","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201208","dist":{"shasum":"48cda0f649854f3c1b0f9432e20a548b59123edb","integrity":"sha512-NZF0eSPSlWrTe4exS8AbyIuWp9xe5Vgh6IdaiIq/YJ3aDo+QQc2vlB3LbpCtAarmURRP6KksxjH+FLXvwa+oWg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201208.tgz","fileCount":212,"unpackedSize":1312101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzypTCRA9TVsSAnZWagAAgnwP+gOKi3BsUYiDffrFJ7Nd\nlroTykhOKZf+xk+9H/nhmlaK4vczNGIEnTeO3yn1fRrCG1n+kQwKSDN+csR4\nVfN47FCTmGD3U48kGsEPV9JjKtghoFi0Omu5o/MjZK/4Q3S7BN/9Cbwzz+dO\nnLHzPig2uy0Va+zDlPcNjA8ZP7yVyjeEHfL6sHLk9RUwTWaan6xcnmHyILds\nb+tPrVIxQKSiUH1PElHjV9kQwEytLnfYZDPu2KfXgnYlyQpoy1yKgWvtismU\n4gb7SiPPWMFzd1mmEtBi3ECP5NLKbu6sMqWpBe8pajrzCOF6sIKd05RVwCEv\nysWma1DSz8TgsMTdkEzB9eW2DPNOKDa3rmOx4fGOLTBletg0/0ZXLx7S6Qei\nGDJNmcEalV25DmdezsKLWzuDJqHNPfXHU5ambhqOghdvtkXmZfCHlj8vUr10\nvOSWT4cq7SygAKNLX+MbbYCHebwovqEOYt/U6LcKEyKTzYHXC1Mmg7WaJdja\noZZZhUsstfIvtXiKLb3I2KrCdU22krUdR87z3tNaQO9lXGgJrfipCViXd27B\nq2aO+owhvXkHeBSv+2zf4bd1eLeoyLq0r0S9UZuReKKBdGEWvbcKQ72icf+r\n1cqjaQbfQtBErvdd6OTj8TS41N1yqphZEm3rdrzud5G7v3BtVjNzLBv1rAh/\nbp/B\r\n=USNT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpW7wxTUrApD3mA1GE4F6TXeavveqhDHs9aklJUIaTZAIgD5cp1357GbG6AzABPBbzZeG9U4HfuKoaDa4CTzI1elM="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201208_1607412306534_0.8750415319693452"},"_hasShrinkwrap":false},"0.39.0-nightly.20201209":{"name":"brs","version":"0.39.0-nightly.20201209","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201209","dist":{"shasum":"59f76df4c5012cf1db2ebd985612c137d2977647","integrity":"sha512-+59kdYZQat8b5jwa7QqknRA1l5YfvfZhfM5xgqgm8ijlxZtsaw6IBqgrK/rOSrpNN9eIoqgf2b589kOc6h7THg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201209.tgz","fileCount":212,"unpackedSize":1312101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0HwBCRA9TVsSAnZWagAAJRoP/jJyJdt/h9vM3/IgfLrG\nxVqNSK2ItSzdNtf6Jw4R72q+alL7fOIDeQmJk69lC1AKycgH+QbdztYVAofP\nKF0xTMz6MCu2imZif+gviaJ2jrykWNME1gCoI+MrMykzChlMyC/skL7SLLqh\nlxadHO0kT2U6+XbWkqdnSn2H1MJlRG77Cp68tQVxNv9jnDDjx4hNQ1mI8cDk\n5Mf+EUccWYL7gsq1C+6DoUPSarIbwWD97METHmT6cL91+khqiFZZFJFClO2a\nuDLz55CfbOYc5j2Ar2nL3rMD4vmp/qHGbLYOiXPWkSnBCWdL41uXbvNGf90L\nArAUKrbtYlCbivGtzzy9ztGHdqFeCm/z9e2aYtlQL7ibKHbJ6zqK088OGJoh\n9vi63G+ILsv0ZIhqFQh1GmTvBWhTzkvjitpMDMQPKMFKt7d2PIkUj8pX1g7I\nI7JxFTd2B8+ZIg2ouiR5tunYa49vnnt9uzQXf2xK2kV1KzMVllwve1Ef4kPj\nZJB8/0q/+ftOcyZKXFj7osfo1xdnWxz2tnP+OXTZk9kE0AUbcYvVUKJuqrOy\nhETiiwaICoTl05/iRhlP1el8HcpdlBdY5hD4LRxAnvg0QCyqWC88S1n2rE9y\naHvzAAP4terhm9GsK/CZ5lbp4ZONE9eBi6d1J9ciKhyiAo05iAODyJRNO9Eb\ni6tl\r\n=9Xw9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFs8/4D/QqVQ+aZ7vIcVu4S3cpl7PHMjkhsuxxCs5GbwIhAJZBUJbJf191DkkOeEoz/fEUWGqoT2+U78IlC+OsjpDW"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201209_1607498752645_0.982162218588011"},"_hasShrinkwrap":false},"0.39.0-nightly.20201210":{"name":"brs","version":"0.39.0-nightly.20201210","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201210","dist":{"shasum":"6febc352dbf720a71550a72151b3aa8a412e1151","integrity":"sha512-oJ2B7bn9Z4XwU4q3UcdMMeLejBDHYFuati1XE7q6ZZyP76dbUXHw3sYN73PZmwsm1fBmvOL+m8Q6TOeBxy3mBw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201210.tgz","fileCount":212,"unpackedSize":1312101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0c0rCRA9TVsSAnZWagAAqfgP/3I6U4RvKRi6DreeHUFz\nEq3+0eG8ADoLOVe/zFXPu5f9xw9NxxkjiWPVwiLwpSpfRVUpofZ43nVxMXfE\n9m7Q39W/TbsBCwiqu+unmByNF0hW/wwxiKk1unPsZOacR4niJMuniKzWox5G\n2XpMDs6zMXhJjHIuZ8KE+xqydwrKZvmb/NiiTdBmfJFjGYiGc7kFGXJRc3Al\n2QE9mGCts+NtyDBViM3nRtnuI7lIQ/lbnWOf/m9AFPWABxkx++ZyNmMg4pE4\n91dHnohCU/cMTzTHllWSkKoOTq7ZpdMTnEuU20DdhZQotoOe829ejD8NxV/A\nCztjv9AVtyp6ez+97pAJDLN6FFujghGkDkAublQ8OVqS53pDUSjD9t9jgJVX\n3QNI35djWoD/fz5wQgUhm99t6eWPQef1mzgjnLO83jwglYjyV2cjua883B19\n6l/HMwk/xiJve80TlHQHMXQr4VNqP7sKCEJRIUqqPEufijPpkEdiOZgLkonG\neMhdPgIEQP2Vfy7S/Zap28JX7IbB7KStUieCo+/cTmU8mtu4u15MS17Aib9u\nfutET4cST8oMeFR3oM65sFh9uNw/hMqWT5QOXeX2ePm77/xTrU+yAXLjR7AD\nQJXQ0OOwKfY0qZDgpw7ursYXzam+MshQ2aDIf+zcnTmfLR5CKBCyfE1i56hX\nc1X7\r\n=Hyjb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCealjvaD0q/Zn+cDJLsFmkkxPSZuitF9TyQJOHJamyHAIhAPUz/wocXpDeo+2AR5aSW770VXMKimaU4l8IrWO68fKW"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201210_1607585067299_0.26282789145626095"},"_hasShrinkwrap":false},"0.39.0-nightly.20201211":{"name":"brs","version":"0.39.0-nightly.20201211","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201211","dist":{"shasum":"784110349f04683bb9e00b2a4c565134c859003e","integrity":"sha512-sB48zly/foEi4r8C5i7bo+ZLGg15qIF2powdnztH2+ZJJ5W8llusgwPOTE8AEXrjnMV9diy7sOyGUeyyjbIqFQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201211.tgz","fileCount":212,"unpackedSize":1312101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0x7GCRA9TVsSAnZWagAAuHYP/0k2QRoXYg2z+ywCY715\n4w/ejqhxm6oN3hoFv6mBKgRonZ+Dor7NoqemBmOYkwgZCcEPgC+Ilb1I9CaR\nN0B6cw7dPqNgJ2Eqz8/2QObV7SdFfx6s3IMlmXfDmV/bsOD8TxGrJgaQt7MK\n6Q5Vr7xHh31kDBrUA6RCWFAB4otfodoMlKKTH05IVu4HzduONGreai415y9d\nx/MpwCrKstPXroHJxELxDkdTLzk5q9GXQoUAdtETolxUaSxCBrSNPw9fNeeP\nSY8MknIix6e8szYHIK1Sc690DGD/zHcNbJT4cFsqL2FbeEW6fq2u+iny5IgU\nFHGIast4g8ot8mQIFkzTlhy9mT671bM8BeoNYJVXd2Aw2pXu+DTEGMOYwYTz\nD+oUzYUAAwONzUpKoKytlMb7BiEKR0hDt9VPr2YkoM21J5ciabqmBwCR6pkF\nswGJ40/bI+6n1myf8BZtDOnevqaLmirnBwGyyztyQqWgpvKKvvPiP8ou3Rqt\nl/8tH562TPe2EU3b3WtnkpWTyZ0gDQqhKfZQHptev2sUXaEm7F8JO9tSh971\naQFtdSGNCyGRwzwSwKlZOq2+RNFKt7x/VrJfh1a5aWp1oMUvTHyQyH3bIu0N\nSxOiSc+cfHr2i3OBLAL5/pX64npv45rcRDf1TlbA6+cHFhvPE9uz3jPH3232\n9Tl5\r\n=lqBX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGQrPJkna9pr0xipw6gRxVzPz1CFMcdxRr2ksAYNCk8gAiBk7Ogz3TCYwDxLFkG+j+l0Y0OJUpGtnhE6SMBmhyfNmw=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201211_1607671494035_0.9057850043702118"},"_hasShrinkwrap":false},"0.39.0-nightly.20201212":{"name":"brs","version":"0.39.0-nightly.20201212","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201212","dist":{"shasum":"c23cbe069778e88e34d89954f841c2034db8f043","integrity":"sha512-hc5QSUqBjJOeiyoZKkOb2VBTEJQtpALfi4XJO58H2SNlOXHSIU3c2PS+H6C2sHdNBfjJKvqiXF2Et8ZQWabffg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201212.tgz","fileCount":212,"unpackedSize":1312101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1HBeCRA9TVsSAnZWagAAr2QQAIml7mK/4asShRRU48YQ\nAJadjIz1zHmwc4mK+jlSW7iWBi2SMzLk3nwCCZSzCCJ2d865zjWXppXqh8ko\nOdpse7xQQXI24S+d6voBm0X2VOpugp+H65/hrzmNCgWlZcFHjux97queyD9n\nak16mFaYxWLL4fjgaFamcGooJe+JwHMZ6yIQEkjTxgeXf04uMVRJR2erch4B\najxH61MVaaALCTP2WifitWxKekYbtrt19EAiXxei3tIVp19I11o3kWVJhK7M\niFJscv8G7wZFxoglTElrPY+ZuOZgRpVuHdrJyduAZJxNZyaDDRfljEoYr8I0\nv6OoH1ue+Wry80Kb4JmVqoddsDLIpUZ4mTJBmQGjKbqvA4X6hTBcsMQpek7i\nHvaibaQ2wL7+9O+4Dedhv0XMs6gCL9/QUTXhvzJ6M+1A70WnvDXUqhzqCTz0\nJ2o91FooEFof0gLlBfwQPSLfsSecwkwV7hT8QzHv47AltPoZHt24wjDc0kew\nNaoK/Dzso1uFNUaDfgHVTlEhHHOx4f0d88MP/kZdPw4kBpdosMcBkI85PDzN\n1cW9/rB29U5/7lFNRi4i6Jp7Gpe4IsFWHYKYI6AjRnWDR3KF54/SxCMDuZSK\nIGKkgv3vi46C6bT1fknYzXtqWah6jrqXLwu0izReSzqaa06LlGmXb7bQZBi5\n9BhY\r\n=Xa3j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFzSF1c8a/LeNRTyC1JQSU2dWtGe8waOMvwqiIvlPVkwIhAJDJMaG4iRZGShPoIP8eZZXfsxFBt49Qi/sv4CJrn8U6"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201212_1607757917496_0.3082055907780852"},"_hasShrinkwrap":false},"0.39.0-nightly.20201213":{"name":"brs","version":"0.39.0-nightly.20201213","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201213","dist":{"shasum":"55abeb6942a51912519369a5eec907b694be6102","integrity":"sha512-6Cxvh4Sjt/XpHAEZ+JVWCHXllWY2CNg59r18NN757vQAcX3O3O7Zb3SYAA4FgEzJpyU6J+OsLP1C2BOqkuRBPg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201213.tgz","fileCount":212,"unpackedSize":1312101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1cHqCRA9TVsSAnZWagAAR2YQAIC4xvunMc4RLJRk2Rcy\nSplER4jG0cl5ctnTamjxrJvv070rUrffvFgEhCnDoOHi7SmViK01vebv4nNN\nVVkReU/riJC4qDWGg2aRAcenKPWCSbRhIdY6T+22rwgsNyzWrx9gqYTxoSli\nAyWDkuRx/lvQLhYAuUZJ8CcSPD8tQ5kLpAjapb2O5D+sd0EDwzxO8sSIehgI\nJfp+s7HnS25G6hsbdEtumXj5RtKhnYpwiM68n5A92G5aUYSw2W1i7fOUzgFG\nfhw0Nf8fWg64GlRrvhqvd7zoUEZxZTiNbq1Q246dOFM/jn1molFzP6bbqjyD\nDvwklxFYxpwIWHpo/zfQ8SmhzchuuzwMtZsE+J3dNBBhl97qeayZaXjlCjkD\nqjyTNyGBzjC0504qopQh1i6NJhzIxR2m/JOnfa8fOZvsqgSIraB2GvJxRro/\nSfSpv5oBnqasGonVB+LKftJBRRf06akbx4hwMaChgFr89SpHXGDc+3j9MYVi\nAXgdOHMVIUtBD1W3ZTyxyPoJVtmhnUiPLa9IDyW3Axak+OI3AOm41TQyeEbr\nLNpHzdMbsIfue4oOmR+vSbk8wvQ0QlNRvVtthaTDGTN3OjhcItpmY/q1QCe2\nvNWG4rhEiqYc/zIMhdhuwvU8/FbDW0COUcStPf9iMOq83p4b1hgMlkv3cjKJ\n/XzC\r\n=OZHJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEL4YoaB1aZKfoMrxSx/+X1YhHBE+U06PrcbeD7Up/sJAiBISY34uIzCwCFSV6T0DoY6nhxinNtZNch7A588cW91iQ=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201213_1607844329470_0.21169313048459215"},"_hasShrinkwrap":false},"0.39.0-nightly.20201214":{"name":"brs","version":"0.39.0-nightly.20201214","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201214","dist":{"shasum":"1f707813eda99cdb588757cbc3721b87e47f1077","integrity":"sha512-tjizvXmorAUGM9UhyPFPAffoDti+Txp4sZ8tOZQXWsEAZgG4jug2R2+BLCr1QR6bL40QWU3FCk2eqARLuSE9eA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201214.tgz","fileCount":212,"unpackedSize":1312101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1xTbCRA9TVsSAnZWagAAhtgP/0PaQziLQAdp4l3rLh7a\nsrgv4RQym1/L2ZXeuIgmvqUzbZ1VNnyBaoGZcRZFnG/4wyFsO/FO/EPAwt57\nN0jm/y5NbVCpkWg2NmoCHysXV7MB6aZpj8kbTbiONXekUt2e0Vxnntpgb0G0\n2SUMF3Wht3ya3yAmT77tjBbVQ0QtzpdQTKiX9XUzup4UUz3tZ/or42OGFqVh\nJ91LmeN7OOnmn6hyKeYgG51Ujt/1O2ggV6wjvT+saQ+CGWQJwb7X+UBRMpxO\nbRY0RT2+W3wNuhedX6Iyg8Rthd+s2VmA2GHS+FSlQQQE504xRHqmEDHL4UeS\noxqqdycQuiVA5+Zmd/5ofr/B35U/BN0JgYjuK4MfmPiohG+Qim/eULkHmZza\n1Da6Bwe0GhYF39Vzry+nsQUOM4O+XTRRJ6ozpmP0TRx5Y54nkeyI3HO5rnbt\nTsVClY8KnV4ZoP8ByYNbbSiUuYacElhvtjgV6wg5asxXBUXPclp5PNYdjvAc\nEOP/Lc/x9A2310LNigNjgW0oWCgnLHSu6a+GFfFYHio47eJf9O5cfdgf0LRm\nBP+QMCcTJ9eoDS28oGreeIR5GUcAwz0MqdBjg/JVLzXOaO0q3oJRxzcVD7xN\nQMBTETCAqTScfjLvHyoeFma9Pp4fQveRuFeUcSy3YpBrPtmPa9YJdSRDmmYB\ndqkY\r\n=3omW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCoxlmwtPOEbt0uncl7sLzJq1NpDn3QUVxYufLFaSlSOwIgVHc+NiQQ5mjswYI+axjgb0gKKGLGjkeIw0zzm50hFcE="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201214_1607931098914_0.7700252675117003"},"_hasShrinkwrap":false},"0.39.0-nightly.20201215":{"name":"brs","version":"0.39.0-nightly.20201215","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201215","dist":{"shasum":"412716e8e032570d229910a1ae13c66fe13124be","integrity":"sha512-GpB4TeKdrBrJ+JM/56DXFxtKeN/ZwVzhEnbVy4Ss16OODemxacDfctEfnkYZ2YCUuIvKBQ6nB6WSi3tAmCUx6g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201215.tgz","fileCount":212,"unpackedSize":1312101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2GUMCRA9TVsSAnZWagAA83gP/AiwnqHq8BlbGZOQKWwh\nteepXblJO2your7e08MVrIfUCti2EthzQ6ecnAIPqkWzXk1WjLkSSVgBtxoP\njiXZJVfWKC5yaOgwml18nwC3ZCU9VX1R5vHjyDXOtyvt7D2OSUeAriTECV7h\nbUD6SPzSAMSgpVUbMPzcSdhdsniDCXgX32YfyJJcuzzPQLPTk9WCvANqm+ul\nKZVE6dK3OU+BideaLjJPpxG1urcKnolpn82i3Euot9Ps4iwwwkuefnOVjmFn\n4O12lVP7OVz91w35wjSc4n9t5YmnbLgrmzWmsH3MZ+/WA10pbMOyFLemfy97\n5zEDgg5rbAl37/dRElB3k0iuUD2wq5CNhM2JduQ2Kg378D/QjlCnutPLipet\nxZPImqUQh81s4VbNoIbfmyQQY8BLvEUh0Lo7FszMXsIQo2LlpLkn/IDcW6+U\nPK+kGauf7uexeJ3F0dEDjFWcRaRKEznhHpIOxS4LeiPBPv/ONrZpjawydoQm\n3GsdIEHUg8RFKTWgVfYhLFegHB5z78Z3fSIy1fSVVqeKPyriutb1gTmLIUTQ\n9EmRQDkTXbO0A+oa+2iqtlOWVfIAnozTi4BW3NEG6kh+67MW9hoDJ1XsZhXB\nVavw8/ykJxeY6PUT5dXqGaxJbzf7mevjWUIialcdMRwwYvwCDOLvIPYoAd3f\n65iy\r\n=lUu9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB+euRrrB7BA0i506wMmLZOXfbjMhjNmDGWF2shKi90UAiALj/6SwZmNoWz47B/OrJtykvelFdMlwjR1HBlS9tGpwQ=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201215_1608017163601_0.3587713734030977"},"_hasShrinkwrap":false},"0.39.0-nightly.20201216":{"name":"brs","version":"0.39.0-nightly.20201216","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201216","dist":{"shasum":"22caf2daf1d378eb47ae01633e1999547039c965","integrity":"sha512-FTjjjCGnSWkUW25CnkEi4lL3GSdi7DX/W5G/hhxzsaG3v0+mDlBpFzAU+no7qK/Frj5L1SUj/vpP6m1yYNKczw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201216.tgz","fileCount":212,"unpackedSize":1312101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2ba8CRA9TVsSAnZWagAAUQwP/iE5uWX9LGnTsahLvYOA\nBNuwbTSJ9NmFWCifYozj5fFefyHbbKYASJnFQ42XWRD9Zpr+wNGqw0PzzJ6R\nLawOUl03W4UjC6Oj4RnbXLpNmE1QHDJNEbiDUhpnrcoWSWS2002UG5aC7lCP\ntxCLjfISkJId00Nz6N2t0tgIME8kLdFQkFXtRRPjVI9d+VFQgQnBrthxBbTQ\nAiPCRb4dRpTJHdYm+cPKosTyj6JRG1EjQQBJJjK08IxP3eEfWtM1GsbLLGtN\nvVONf24ezuSfb1wQM0mDc3ZfPGaZApWdDJWux2sbCEFrPMs/yCxNF6jITAXR\nWmTx1f72GQqmBIF9rnZXC35FY2Id0hndpGEwd3KUJNMG0dqEfL0OzeccnjmN\nd+mDRbhJqt1NBnNQZtrZDZfQbk203vlZjHBburj5EmxjewbF8AacSZkcEu2N\nGMnqIRAw30VpBZZIMKHAHJVFtFj4DUrXdr2CKq4vZfhQV4u8sRNjm7/3WOSx\n2pis0OHSd+qgWDSg159OAS8jfwwXD/jTssTv/SS+0TApNrBdz6qBx9Xmyeyd\n9wKzRKl/of40SNtj3nqC08zm7UILbbSap+w2ZVbwKWGzKxbXEnUuWt1DXft3\nvXZY9j9C+EAURpXrWItLM3bt3oMaOut5tHbX6ztuFyY68Inilgjl2wEN9p4n\nivH9\r\n=jUlr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBaHDZ/GbFOqIGyLBGwCzVGHSzhaCKCJRPW7pfjiJr/gIhAOXJjYRvfHXCKWXJwdgjC2mDa45Y6q+LP7yQ6orEIe0Y"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201216_1608103611632_0.6978393416387989"},"_hasShrinkwrap":false},"0.39.0-nightly.20201217":{"name":"brs","version":"0.39.0-nightly.20201217","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.39.0-nightly.20201217","dist":{"shasum":"d30007e39ecaf4a06d14767914aa2e64b6be8890","integrity":"sha512-QOqXgHm5qDSCN95BppZaiBKoXuVEpDuj3aSWdFdY+5l41VVgQ3ufbHdHil110H+wuAJXr/jceCRZAEdJx5hD5w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.39.0-nightly.20201217.tgz","fileCount":212,"unpackedSize":1321979,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2whhCRA9TVsSAnZWagAArM4P/0fC5SxKHTVZ6lAM/B+x\nHWbV4kJZ0PWvxb6BMlPgCyn+7Rh2B9I1vMcOXEnHDgPotMVSitVdQ1xrXVHj\nDQr+bBnynlcVgy/gGv9hWLCDc5MHJhTu6Vi8puBjLfAUMhdaAdVMD0afL4/7\nlwIXoKuYdeJ7emUwpUAbtGfA6Op4KWCzIZFnD5vKQhtOOS2kg4Ikpm+iLhdA\nPPJ4TgGNTNSwqzoMIvx7zB14SL3BcYWabzQfBEdUUh2a+mLph2UKdtLMF0uJ\nrNFyLnMSUSUj8vMleK+tQxa4vvGbrEYGovTdZV6hN/mCMdY5vowBQtlgx9me\nFnZxeCidCrZiC0KuCNsninkRiZqHEcpUPPaZQzxwR3/tAcZYymlV/+dVKNEe\ngLOZlpBHk9o+iCV2CS/X36rfXNFCKxRjjFWgwmjECSBvQu563/5dNkp0j5lN\n3YgJTYusYtfb3T7qgdUl7WjHteLKPu70yYQzUD4ivxv9pnRMgf6t/2w4LH+8\n9peNhFhtZlVXy3szG1qsZ9Yajjx2frakWhEA3phCjEFSYZAKXC8tlJ8xCqTU\nGquEDlbbpejDQH8icNDG+GRCECvuJEozlx9zRH84fxbKblyQwiUAkEK+3sTy\nZT0S4YjwGciHH5MIHrq9yZwG5O15C9UFMkd2f2ecyxwLkhc1/DDBcrp797+K\nWCJG\r\n=BgbU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOD2ebgZYHUJvPIJnpAb/b38X5lFalnvp4Mj3j/smiygIhAK7BVTuQ3Dh51ZgurFscPbFL3R8bU0ZtLds65HxJTskx"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.39.0-nightly.20201217_1608190048690_0.5984662466208965"},"_hasShrinkwrap":false},"0.40.0-nightly.20201217":{"name":"brs","version":"0.40.0-nightly.20201217","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.runInScope`](#_brs_runinscope)\n    - [`_brs_.mockComponent`](#_brs_mockcomponent)\n    - [`_brs_.mockFunction`](#_brs_mockfunction)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.results`](#mockresults)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n    - [`_brs_.resetMocks`](#_brs_resetmocks)\n    - [`_brs_.resetMockComponents`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockComponent`](#_brs_resetmockcomponent)\n    - [`_brs_.resetMockFunctions`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMockFunction`](#_brs_resetmockfunction)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.runInScope`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.mockComponent`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n### `_brs_.resetMocks`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.resetMockComponents`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockComponent`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockFunctions`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMockFunction`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.0-nightly.20201217","dist":{"shasum":"4098a78d8732057df5fcbd69d4dfd52957c4a0de","integrity":"sha512-NPZDFfkxXkX/JuQZdH97iWoDvaEsOujkDnZnJBhit7FDJXWSaj4BJ0SZzykKJikvJ2Hk6Rxa4iI1G3uXGofgXw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.0-nightly.20201217.tgz","fileCount":214,"unpackedSize":1329814,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf24LdCRA9TVsSAnZWagAANygP+gKT5DqqYcXF5+06Kcd6\nq7Gp0wVKIFpfZ0WoYA3J1WApAi409klyP2fFWK6olFXwyEBj1dOS5QFkgqBx\n9UuD4c9Tad0GbCrxyhgWkYqoFPJ+be8kSVivrS6Q0OEINxPv4D51RLLq1T1Q\nMBo/wVWNE0qUS7vADMiAW+6wSDDpolyt/t5jPKoiCPWb2Tf9NIoxRoa8u4JP\nm7Tqyk0D3B2YakKOriyGjVthH60HlM4rIKubuDDC81MYkkzf3n7yNg/fdj2e\nzYKD3WHfo35Kz3P6GnSXSh4WQYjJR3sP7xo/iwKwegd5Q1ALSLOYhLvF5ceB\nNjU4QaxDGXFLrHipe/421vdZ281aXP/fQ4nXGaFu7RFqj1+Qk34HQr3iZC58\nZn3rwwIvKjQ6anHLWvEpRBDisPSb76siC09ijSVUoKuiyRrKNsJ1aI2FPfiv\nPr56WrB6bkw/IZWMdSSMt/sMNYEpfZOfwNoXsjLZSKfT3WhoX/IPMRATEP9a\nDwNClOJVt53lxt6Ffx4xN5fMHJ77awwIh50cKdbSLxaTzSQphtWA/5nj82b9\ni3h02HiuuhKrYJbK061hqS8fdrncoXaMP+3DeQoZDpJZC+tGCFZRJOUMxlZM\n/NOwNm5h4UdtyvUHY/D2uvxIrBJz2Hd/oYSihn8G+EFgmyzTeI1dJ4xwmQmh\nw3o2\r\n=xElV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD84c+LXyqQbgywhTCli2G9ljZieI+78UhtF6R/+knLkAIhAN44z9LKft3whTLEYw8ovUmKW7lIpzc2WCM8II5wBizW"}]},"_npmUser":{"name":"lkipke","email":"kipkelevi23@gmail.com"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.0-nightly.20201217_1608221404620_0.576436572914006"},"_hasShrinkwrap":false},"0.40.0":{"name":"brs","version":"0.40.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.0","dist":{"shasum":"82cfc2af153ca0a132c7804ab8d390b0adddde10","integrity":"sha512-eLhklNv3j57YViQ7oZ6pxmCq1OCRoMQt8qLxba19ecdziwOSHMVB4rugmuRlFMO3tHio4tgSjsIYevsk007Jvw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.0.tgz","fileCount":214,"unpackedSize":1329797,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf24MLCRA9TVsSAnZWagAAsjsP/0fVmq7E1DLVXBHB/0IU\n8Mjo6gnqXKFduvtN6Gb8sp3hoGnHAAaP4Z75hadFagwXnRNAhdX9Wa3kHcQt\n6ROmdGwg/YyBD0eQghQ6e3Habl9TTRf17iqWvrD0LQv/iUw46Qsp/ao3kkkY\npT9bZDZ4aDIfqVc1watVm2FoxCx0Jqa9RQ/2rD4257qLoIh3ZWQ/IWc2n/NO\nTDq49yif2fpgRpFFdQcPmKUQuYbFKCIxBc3ceJ6qmsgppHPe5Ls42kFYjhCB\nYCyMOT/CzpQ6gyZmJ3E5fTZNeeB83T7GlXCuR7e/iwpXx1ndHVVRz18n77Ur\nPsOpzOxa/TA0YwIMtia4sxxlIUtG8btUHWkNwKODOdhNYglGMol/GDyoItY1\n6log7FTEhF/3vtd/C3E0s1R6qIq5Fn3jVw3/4Mog+87NAUzdkItp6Viuzes1\nMYH61tpNCcUOwTVVRZrS07l1jd22xr6J9SKcnd+fqFxDCBGr+I9v9iDqWK0B\nJM+AnWxd7keVFwymdTvDDHtHLvrcRRk2MR2D+5bE5dB25hMW+/NgkwGIBOQ5\nJDaDcNrIYZz/H3Zr8N6XfLdGabaI+4B/3AJjaDdSqYdedCTkBoVNQ4ODiOAV\nD9euzzqK1gSxTxOYmFawr9jEf3YPNMZMNMIIfz43lKz3ZmNA1dxiS4LWCpbU\n7qTn\r\n=OTZL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFPfUn3TumgEyANnU5rvVT7ET4i4Nt8nr6PCgbdeFOVJAiB9pwoDW4SvtTFoyzFV8ZQosgphpZx3DJIQDC5bRZsx2Q=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.0_1608221450974_0.8411149543862377"},"_hasShrinkwrap":false},"0.40.1":{"name":"brs","version":"0.40.1","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.1","dist":{"shasum":"4d836574116e8f13cd7a85066cd082be11519032","integrity":"sha512-6ne3Kydl/Nz0sAImAQmI2yNPDUenF0Q0YwiRb5D0GKlUl58qeSnkI1nhOXuT7ZHn5njojsQkOvgQwKKUzg9afw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.1.tgz","fileCount":214,"unpackedSize":1330592,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf29vnCRA9TVsSAnZWagAAkSkP/2C8cZZuZw5WH/vL/KkK\nDgE1tQHSOmlpooKIEaIlVYrRXGcetpulCf5PLN2eUmGvY5tx/HPg0ftngwM3\nLqKt4wqEYQXlEezIwqQA2S3faZ33UaiyP5cnjFtkT0BFeXRL+DHKgrrtys9i\nqWevgnRMweqcT8AtFS0wF1JKk0+QXXf8hYPUGHrMea68DbDFt09uzusZEvoN\nzobCe21KtilUUkzl0z7HCzwg+bokD7U3+zpFyXYaxoXHO/rXugXHodydhSYV\nEKzGxTsWYoEiMpdjfKKBaZoR9kgXjQzdwzf8ecYS5kvZiOpfzM0w+suGZQU6\n9HqgqWGDL7Iti43SF925X/uQqwGdmBFU5Z1yYC/B2/Pye5yDPhvWXCIeyPjr\nLGh4/LGqp76msj1rNFWhB4k6vsGf07EYo20OFq3CllimObmwYW5VsYpq0bcR\nRKEKmkamT5UhOTcQhXmV+tzxQRHU7+9ts6uOsQBB9eXl9tsBNBb7zx7uCuxT\nD2os/Ii/VgLHa+evNKb4T3yW81MtIC3CSci8tIsBpmO95AuRqYqdeUu7Y+5Z\nHvEh8imeKvbcaClDPo49TEkME9yGgNYHg6b4eqOrIkZZzvjw0IwmtSPZannr\naaKCCwWd3VRFblR9OHvzvYJiDFt6XoKjN3eHZZ1X7poNe5W96s2kortc+m+m\n4uRG\r\n=13nu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhlPBJdKE+TNGWSMHCQgrC81L1rHGrt2wjymJSHaMc2wIgBN+3/KMDlyVGBfbKc5ODJ63R75rYKAUZNW3jh53je6Y="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.1_1608244198840_0.9328739158637578"},"_hasShrinkwrap":false},"0.40.1-nightly.20201218":{"name":"brs","version":"0.40.1-nightly.20201218","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.1-nightly.20201218","dist":{"shasum":"fed02e1ea75c1fa9d280884a28df3031250bb084","integrity":"sha512-Or9nAEsejaOxUyrfvVDu9rBsdoJRaUTdJxAbyUpkikYqmWDN4s/vkxAaFfjWHbUHEqNXhBRCPJkwMPCbajizPg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.1-nightly.20201218.tgz","fileCount":214,"unpackedSize":1330609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3FplCRA9TVsSAnZWagAAxgwP/0ONdOlQxc44SGC5rubV\nlMpHTGKCLQawzmZjJdUWZZAdXNauB7xWxWvceKdM/Gpgv8APu6EgGbY0Olsg\nLqpvTzas8y+ghop1YQYxkRWUvN236c60R93us3AxRic5HWl1NtLW0MDdmVOc\ne9oMDQNgGt3/kio9Sc1lB34NnTAkiJmHcNkBpsDjILJSQA2SK4waL6qbltTY\n81LTInruFK9l3Oayu31EAYlx/TBVXreWaSn7HyojvH9grkhLXDdDeXzmbP3X\nOYxXJ7ixL1yC07xKHpp5Nca2qjqAW7kZHtDIMuZm4cU7JbaFgJZD2InlZ46M\nJ3qG86xv/+zqCj1CzMvVHW/0rWxeBwWgPU2/u5Qh7qvR6SUUOi3SIOecnP12\nbdFnMFL8Aoiz5o6gQuhUYJbC+kfu6bSTyGoNsIlNDUxcWi3duTLJ+1o0eh/Q\nnh7ARwg7krbcbHAeunF2nrzlAsBfA7cMTP3k0i5pICX1+B+5R3IVGECK+JRu\neIupSnXkLCQryqKVQoaRoIwhK40af0GaPXl+/BACFZMfyE8pFcg7soh50gxR\n1juYh1UYTNk29vgA/x7aZmof8QHOJmuusWGCc+ufoi1AM+zzPfXJxuNeNuNl\nEJd10GRuxwhwDEhy+M8fcQuaGWIHTojCjpl2jOBOnPV8RGWyO/Q8TMuPc3lP\n5nQM\r\n=UpAH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIATTkYS1LebMkrru1RBNUD738J6HKNhjLncZSTul25TUAiEA/FWSPdc/NUj6tJIlkaEtphnMrB8nUaNsU93SkECXWHM="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.1-nightly.20201218_1608276581224_0.9293539290561441"},"_hasShrinkwrap":false},"0.40.1-nightly.20201219":{"name":"brs","version":"0.40.1-nightly.20201219","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.1-nightly.20201219","dist":{"shasum":"89714cc20f6ee1caaed5cca925bc22e7924e2b35","integrity":"sha512-7+ltl5BGvHjQpZk5fP0CzxV3LBY2vKSoeAV4n4pz1Z0OY9ZxuTKvvH7aPzqAdrWO5X4lvlkPDavCHXr3saN5Fw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.1-nightly.20201219.tgz","fileCount":214,"unpackedSize":1330609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3aywCRA9TVsSAnZWagAAOLEP/0ODPBGrYcx6aSFxBgEY\nZ3W+er5daFAyUwVheK12WXYVpw68TO5Z0F4gy6sYAuD8TzE+rf85j5+Egt3/\n3ZJAgILAZD+/QewT6cABKol8GM808/44KqVE6SSRYcobct5KNxnCHvKd1wSO\nLlHiH0EXU16/qvphFAiZ9lz0s5e3nj5SNDYNT0uS2EVIGt7RfS3jWl0C8oHu\n+L/+SBZXCvHc1ps/AsyCi/P7zFUX/tUHvn8kllV/3JH59FJF53gTbMugnIGY\nmwsAYfHNuBc2MjedJVQ5Ao/QcqlGnvCJ/FBJ1t5AJwkaX0BYrQ7LZiBI4BPd\nwIHxIIM+Ro0cRrMzeaMkcFfW3izbmuWTafmsccBcd7KpbGKOrgVCTX0Gns8i\n35qzT7It657EGeWFLCLLMpik7Sw6Uy6Tms3VBUizubLxk3hhfMNeQK562IOk\n0lCGa1payl1VGNP+tp2wKs4+QJBGZrt6wX6krp+8rnoU4jyPLWTRrJFIgk2O\nTV6SU2VLM2rcXgaD9H/7Feth8MBPHi/04e0WrahnHX167oLBYiZW+j2J5Mws\nFG5oIR0s4KvTWIDwAuQPm+HPkE0HPoYGHrRPUAUD413w2clg+Mm5Tf3KK6sW\nji2/f7mG13qJQwlmIar7KCr0h3yPuXSDBAp58yfXv10w54GYyCty5IlhBOXH\nStr6\r\n=Z5ZU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDhyOHaLaTl1eWEgrAiWbA4dhmQMlmzxdYw9umdQ4MOnAiBX/Ee2ggA/pMTjoB417c2BEysUv/NDlN5BkDeRxOTp/w=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.1-nightly.20201219_1608363183830_0.8391771063857121"},"_hasShrinkwrap":false},"0.40.1-nightly.20201220":{"name":"brs","version":"0.40.1-nightly.20201220","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.1-nightly.20201220","dist":{"shasum":"d250fd4f6bc297ef3483e6b0c90f0c992b89dabd","integrity":"sha512-Pg2dfLu/OD0GLf6z0VOfctCskkanGRYcTGhybOK/hZiVlqrulnnT2OfLi/1Ch8Gn6ojUmo25xe9KnxM0jgWmAw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.1-nightly.20201220.tgz","fileCount":214,"unpackedSize":1330609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3v0QCRA9TVsSAnZWagAAizUP+wVtRFCJ8pcvRyq269H4\nbqHvAWIUgyOEeQjIZ9SwidYQzQXmfOV8wzBRSAN6c2eAN/kQLJa4l+FGYL+b\nSth5Xt+RdeZ/f7nTKAHSyRb1KAAxpe64ml/D4OgDwxgDETcNl43pHqkdP+XM\n5xOncdgGWpw3RdNmGQaMIzDs6OlyObiL9OZGnC9AFYvbpXv3+lZSr5K3HQrs\nQu6XGLXEbOMVsroEyFauQGmnCPY7GdY+yhUzUwHo5Iv85KVg10f3v904DVC9\nTzpXhhm41Xi+9QNA9Xhh/D5JiajcmH7NbVU1phZJ8/Ur2Wo3402tFVw93J7K\n98QnzhstXNWHbYK7H4ZZyYo0eNm82/cPfMsOr+a303JyDdRfyBkhUoYJ87XC\n9zrGii/AVjDskCxkP/0JvsLlpLAys0i5tidJah4XictsGqYrTDbiU6gN1LJf\nTz/3Hj+sOuJc8+qBiSikpVz8PbeL9+vX3m3RcwReS/H6JJ110AvGBs0z/htJ\n4LoFr1qbTs+2pr55q6/0gMyAmUS6e1q31g5XTQSgVh9tKU3sO00pUNvWkZBJ\nbbnYaCUKrh+G6k1HB4It+hkd++uNLOkdJYgfO7ZweRiY6oBXdBAPzzPxMDq4\nrnYTosg723fmHQWha6yDQ6dxzNF3K1tHMpC9ok2JaEGpTFk2D6p7Wjnndpp1\nAnZ7\r\n=K++n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGrglU7puKzVhcfDIZVBJ+6jB3B2IvRuQ8mp/J6jEte3AiEA1s5uRSGHKR+e8EB5TmaFSFBKzWtPeNlKaoDv53SKvu8="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.1-nightly.20201220_1608449295695_0.11798969961507755"},"_hasShrinkwrap":false},"0.40.1-nightly.20201221":{"name":"brs","version":"0.40.1-nightly.20201221","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.1-nightly.20201221","dist":{"shasum":"59eaa5ffb8a427290a7178f19274913959a57bdf","integrity":"sha512-OBeJ2yldbTm68qReOuZLW0ra/wGafBFjxJS3+FVdZnVQAKJP31wMuS9AlYdHWLjh0iNzV5P3vKDQlVdzik1wBw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.1-nightly.20201221.tgz","fileCount":214,"unpackedSize":1330609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4E82CRA9TVsSAnZWagAApeMP/28fxGrbGRClOX3tWbdY\nMGk3JXGmRXcw4XGhY/CANRRVz44EyHOlBIospt1/+RVXZkODqXmE2zv/h7Ij\ng6Te5lanDRjITTI9tLIFbXH2hs39RK3ej8L9medFv8h6YjlGWZ3WPt7jKuYl\n/UvZC6FNeKZ8SkKugURKqGBMoJT+Z+KIvjjSZq9wPQT11VlOJZrZ9G55W7VF\nI87q0NLf80BxWgSt4GK7mmClgNteS29wunSDDj3U4i/5OPl9E6i2rXVEY4fR\nB10VrE+yoaOGI5tjxROETeiEAtA+hLie4N36q4p2R1DVZ7HaGa2li1UAlIie\ntdwcYLwJ5XU4MQRrLNgItoBNl2h+p1+X7hZB8u1GfLNpkyt/aMPZb36RGMQy\nd+tnVqVEcLPE0XKgy5QaoUEri/97Rnuv9lrMh6N8Ev79pr/ZAHqRZv6cQdGz\nQXfWdvMZSV8ZKmeWDkYbtsK9+OGI63D+eSUuI5mTE17RnyzCLTjdBdYKT1KR\nRmbKWMhOGuQJKkzI/bFvzNxbJDbjLNAD9DT4ZhQLkUhECb1C2Qv1PxDlJpdf\nuuPpgexzduafNvIBHD7T9cOxBZEFH8RxVd/GMN1uFvZIGvV74UTb0VosMACD\nP8gJkQGv+Mm9Qs+/Q3ETPuoxW4PdRD0fOVdqRBC5dGjbwiKCRPSmztlCUvFa\nL515\r\n=ZZy7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID7XRsg/tFHX/C0arOfNPU/ygcQmAxXgFKmBqPqSVf8HAiEAqnLw8YIPBSuyZbUhMlGXYU920sZCX4WiFxSNxJ7cRlk="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.1-nightly.20201221_1608535862277_0.8580716567113875"},"_hasShrinkwrap":false},"0.40.1-nightly.20201222":{"name":"brs","version":"0.40.1-nightly.20201222","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.1-nightly.20201222","dist":{"shasum":"eb16c64ae51b9831fd7c628410de6c8f5ab99178","integrity":"sha512-kGPwx2ufDJsWY+C5GzHZvWCaRvXb0tEQAx9goXAwm6xqW7G+fIyan2lGuBt7Rx0e+s5RyuIQCFmG2JdoFF2CmA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.1-nightly.20201222.tgz","fileCount":214,"unpackedSize":1330609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4aGXCRA9TVsSAnZWagAAbdgQAIphBpTuzYJs/EVeoy9d\nj1TkxN0f6Y1MG2pEpbdJUWVJotBkMxlbmkBg+X5SkawlATpEi02E9GJIAfrD\n6Z4qpebajDQlntlA6ag+0Tqk62mbObMKRwrrsp7XokwJxi6evts+VAfY0jSQ\nHYcMIa7seNdXsnaOwr2weioY057kaLk5wam9tDwuLvfU2nE+7d9/GiDlNzlk\nSvmZX6NiXZbaKBkj2W2/YxCrkFYmMh0y2tljLTgPFDyRpr4sy58ll2Aslq/z\nig36Z0e3VPrO/Q56REuK2J66LD4QvzSwRvfis1SxI5V/zM53csrEtYKVpkaW\nEeIOc945Ropsz4jBQvrQJT/IOR1mROpJwIz80yfXapKVA/yupRO7E1XsQ77o\n6VwqutvynjFgQWGqvgz9A5PBtGkaNa+OmVBhvHbJymh7yxB1LH8Emp4+yDkf\nQTq+MHX+I7IIrsgw7kJJFulCPV1reZAigPDnJ6AKTtgUzjSf8BTPY50iLEUM\n76I0cdcKpgCVPg6ZfjucOvV7ZXkAqYgjdsgQdWDrxM3C0D3H/QenZH05USXD\n4VrAzVzYCVy8xdaVJJXBVygkLBNytr4hz/by0K31obK/j3lXgrKdVzxTQcAf\nW2RdVogb+QAl6wvt21qarOaL83TnNoMmrlgnwHHCLN0CLl2b2ZG1+m3iiugn\n3hra\r\n=dhT6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDASY182QZCwP7gcx37lWAcJafGhgvw2ynF6PZ8hH4NwAIhALk1zQ03LMvGdjtvoX7yzlPIZbf3/fpbBSZTq71YMGii"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.1-nightly.20201222_1608622486922_0.4255712213376639"},"_hasShrinkwrap":false},"0.40.1-nightly.20201223":{"name":"brs","version":"0.40.1-nightly.20201223","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.1-nightly.20201223","dist":{"shasum":"527cf0aecba2aa0a4d31dde3f2967a25c2e86953","integrity":"sha512-MCP0c4/uqOYN8GoIFQXvwvFnheXbSXWF3Dh/+I2boh5z4DvsjSitcqVYlNBw2SXLQMK9ixEGwvIiEbJAkYGHhw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.1-nightly.20201223.tgz","fileCount":214,"unpackedSize":1330609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4vM6CRA9TVsSAnZWagAA4a8P/j8S0BAtAecoUCEBAF8O\nYJIoefo6nRn/DyKiUEmyClDd83mNDCOPIU7DyLY5XHiTEjDsDjo1x2QN6WZa\nUtt821hlUuverCoRZ/4JmG7dQAScZUghwYnvJSt4NKypgekDZ/+24/yY6CK9\np2WcNe31LnDCPLJeiz8MlOXv9MY79zsmXHcPNDtcqAZitQFNBM0y4cdpwFLn\nLGQcDbGfyLJsyFHV7fQepdAzR0fCEqCbz5oWsdh+mhe0vc1HxYl8mnEp1nP+\nhjR0UuxmgiQWzNxG9ae9dJvPOvGUha+ooni5BJs2LJg5d2I0tVYjHBAyyBOW\nzLBIrmRPIU7gZt3iq9zT+GflwywMotAg0dCqoqr9UvdSm8v4uOx2xHrjN/ZB\nGg6YHUpqETvUJ1wf8bWvNw0q95ZyK5g2M5x1BqzjQ0Q9ZWGpOl+UWEqZgo6b\nfWpzeeDqyhuNGhbf4FxaN1tuaQ74y5eRx3T9RUAgVLAym6r2rIqgD1DnH/L3\n18k1WIWR/MIAq1HIIhuQYngUlU3uD4eOJSZjvHai6Pqn1PoCwpoNo0xhdz47\n4WyRAdEkL8dyRGzTqbv7ruQU75z9AY06IyWiSW6JcHxY3LrlWFdroJpq/Xcg\niPILWskxHNqQiA+unlGI0X6JMCi7Pm/pDKMbkoYIBCym1gB2bLkL/WITvmLN\nLkcb\r\n=C7j4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTfpLneEFkPDUwe3w1r93pOemrfPTJITwwRpPkgTe+uQIhANKNZ0qylYjWO53KeMuZfc9zIQUoSgy+xlA0ZLNb6RzC"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.1-nightly.20201223_1608708921990_0.5310128806175771"},"_hasShrinkwrap":false},"0.40.1-nightly.20201224":{"name":"brs","version":"0.40.1-nightly.20201224","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.1-nightly.20201224","dist":{"shasum":"d2d55ee4a19e2d34585dc5e6b1107be9f5c700b3","integrity":"sha512-0f73acCV7OCeqLOLRlgSpFfaMrF7AoEZYoSMPl7f9bF/GYUnknLBj2hbYudFJaDBo5hCfDuifqK1QmRF4p4xEQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.1-nightly.20201224.tgz","fileCount":214,"unpackedSize":1330609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf5ETpCRA9TVsSAnZWagAABXwP/2baIyuVyS1SqWprDCps\nDr7LwOMgRUAt+5e1hiS/1N38uNtIuMia9ZyZ6Wz6tTdeJiCkqlD7O+QBoTP3\ncXOIyyN6HnPAiwc3xXz3VEc1IVuMTYfnIxcqfKrnBT1ZZ3/Su1bugP/4Wbbc\nbq7LJyigWjzNPrmZ0oteCcVJZ7GLTj4jlRqAe5IcYYl/0bK4v5sNq3cUPGHR\nc6jB3SPt1wFc5t1IYXiPjztAHxqblGbjFgqBwYACOFjHCfO6ZAmZbh9IVzzp\nfWNddXJ3304/zOtIca3q+rPrujXiHi2Qo6VKHraMV222kJ6IYuj73Ic0ppQJ\nXOH9Izynu69r4lusbjBDfCgYcpTURAg09PmX+oVOm6cH1skeb3IRl7F3NVl1\n+w9lqL9LNMK+cGeL+aDxrf2zjjFKF2K489jYAUKk2pXcwY3R9DrEk3AqtCqw\nIhCMPfIVhSQuhcmTMb1FopxSqh+MThX1IU3EPVGCAFcDikClFdPc4Vnk5ZMF\nSPLqeByIpXw6bElxyLNZHYiP6iwKl0IVBFzq6QAJBoDEkgvI20mIs/h/40Vu\nLXN4o+U4jp25+ndeJU9pfjM+kwuyH9rfV4v2LEwO12+kuEZbhBOqMp3Tv9AE\n8vNCb+fyJUQlJzc26Xkmg/Zspolff5zNM3sr9furWlFJoid705NHLnteQwgQ\nX3Vt\r\n=sRzB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHipnjAwHmS+9LcKV+iBzXjZUluSswyfFSyx+IpkePJWAiEAumwv7Ba/4geBTKgkYrqph2dLgjdtiQsrkpGdzrQxD+A="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.1-nightly.20201224_1608795369169_0.9353960437495625"},"_hasShrinkwrap":false},"0.40.1-nightly.20201225":{"name":"brs","version":"0.40.1-nightly.20201225","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.1-nightly.20201225","dist":{"shasum":"e9b1c9640aeb1efe4df3cfc297b7eafe75b3ffc0","integrity":"sha512-6yoUR2n3PuG4AYhhMKml5fgB5tANp3bVY2JmUwxmyDBML6ie/MBvdUu+jZOYxWduLb5bd5o8rF4D8r+fFY0pQg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.1-nightly.20201225.tgz","fileCount":214,"unpackedSize":1330609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf5ZWaCRA9TVsSAnZWagAAP7cP/1pJncRAKyNOF+DMZYwZ\nUir7IXwLVP4aAm1RhP8WIHzeia7pGVFtfeQk8DX565Sf46yKwkptESsEXryt\nJBVoHe8cenfRFYVirKP3coscSx5Of5oi7zg7Mf5K1Kd+JjbZ2IEkj4E3d2Y4\nxBV3DLDfp0toflq//jcwkaHhbYcqmFK8wFDnNVHyGp3GUVnCUF8He7pWAD7V\nIMTQaBDjRiEkzJiQPhPlLSb+0cYgSiOT/smPYTsTBMTpF3vEwHUCvAdP6Cbm\n+WP5/GA+Wjmcka0yagh59zlojeZ3rtdZ7c2BSns2yr6qN+wn8CDyFL4ncVwE\nVV11o3qINB/gUUYLBp7lm6DMkEFcxfEKIioRCsrthaRsrgmMcec50bnM5QND\n3wwy1DemmSgkPcgrj4H7wwNVjqdNLkzcGRn6ukKB1e7f11PPEvp1IysToxM0\n3T7U7qg2Y81Cv0kxgaH1jV8BiDBmeIRYocsYsE5PllIOBoWl7pASUeiSHQYu\njDBRuLow/j/lFCvo8l/3dLgCIuXEKrM9gMX52lxqeNGuSNVIiFu1fUCT5dnR\ncs8bKB/nEitHbm5sgOwpIN+m+O649m9iVgpwejPdHh1d6zG+H6V/ymamrSaW\nEWLy+GbMho3kUNfUI1jMXzDr/xJd0eYBfiFyZiqDL0Lw5FaPqeAz9xOSvKvz\nCUgZ\r\n=hSsh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAFmQvPOtP+roEt28tChgS9uR2bWaIXjQuIixthdrDfFAiBR9X7RsEWlQQLdUL6v1r/nnxkvFvBNe9RwqeKsYI4qvg=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.1-nightly.20201225_1608881561481_0.9020411668800623"},"_hasShrinkwrap":false},"0.40.1-nightly.20201226":{"name":"brs","version":"0.40.1-nightly.20201226","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.1-nightly.20201226","dist":{"shasum":"6fb4db4c0bbc82867dc0fdd08e45e8b5202db8cc","integrity":"sha512-D1KpU9RHbdf4sxOMa5yj+bdCvub/hSxpV/u699qvmRmNkGrnAyLVkVQC8+WOdGy0ENwBRfr82QQGsYAiv88DlA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.1-nightly.20201226.tgz","fileCount":214,"unpackedSize":1330609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf5ucUCRA9TVsSAnZWagAAYbwP/19jKpfkAsfMHfuRqjtK\n0PjjLjoivumXGV3QjpsDCLAe7VfEkHXN+cEhySoxv2V6+ywbJ3x8euT+0quP\nCXESb0c56mxIPrOAqBqQOduz5xHQKQ5O3CqBB875duNvpjpLusE/VqukjMyp\nOGIwL18nr9KEiUPkRmvzP5mnviwhx5qkJCV4ju3+VdkXb6/zOlLqexNa0SEO\nRDwtkDhKnD5RvS43V6/nDYnPr0Qw9IxwHpF7Wyo5gnGSxkUVWKDXKYhR6DVR\n39h9q2gcuesCfOqxx055fdk0U9W5e99z9XTbl0cO9u+h90WuuIC3+lX6XMUr\nr4HlTM7S61RGaB1HkPY1DHZ92n7yb1oAjV6350sq3Xq4WMkxaAU2Hibj9vk6\ngT42Kr0kTQZMC6lFGfxWDs+MopYPyKVnJjYJYl5DxyPBZltCvkzY896GCsu0\nTwClEeox9/txbq7b03HKDw2V5RMA9rVfxLZ3GWlkN+mtOyAXJh5pPvrrFGeI\nCTkvEJkaJnlfFtQ2PNbiV9QSrHLS0Rsb6J0z1A+xKN7Xf+HB+dzprPdCCn3R\niF19w5L7Miv50/tLL9xrC9Yagfi3sYQO8xdMWEaaKU27baVvurKz1wA86ZHt\n7C6sFBWAHtcyX3hBqiLsn1/LJain6fm0RAgMXvuNfHrq2JzWruagrQObQqQi\nJAfm\r\n=SvFx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDATqPYxJwFUOpB2jgrt1o6z2EgZ4WDMggAhYZQ6m5RFQIhANnqnomoO/nZUavlv+toaJa3ROQC2Icey1Okztn1RpBo"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.1-nightly.20201226_1608967955995_0.5867197007374187"},"_hasShrinkwrap":false},"0.40.1-nightly.20201227":{"name":"brs","version":"0.40.1-nightly.20201227","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.1-nightly.20201227","dist":{"shasum":"68f802cd4c208f1ea7fb75002439f184059e71ec","integrity":"sha512-HLyn8mZst9AI55DivOr9p3vFABoaDTJAYSpyfIbkKjXmpFf55pyZVdyjPOLl06z2xZao1nsjA4q+JZU+O91H2Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.1-nightly.20201227.tgz","fileCount":214,"unpackedSize":1330609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6DitCRA9TVsSAnZWagAAuVUQAIJ/23KkfUFI1UXDRotk\nsBvSuMK5o0CEX5eb1m8hXvQO0QtaFBbXNpIpEfKivzX58i76wFCkMQue9e9o\nvTfJkbWloDdUycKpwn53MnYk81oSSFFs1cIIcEccjk1V2b4RW64V7URiyoY9\nC68NA3SdoPbSPACuO6QFLvxveMBtaSlftmnbOhdwdwtRiahtOVVCJJ1/znfh\nhplvNKTz1v2ZQ2DicQglXJUK1f975iPsheGv3UY6Pi/+XXJnZWs61vNp7heP\nk/O/OeO11ZNN77CALh6T65mzJL40VAwJxetIRy+2N4QXCBHjChyP30zH0vYQ\nwZJM5x0lPLfV9kZMlYvzuOEp+FhhOn2qO9EriLNyJa1K8L0X7fJ2hyxwLVEK\nnfUi6jjmjebv9JvfSUnIzW1odo6nUJGCAlrLVFSrzG/wROMbvEXHffMgE0OR\nTLA3vX2lropx9gyKDQtg8+8EctSH8USOhHKcGJXw38MBuNcL/J9Fm+ItpX63\nKzpCIH7pqUkyLB+kCQux501LGCH20fakTTy9YRYKB69xG01KuyIj5lH6825Y\nPGsmNyZtm9aXDaGYElOX8K+ok61oFO0Dt0UmyZtl5oo76s+WuQFCY02TZ0g6\nG5k6pwJd3jyfiheVpTWWrcAL3jvR5nERJo4NvonggF6oScPWO04xIqTyIh/t\nI3SU\r\n=BVl1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDqPfYVJ93rOXqShBmMhX++Ma/XPavhOOCB5ljWR3FkUAiAbEm+BbjdJOfBTRsOh50uQZUdq6jUyhxvMvHrv8ygYyQ=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.1-nightly.20201227_1609054380886_0.38884584563335123"},"_hasShrinkwrap":false},"0.40.1-nightly.20201228":{"name":"brs","version":"0.40.1-nightly.20201228","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.1-nightly.20201228","dist":{"shasum":"87bd39bb977894a6fd8879aaaef53892c065161a","integrity":"sha512-So61/QFI686MB3/ZvROZe5y/7kjQbKC3DGHp9z3KFJCxdQuOt0ThnTjPQJV0SCEPLhTBJP9ICnY/OwG3ljD+oA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.1-nightly.20201228.tgz","fileCount":214,"unpackedSize":1330609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6Yq4CRA9TVsSAnZWagAA+4AP/3v6qida3QKeRyLO9fJ/\nZSn2NAxs0Anfc/U9xNS099/utQZzBkrNiEV2bv7SZp6vn2jU1gHVtLN/6Wli\nrDn4dDPoa8zDRENZ/DdJAbnDN//wEvODj7Uo+dgfjC4ytF1YKIPkLoIAR3sT\nfh16aDtEoyAykQpGfpNtZ2Qn1XIYU/90GXnBk93TrKxwxBWR4kTRFp5fVikI\n9Q8HS/vHFV0WnhC1tiOGnIy347VP7WHEDxszyevBfBTxJLtn9dJ9mr4r79yH\n2twZZqTRlmWu8uIIayRvwYvEyeAoFByU9FmApyYQkNGCxMPHr1gn4iA2/Gys\nOLA5tACGQKCKAiIAC5wDXbzkhaQ6M9SzfxQCkbXCeowKEZdxia2SmP65YqTf\nsTNTn8AaPUcUsdnbmvUALUslAQsPa/g9l80poZbhbFcxwss+tH28m0CkZsSE\nsF9MuVkzEjsm/mMtsjJccIjUbj+A7n3pI5aqhsRlala7aK/Re12V0o95MmRM\nb/fqNi9J51/vAJ5nhRJWS1i4O/xOcCZYFlrt8ir6b+ELDLA7wk6NRISP5D+I\nSOsiu2CZMjmeDiI8cBkaBsufPEYUSeN0f11MOngofSf/afH7/5Hx3y6xS49i\np2UI5+/8tOOFRemLEF69K0Cyra0jIDmlNhqXp9BYaQVQZ4wkHiEh8b0caAeL\newaC\r\n=dw6J\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICEcP8WRFNIFy8C6jkvzbycweL4IRp8hRsTXAI4AekhtAiEAtTIEipUiXD3uO+6B1ZBKfm/UNwEE8KlzSuz8qOQ9Xyc="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.1-nightly.20201228_1609140919011_0.05052834120802174"},"_hasShrinkwrap":false},"0.40.1-nightly.20201229":{"name":"brs","version":"0.40.1-nightly.20201229","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.1-nightly.20201229","dist":{"shasum":"2eb668e1fb9b7ced304575400f9b1f0f6cf7705c","integrity":"sha512-8Ksjg2B18av4muCsjE1IQM4EnPVHSLLc20zfVmC2Sh4PvX23FChsZMCZ999qIJvHz8IKIYkDvnYl+0X/fXpieA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.1-nightly.20201229.tgz","fileCount":214,"unpackedSize":1330609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6txhCRA9TVsSAnZWagAALYsP/1fVN5tGwx5tuayuO1mU\nlqJ5/iLibRuNtIwCF9FRlczC4unooJrnlL5hcMDbZSpELpUyG9yQj6bakrz/\nWwM2cbHNJzohPAs7SRMX8zcwrOJTgCzHrYfNdwFv4FlnILgQcw+Sil1ydjBd\nh3PiZjJZMoK78sduPbzshzZ2husK0E+pNr/d2mBk3ykFANEx/Wmq+xKhF+JN\nYdIJvHL+NFstnt2E5PCfs3aYhV2plqFA8zq36CIomkY7J/DB7dCktZkftZX7\na2RM33U46XC//d0A47oFgXnwCZxR/M/LMPN4QPehJRWvj67IWVvWfUEsZsfA\nO0KDWmlpJCdQ0kWUBZ4uUdXCx2eMNnYFNEQkzghVm3DoBZxNkQsSDRIjbxX0\ngh1aHJQynjTr949brzxNys6URHp/ejxx1aITC8J0cvkXYpWErXRFzj/0i15o\nWThhjYElQ2B5X80mjedYVbbWo48z73yDBqIkKSeql3NRXHRooj8N5BJtSk8q\nCs+Zi4ET1xaQ7YnMGhGA5bVE6GI1jO+EoV2dukT7mLt+cPek1WR8zV3vo2PY\nuHvGrDMxVHetXheIexIr88xq3hIf/kMCARPMad0GUP1J0KQoc/P3IqZC/Zm6\naP4GDDCQkRU5CI77ykRv0v3wrV2I+7kzpNa1pBgperY8vjljagW7YDHwdFJZ\nNf3e\r\n=vmuL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCO0aV+6yApk3EE/jj30/4vH+wcVjcAQ3ko9LYy3gy+FQIhAKXv+z8z8ocJj3+E0lNTdASQTc8HrC9cQ6/8Cz8QtDn5"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.1-nightly.20201229_1609227360935_0.17850106867449167"},"_hasShrinkwrap":false},"0.40.1-nightly.20201230":{"name":"brs","version":"0.40.1-nightly.20201230","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.1-nightly.20201230","dist":{"shasum":"278f3a4a6cdae6cdaaeb6d68a47ed84dacf11dd9","integrity":"sha512-4VBCYS8Kz2mjd5jbYkDvWYkI8a2XUHooBHIgoSeaREmx3KnHO5VJ6jmRob7Xs05iio7eBd/cfkeBxcgjuNJ3aw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.1-nightly.20201230.tgz","fileCount":214,"unpackedSize":1330609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7C32CRA9TVsSAnZWagAAh0MP/3G4rSO9oTMiIsPy3Q2p\n/bQYVndCSmu0vtVPMq8R+wcRa+HLLW979+RW0BEKDnWPMO3oJIZf/ztgdqQZ\nY4rJ3QzI1ooLXoxm4610G/OWwC/A/5XQYhUxNRYnHFxhcAnAjAG1QOQ620ju\ni+CYSR3oQsv/7sAW5Yd18I1qTrPGp64K0/A5ZN/Ddk+ZvdOnqY9Qn5ZHq5ad\nYwfj3xomAI58uscjNudQjyumzSFr6czPCADSAIx48vZjB0g4zQSE3WIrBhWy\n9Xc2xegEkH5QBB1XrlyN+6Wj7kLqWGBqnzee0CMbUpaSN+5G10dnRDwMt/pG\nAGAFKbaB+WiTTVcwMFXMtsNayacpPrTDpLncjalV6IW0DEDfgp9ZaaLms4mg\n34ShfuHKUXunNXcjHGyaSUFoFU6XqDNzO5817QALfWQMqHzDuB9jWQ1onL8P\nuHO423s5+P+SD+Wwd1fAuB1ZPOKVNTv+x2E1u8iMQliWZQ8DHzdkFJ9LEe4p\nRICso0ZFKxDueUfIYKE+t7mLP35FWiOX0+QykqM992yMlpAGy1mLOO1NOK85\nOYyeiEKqas3NEzBPySd+YXSVZu4OUXHhdyrg7PdzBxrIIrZBW24DYNxUfmvf\nChpt/t3A4smKOchrrN8mhxHOoY6dCjTh/xmbKXWO8JACZKlkK9zTYGw+vkdB\nGCkY\r\n=UK8j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIChsiuQxxtIFILAtgXYNcZJPsdwOjWV8dA1p7+8Aa2FRAiEAoXoP8DUlD9i4DHGj+1hrBlgmdRp0EvRCzRnUTLDp4J8="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.1-nightly.20201230_1609313781431_0.41561562088789183"},"_hasShrinkwrap":false},"0.40.1-nightly.20201231":{"name":"brs","version":"0.40.1-nightly.20201231","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.1-nightly.20201231","dist":{"shasum":"d3e2c517e5bd9087bf5ac9befba7a7f5fc0c1741","integrity":"sha512-k+ygXuXH1SVsLQbD1/j9HZGRyf8YakD6sOAcXp4/XreQ7v/648j3ahLTjmFlIOiFKiVnuLWM6swoqJey1YVHAA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.1-nightly.20201231.tgz","fileCount":214,"unpackedSize":1330609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7YBNCRA9TVsSAnZWagAA5aAP/iu1pQeoV84BSzbJuUkr\nOVs3equHVpr8tb337gjQJzCZD+A3qOjUfqNXKgpKlwR0kOXPcg0yflYf1qZo\nCpLdR6w182k1P3tbSTUpAel8Gvd40KJ8DwOrF/Dk14zBNaxzgVZO8w6gIS40\nYYS6A+bu0PPs0eHJQvhcKhoWyeN79izD+AUoQ4WH3cCn1OXEz9vWEtS26QwJ\naHqf9K5CnOoqVw3ZbzXwY088s3gjd01i0ZSWjIfnSlNVd1RUfiANVj1aScKW\niCJCH8+aEL6fwWPaOQCnvnivltaYu0gSsSEAkEBNdk3LV9bp7gg8TpTKDjmO\nO/+XELKXzCMyAJSAXm7LxNMcOjDgZYuyVQHXlWKyv6yTuO/KEqufOOx6X5sv\npoc2f6T0zSzLF8PIPk1M2YxDXt5fvmZcCi3uNK7rW56SboJjxSXerOUAPswJ\nnFMEVUK5n1H0C5FOvjWofBgjD8gVGYxwrmRa3PzITakNoTp3jtygA5EQd9Ib\nEk/hg3aBykSiRNlWCJioSznivEAHDgX1EvdsaxuvbGQishCZE0aXhAeNxHuG\nc48Qo9NXcF7iS0zbIl3ZZkvRh9Mve74c4AYdGOx3GndKRCIktwnislXAkwzw\nY/9Ha3otYaoQSC04jU+eOx7u2QDSCWpRZBf7mdOMjJdmPgpn4vMMekOxK3K7\nLsGm\r\n=TreD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDhVg86blaRPGsE7btj4iY40otcHyWQbPeWzGnu+Q/mlAiEAmMvkRz1+Fv9QH3XZMv5rXOP/cTp6BLX9gOb9dop1YcI="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.1-nightly.20201231_1609400396934_0.6172391122623975"},"_hasShrinkwrap":false},"0.40.1-nightly.20210101":{"name":"brs","version":"0.40.1-nightly.20210101","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.1-nightly.20210101","dist":{"shasum":"559e3c211d642820d3fead2251afc87801ce703e","integrity":"sha512-iQg04I4MWhGIC1fF/NVgZGrEKhSndtE+qlpoPGZ2QH77Ku9EpXAzTmwHfAR0+O3RUzbLkW3KGom8FxrnsgMZOA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.1-nightly.20210101.tgz","fileCount":214,"unpackedSize":1330609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7tEyCRA9TVsSAnZWagAAZzsP+wUbH6rovAxsa87fU7gI\nW1L+c8RsoqOoKCAGo/KcmphxRQRFcds/A33IglzTZBwsb/W4wLkZBbQar7uj\n6jIScKP9sUNblXq44iA/68NHNq5uqX6lDeygFUaUpnoy/DVyCzFVu2lkdclT\nCg3vb52X8YV8PyEeXnoHcoIEyTAcT2nGwNIXOZO9QvRWq2hbo9xd+67b5V5E\n1RuRuHQhJASPp5Rgz/CgFim+EFdME4nTAzXiOLCuLqLFkLI15/TbNs4K1uN+\nMAlx9Mm38xzV0u5Q53uf0JofKzA85cnFAD0mh4nASBix2HZawjvzeKGrDYV8\n9Zm/MRrXpRErT+bBQNu2stPOGRkDVp61PXLmVDGStSUCYzThNvcxZZJLYUg8\ngFuT/f5LAWBhZkzIYUsHFC2WgyrWoNcYKeX8jJoYUaqsRkUx7ceqzv4gRoLI\neOztTQ53WmcyZp5vt9PifmCyBpy1dpEaxRm+IjeHj76b1s5L8Q2Djm8RJKV2\niK9SZJf/YOPt0yZX77n7u/Nq2Ej7mPlAawvMC+HDZPiXygl4NvWDP6VAEoo6\nc3H1002zp2K9R4JZhNfPTUd+8L7w/b3vCiQrWYCmg+jW7cdy/Xv92m6l1LAj\nBecfaSi7JOPNlet6QdVFctwFPG2LKO6KKSyvxc161hr/0s+En4vdEk02q+5K\nvY3B\r\n=Uaq7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAf/RHEB7LJX0csqwNDutjAZTFv9zqHIC/U/ZvK5t0ZnAiEA6Hk6N2FgMyn1Th7osrqsrLNxXYXaYpCd9dSjyUTq4Ww="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.1-nightly.20210101_1609486641405_0.16941193004693011"},"_hasShrinkwrap":false},"0.40.1-nightly.20210102":{"name":"brs","version":"0.40.1-nightly.20210102","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.1-nightly.20210102","dist":{"shasum":"da6afbb8e41dcf4be184a1a6cbf6f9c6a1993bc8","integrity":"sha512-yGh29JDtxF3OLaSXUQ2hG/HY87UbDyulMhNEubaspy4SyUStdy0bFKFbzaF5RjXlFIrC5LsPlwMZ8cXtK+uvQg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.1-nightly.20210102.tgz","fileCount":214,"unpackedSize":1330609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf8CKqCRA9TVsSAnZWagAAmIQP/0nYkefSacyjzaipFMr8\nujPZ5s8M16C1kMa+0qfMJob9yyxvtI0Z836vc6FTkiij/uHSKsv6L051Ahc2\nshIOjHdJRUBUPvtzSNe96upeJXc1iixdra+puGMY8W3yEikZ31wV7/50iqQB\nPO238B98FqGa+mV/IF3Qpqh1237RUDZ993umFirE47VbG9BUkuiAoH5vpZ8S\n9mx24HqJt7x3Ts/JYMOptPKf6Ko7K6WxdLpccgk2Fg9mMP810a32768GFK4L\n9iRlEv3EYJwyZj4dYxzzkFdpbUQ58G/NPyw1PyZDn5V0c7inUuucy9CxvIXu\nesGrDCXEWHANO7w4AOwysmPPXkwe5rj+jAuYxL5SXPBBAL92dO/97WSZm/kr\n9K9pDrVT5fqIOitu24j9Cu/BF6E+QcmTKzmBo6zkh/+kJu+K0/bi+f5Z285f\nc+n/KTsOI1M0w75tQTDaWcHhPCtTxdd88wSHimD/4CmjHYpY4ByJ+9iOATqm\nNv8hTM85t/gJ8GPnlh4J07YPdIptAjkjUKf2HlQrm31shYxYO6vpnNlN817T\nUvVfSV4RGJFTG7tsZYIBcc+dZIdHOINN/lsel3MTYQX1yUTTM+4hkstKLUej\nkrq+I8vMx2zg9EYHTk5Kl5huCsMKjL5p9tyfjPniinMcbgpDUtxIILN8hyha\n4FNj\r\n=Mnbw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICU5UvENaejikmUaogbg5JcqYiCtCoI2I2TGRrc9+QDyAiBd/Ys54id1qRyKPHYvxMGFiKNxQyQdukTuzvy17vkyeQ=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.1-nightly.20210102_1609573033774_0.14727910274028"},"_hasShrinkwrap":false},"0.40.1-nightly.20210103":{"name":"brs","version":"0.40.1-nightly.20210103","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.1-nightly.20210103","dist":{"shasum":"b1e56d78bc24a0c5393dd2562f4ae0ddda4f837c","integrity":"sha512-KeqfWJl0nJSFctnp04pxFBVJAB5e7EWOj/VDjVdlLkFyTu7sN5IV43poIdzMVP9RM+sIcp+kT9upI1Bhg63aaw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.1-nightly.20210103.tgz","fileCount":214,"unpackedSize":1330609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf8XR5CRA9TVsSAnZWagAAiosQAIFfH4ER+HM6+PNae2Zg\nCg2h/ahdzklTVBkhVQ2Wy+DLsTBga8w5G83Ir1Ws/Q/e4WOfMc3NJvbjUlNc\nYNfAihDDHBP9P9Pn6XVLJLHGaG8GSVAtQ2SQcjSUSjnSJ5PSpAlAXBnJSMTO\ny0ymBCSk3hoKx0UU+eXyB1iw3y/S1obeUoFAAuUsQU1q+/3swskk7o6fJEep\nlqSPje/8qA3lbAZawRlgLrRQ1CuSN67KZEu8uE41Cu6q/lfI6ImyPKlTpb1j\nt1ONlyhquG9H5FFdjdlgGKgitjlZDBQbtJXrQNhzHNpP2pHZ2bwx422f3UeV\nm6cTn7tqPA1q2R3npvNVc4HEbspOY1xGE7IBmEZ5e8FHyEgbIGM7htCweOIL\n5mLBREnn9JOQsbxWnbXM9gn+QjoCFcqJgMRicGwlNXcw+lLm7eiWk/RGXQKk\n3oExsQFDBFCkDmg0dZBxyZi0H0E47ArkEXi8UNdlMG//bldB2w+rLRsCzyyf\nQXFpC4/qW+zFAl8xO5y4WEmQKbr7WDlLQLvwoGEusoS0CM4Fq3KprUpFQSAH\nkEcj+CCOStINa6dbp5iZI7rXgYKeCALgkjK3BPhsLNJJxgaR5VXFJ/RaloZD\nqWWTkYpUl68Yd7MQUYKcStO0UIjzCSO1FpXv+visfOGM1mtLH5hNZeUykJNV\nqCri\r\n=rJYc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7ZZbAlL3Em1VB+6uufr9nWzwHrUKnzViugCSzQffuVQIhAJwL16IOL5W/z4K8s1111fqhLFCespSEAMWjSbJSnf3C"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.1-nightly.20210103_1609659512825_0.0811483413594043"},"_hasShrinkwrap":false},"0.40.1-nightly.20210104":{"name":"brs","version":"0.40.1-nightly.20210104","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.  BRS isn't mature enough to be able to sustain that yet.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.1-nightly.20210104","dist":{"shasum":"a6ca848e6a073dd6e0904215e5089f6571ca5fe1","integrity":"sha512-yjnhCLYlULXZHKIQmGJTVxBI7sr4sIPNnQz+w0ePPFjSA1vIyZ79IW+sHrdSKmtmGR+WHNVevfEoNk/amKC2pg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.1-nightly.20210104.tgz","fileCount":214,"unpackedSize":1330609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf8sazCRA9TVsSAnZWagAAbwkP/jEtMWuLTjoVdtfPcUjp\npeF1DW+84jreBy0DvPJaSlga9BqwsURvk7DtrovhiGjoBlNOffgrJck8h53d\nbxR6PYLQ6uWJmkRPmxLurqQLvz4+hXKtzvoVR+mYJH4AGyC1Rjm0qzyw+Emy\ng4fFwdB4Kf7oIZatsvhGzptIWMUJ4D6B1iTe3KunpJ5gKAjO6FDYA6eHZLF6\nMfRvWbhhG4vboCJ8eMoMuPtkFZaIqqwSIsu2Jim/KkwneqUAwPnNMLLXKkTi\nXMu2/iHuccoYmT1VAqku5pdRIxj3QVL/2kMeYp4Mh/9/3K9Uuqfn0U9suVPB\n5TiA8T/5JSgKZiie/Hb/c/2sS8tKhSe5HWqIPsgullKAwk/GhTo8kn/T2GaO\nItAFK/G+U1RxpmAxca+mu4KrMKH2fhqhm83avm72JmsERwJJ/1TB+OgbUI3r\ndyuaJt6J4BNkI5PBttAzVT6hHfz0Z4b0+xlULWhBaOO2HlrwM/nI7b28xhO0\n0nm/a8Wh1st/hr/JAVisVhaQ6LZqzlbjKfWGgrlHhGjPieFKSVPvCMxoOdDg\nDd/fzUloiX5/fBifO/CjzbEYPqUllZVJL09BTIbUdE5ySOAbqTjI5A1mN7DT\nCiubXwmopnRSPCXwkrUZYUrDf5liMn4ik01GO5r2D4S3/VE4rl7j7+ATRHL3\nsNDO\r\n=EWku\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFpPZZpgD2pnq8W2gNzxa3PHS0RRRpPYJUL7PmTFQfLGAiA/JdqH4NQlEbf6xInDwVMYDS9NBvQluN7NVXQk7VVdHg=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.1-nightly.20210104_1609746099127_0.6125550693064183"},"_hasShrinkwrap":false},"0.40.1-nightly.20210105":{"name":"brs","version":"0.40.1-nightly.20210105","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.1-nightly.20210105","dist":{"shasum":"5f36de246bbf2f718de114ceb996f8c806efae30","integrity":"sha512-9cwZNG2toOA/k7Nf/FxKyp6noUgF2sEW6yeJqJLz6R4gbTNOfnT9BRLav4QwV5UNtiXKjZ37RFsxxLSywEViSw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.1-nightly.20210105.tgz","fileCount":214,"unpackedSize":1337096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9BhGCRA9TVsSAnZWagAAH74P/RgAszCZ4dtJk5Cz5HPJ\nazHEG0DZ3Cw4RjNFUod75rvkmLVFz9T477XCV8igWm5h4KQumL2yrt3wuCz2\n9i3vd5AgN4lpFGyF20ptsD1d8bZ1qcj7VlCLWdVGuFgVBC2400DfhQ1GoYbQ\nrhLlAF8OyYyDvYhjSTU54T18atOtVVOXTqSpG2+3i7b3DzXWTtbY3K8O6U91\niYkZ+2HuJPGJKzT6d5xZM7bpssV6hmCA9aJ6CzTvf8vZmGoiaSKhZhvSQktR\n8AegTTiAl6OoJymaGTDVWpa4q+zReFjrAcxsDAGy+96cDcUZYhqgH38RNL//\nzErScwJSxU3fWmA7HYOaqzFMlETuWsbnG+E4jnACl5wqjlpRgkVuB1WzX6T7\ngX0j4oSRmJOAlwuFxKJYF0DjdDqNXkPxIrz8EltXem0zlHdJwwF+pwRYdAdI\nWFDFHPqoPBTbJJu+IyBM8wooSAIZvy5vfAdECQqNEtd7g9DC+CpF1IY46YxW\n0n7JqKngXLLaVhRwX9om2khVt9XCpv2+Szp1DD08zjMtz66ImmlmyqB4Whfo\nv2BQ+OITMJVEja9Z9NPpANfSMcymfdYmgQnTbpVlu1QWK9OAucunIrnAutEe\nIfqaoDySCNNZUkXaJFhPvhDS6eHSvpRVH+vUxIIy6EjbdmvYyOsHFpgC6mdZ\nmYo4\r\n=IQrR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5PoQzzLMyyCYCPG+IAaMka39BsOW2DMsZ+5ajUf4G7gIhAPDWgyeMsZXZmHlTBQ+i19HaojZQoGlJ4+wB3QMtPT47"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.1-nightly.20210105_1609832517775_0.8699021476172311"},"_hasShrinkwrap":false},"0.40.1-nightly.20210106":{"name":"brs","version":"0.40.1-nightly.20210106","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.1-nightly.20210106","dist":{"shasum":"63b3db0b6d87cc0bd9c689feab900f7df20c1d6c","integrity":"sha512-QjCVWJLARVIcBy3oeiopGYw+/gIJH0uOyuCm2SkklCjI9BbiIRsZF77khqYgwHWhJSr1diC8j6tdtM4DinnPiQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.1-nightly.20210106.tgz","fileCount":214,"unpackedSize":1337872,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9Wn4CRA9TVsSAnZWagAAPzMP/jciQ2sofz47HUovKeYJ\nx4iLt68HUw8wRgsPxvFp+jYwPJT5M83ytiQwq2DVysGc7C76oEVEbUQf6EGR\n0iUwdlRq5OkkdbWpI0coXdr5N0yUiOf3tFNAJz0oYCWkaeg13r3o0E/4uN3U\nx9c+AFieQrrjYuvKLswtXFdtf5tQWmL3i/vRy25yRJ6snL/sVU8h69CrN25p\n8lne9YTRl1aYAbRYr8qAaD+tzPv/JQgL/DBQCiZIIEJueyMIi3jgx2C1x2mS\nUgY9EGPjElT34WSqMj41T9rRSCQx3UbZQkz/hw+XwN5VV4Fa/uW4pFDI/qk4\nJfeCy7IYz8MS9xaSBsQl20lbtjn3oDP+QcPirbdg7S8wvakm4FPDVF+Lhrcx\n67A/pEjn8x21CAZalQcTEEwJIHqKbVwRGRiaZ1RM+3777lBKVh2WcnmAD9E0\n8vg8yonPrbVuqizMIpWVFjs6qQJq41tFVIH6XBrUTs3iuwIysQtfzso+hZZ7\nD3hqnm1dgfnLBNEGNYr6LdIsoxMEXW5UPCXA7wxSub+/jk5S0lkY37UK5wJT\nDQj2t6OSiy7Ko0e9Y8lcCu/t8L53+gjTehadaRVkZSMgHhJ8gEH6NXx+NBCp\n4pQf//3G5WirocoG2f7tJ9TvBLQznGPtQJizrJcxAnfC4z50ZfaCI4ikTR1m\n4+un\r\n=VOw9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBi+zVhS27Dvbc4/4QV+geohJJO6Uu+Q9Gt0VOXaWVsTAiEA95Ig2P6uS4B8223FFPq7qv1B07HGeZtIUQVBDC0HoFI="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.1-nightly.20210106_1609918968086_0.263454245028129"},"_hasShrinkwrap":false},"0.40.1-nightly.20210107":{"name":"brs","version":"0.40.1-nightly.20210107","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.1-nightly.20210107","dist":{"shasum":"00a76eff4c8a9121fc7f58dad8a60258b08c66b9","integrity":"sha512-q3bXhcIO4ZTiFBZEW81Qdl2eAAjttHc1aLNjAQHKF/xpy6itTMVvEufvJe7mwvRZZ5k7bXhE4XZrX9vUGToauA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.1-nightly.20210107.tgz","fileCount":214,"unpackedSize":1337872,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9rudCRA9TVsSAnZWagAAMM8P/0tx5Rz1Axk/NB/Lr6m3\nnJh+tP+3eSnPvBhxwFlHv6VqGNmZFKXPSwJCyhUP28woj3WHiaCuK3xAA3M8\ncSkvOrC85Y/scd8WgZ2NsCBdF65o2dy891wbR5rXRM9eRzNpEQEKgYC9O7bE\nCjUYkZY+UBGB4HnDRm9GN8EMWJGgDXnTy3mU9wrDDvCZ8sQays4wLWJkyGKm\ncsM2egJ8kRZImKuN/B0egsQFE3+J9gQ1mnfK4qYNM9U3z3hzslvMqTwTWYS2\n3p+MFDzw8BvRKtTaYzxX55KFEra+CezHcw2tIjCuJxEsJgyTt7VGW1Dn5Aof\nHTT1hDGBOC0m1zIVJNOTSHDUNlTwnWqf1aZTBRtukP3WU6Jy9rCHaoPvBIzK\nRi1VBXNkKVGNfYm8PZbcXSI4ZGp4zbOxjw3SKnoeRjPgv2hB/G2A5zWsqFu1\nX65qkFCxRt3WDrjvk9s1XmtPgnNMKSNgCahKUQBLwQ/TzzdiOAINsRzG/zSH\nTRetIXL2RKe/Pee4X1k2Jko8erEcIDjafLuL0wlOLIjv0oz77lbekR86Lgzf\nWM+oHzHJkb9g2XTM+9QFwDq3+RBulLZJS2CE2r02zPX1Ldw4twS8wScPjtII\nI/wg3Y2Tih87tsuWq6JZKN1YvFa5gDJNptJGAMawWQvmkqMI5oxPIEnHe/Jl\n30zH\r\n=gdCf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID1BZpbBNvK5WKGZ71SfKK8PMGYb9CWj4aCyRGE22u8NAiEAj/NZ7pEH6EiW77UefSYJRVU8oF4OutmprycxXQVmbHI="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.1-nightly.20210107_1610005405084_0.4368919321053675"},"_hasShrinkwrap":false},"0.40.1-nightly.20210108":{"name":"brs","version":"0.40.1-nightly.20210108","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.40.1-nightly.20210108","dist":{"shasum":"1929d2abcad92c922df6cebf4b7fd67035be8b3c","integrity":"sha512-/T/8e7Ed3Ihi9huVSFMjYKoVPemldcC/zr+dBr64ZGKIpii+3Abih6FmnjFucSAYlTnmQ5f/G81vFJtg7FRCpw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.40.1-nightly.20210108.tgz","fileCount":214,"unpackedSize":1337872,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+A1oCRA9TVsSAnZWagAAomAP/3fenwWqKFK1vyTqzaG4\n2EVlD45NaAVAVvjsN9qwSK92gOuReZ4VByRrwFdwQ1dyfJHsq8RJBlUiLYIA\nQBsfFtxRmykFErOIiUYVGBAZRP6yWSv1JigUgketWWcb0EjEmq1n0rSO2TPu\niZsnErsS7QtqKd8wnAUsK/0vN9oQOZuIPU1kgII8z0gJ+uE2NSb3PhbT3LKj\n2BTwvQDrnGC+MrFa5RyBdXiVwDbfJHsXDMwdYM3sl1E9Q3/sURN5xBvmrPTT\n4rpchET1kBQger8yWqpE6nm85G1qvoQ49j2tUPa8mjsHvFj6UKXnKXBupRJD\nMzqrm9w0ULXA4gg5E+UpG1N4g1sUYUtgbozSRewSEP/yBXT8s01Xh4ABY56S\nmNrJxX/bpeFhhDTp34nBz2pJT0RkhqAMOHunvw4Q3Lk6zcQ7U3LSXIpiGAKQ\nm3lg/v2lHrIjt9EiSMQO79MXACC+0IUa4K6OxK85d8jeScabHrBsh88Kjza4\njqOUAgUfBDFBR7x8WproD7+2Oyh8abXzDb+ClXFMlpYz178PXb3Jn2aTalMq\nMUSkbV82LsNfA7jDzDBOBG3JUGfM6IEps2e1c7x4znsPilMxHhFL9rF2c+eb\n4PuK4a3ukBUkB4YeX1ClEc+57iMqr5cQokgKDjLjfwSexMEv12QEc1Ycen5a\nF0lm\r\n=YAnK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD01NQhWEE+xxQ0B39CuI2DvhoMI9wV9vg/IeoYRCB21gIgTJeMlJKRrEBkbqBta+APVzRfmSSDGUxUNta8XLvTW3c="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.40.1-nightly.20210108_1610091879920_0.14849058167190998"},"_hasShrinkwrap":false},"0.41.0":{"name":"brs","version":"0.41.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.41.0","dist":{"shasum":"3ac47b73aea4a04ee52aaf9a7616f23016fcfc69","integrity":"sha512-7mByDxoo5gT0kfOCnGgalfrlaFJwEMz3bHmuFdTHQPrBHlgC096CIhCC9Xf0l++72O+e5o7go+uzi6ilrr+Cww==","tarball":"https://registry.npmjs.org/brs/-/brs-0.41.0.tgz","fileCount":214,"unpackedSize":1341022,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+JaECRA9TVsSAnZWagAAvlAP/iubLBile22WSKRfvFsB\n9C+MmUR63FhZaMYrICZEPfMaFcwLEvvrMtmYBmNcA/ZrcaVefT1h+p+zJSA9\nJ2wGpzz+53b8ttWZp9g25572ewU1v0nkiXp2LQ4QZ/ltbP3eDrRzgC3Ka5TZ\nYWXbwzJYLQ92LfOCszLBnAS6BzrIgmaLBbWVg0BuLRH+qXS9vEJ3uxFFR4OG\nFsY2h2oLhN5lXSIou/GJpa5+gVV+wAzQr3okesOdx1vK3mSP3hU0E4kXEd2A\nX9v9Tir/3Aj0voDODNY9hvILElaQtZ3AA7DQE4tgAA4GQlTn/5rIF5GX1tEp\nhU1t84hS9FlOluPUZwyOpWEgQ6eCBdSWW8iUxnHHmQP2wTpJP0nZqUXm75Or\nHLn9/s8RrLWGAQ9E/+J/y8ZoYBvsLs+972ph7JlFoYXgVe/ZD7ZUdt3dyMgp\n3eQ2x3DMPh8j/sjGI2Frmc3QkTJAcXmhkqcmefYzPHU1uQMEVGP9PVYrglgU\nTBbUekjKvBa/1TO3oclsUFmZCaCArW1LA/uEiVpTDp9gh/FjoUVCJX8iBJVI\n71pMUwUHfrNX5EU4a10Wl2h8mg5K9KMg7gTwaniQLK6canIb9P+q013BX7C8\n1y71a67qqK17+nV+xxj9DdexRxlesOt+DjK++UeOeNeIkA1jSGRX0Vwr/SXz\neUur\r\n=LXVo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0vnry4mW5HUqv6yrAN0tbGQrj0+Uff8X5ivhePUhJbAIgXbnuk1ggm/+r45BP1EDFJtsXEPG2bmN2KUReszs5e50="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.41.0_1610126980272_0.36034063454062526"},"_hasShrinkwrap":false},"0.41.0-nightly.20210108":{"name":"brs","version":"0.41.0-nightly.20210108","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.41.0-nightly.20210108","dist":{"shasum":"9db28b4964aa69a41ba3657a416e85935177daff","integrity":"sha512-jQLmnCRNwRrvKo1WxAJ8HNEAIGKIoKYj5etleMMn154m1GMlmis+UAvoGVCyhtNth2IYNVmK7w3d8B0sfEWSBA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.41.0-nightly.20210108.tgz","fileCount":214,"unpackedSize":1341039,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+JdnCRA9TVsSAnZWagAAQ4cQAIKbIm7JmLlfIERzkslL\nsoBBYC2kUTR64nmzTMUUvBe4DRRzeVKbx2UGSLwB6GLbkPycpRUd792vAmu5\nuT+7KGS1jli6jCPii+eM373AQLhM7Ct9O79Ks+xEc+mlLezVUy0E4chfqULR\nJWLWhKMwe/1xu43ELc/eZQXcqOzqJYmzs8LM+yyaZbRM+dqhFhomiEGmea5R\nhOwMzuKHFxnP4uuEbVZwNZO2ga4FM7WbJnSHMLlwNt+a0BweRgz5BH6ccB7o\nEFQDqo0orV8iORWrPhgmt1FO44PENSlEBX5I06qP0EBdsmrUw4a5jJgktjr/\nJmrX9ByZwYqCSsVD1xngZEr1FlXOfA/sGD6KiSsS97os01qcGfPJJW5IqVxa\nXA5siAuC4z6+F749R79f/qG8LsqL8JBp+yh21zKrgt4tTgc6g0TOtD6Ynbw8\nsKh6auLsQCRSP6ERmr3+snDn6biDb/9H3duuEsc3nyD0uYr1yyz3ojIhwNCh\n513T9pvWDL+eHDy0B+A5s2NOQB9LI3IqadHFndnKCijg+dqmvYTXm0g8lihD\ndtuuCp44nJAAaw6y4WH+HJnrDss0gdndcB1ftkV5LiEjjW2x38+AMds7fMkK\nE+2LA2+OuGLBohGCsAwbeW/Wp86Hs9VfaO7KLzcWZirlcq/qQkYGh+bS0Lus\nt++S\r\n=XC9v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHGSqm3MfORDbWb6gZxrTV3XZdfz8TRgLb4Cc1lGdJaDAiEAhQ0hwIiJNRqnbkONDF0WBYHTw6qlGOIzZi+IGD0NTHg="}]},"_npmUser":{"name":"lkipke","email":"kipkelevi23@gmail.com"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.41.0-nightly.20210108_1610127206992_0.7106488184308237"},"_hasShrinkwrap":false},"0.41.0-nightly.20210109":{"name":"brs","version":"0.41.0-nightly.20210109","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.41.0-nightly.20210109","dist":{"shasum":"d9dc1fa74962a8608a985afa99541b3ae1b09cd3","integrity":"sha512-+s6fKjKFgJ45m/mAj/zS10VTX2syWQi95VcDdgTATAFoPsk7nKi5mhH8rsuwaGioCLxg1Ds7Y8Bj71DGXMrvNw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.41.0-nightly.20210109.tgz","fileCount":214,"unpackedSize":1341039,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+V8jCRA9TVsSAnZWagAAlCcQAI8pB7m73weIdyKE6fQu\n0G47v+rjvzapbX4qHoyEe065SXd44HlXbC2xi5KuP98ciMvli72sUN9t2HB3\nALjAJszgepC3aZ+l6lM6HbDZ6EptLu/Bhx0imAk0ssllFbAuzXKCw75KKxTR\nIGK6amTPTOy9f95Xugy2DpK2bko/Pa42a+s6uIFKsztwyvhLH125AHmtNnju\nnm3u8k7aWSb0eo7iVP8sGcVl7zl3IhNvhUQ8fLWbci/wQG5SGwEx04mRavuT\nKnfl68aYapjmd24XWK9uQ67w35jdcbKdOTIumh+ysE/n4oRKz+3ych6hzahU\nZ5h/MmzHRyt+OpleWA3tcTQVj/MxDTIpmuf8UsidzhCfU78lEwJw5G8lV1MQ\nK2GxZDvjGBB+QIaOgTH78iUXao6A5W5VVVQzoQzofq9YaLU8sVdkrOmUOsku\njHUi+YjWuCliE4LZvTB2ooskIEVzkjtMiAgDpBzOd+7k/AnCkTEfWsCR76bA\nNAv61/dXNJ6Vc8qOD3CcUPwN33Wy+cYQF5s2kFPipVVEv2AQ0piBTZ9nnfG2\nvp9G8zIA2cbwQ36Kku6AUmRtLQI2JaOD8/oqMY7WB7F18PSzEOlyk1qnK0i7\nTYeKyBPjjSIQaVM6q6V5pS8V6bf41oRu4Kkx3EaHnopvJxmtpcmaObIiQd9J\npUVS\r\n=1J+2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFlkxjlk5yrHoohkJp9/aVYi/f7FE1t4oH/Ptjv1YFqAAiB3VlkkcjfO1mAMTPvuDNhbY89/KoKrlNsHMJ1fNulSqw=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.41.0-nightly.20210109_1610178338720_0.2060760967859443"},"_hasShrinkwrap":false},"0.41.0-nightly.20210110":{"name":"brs","version":"0.41.0-nightly.20210110","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.41.0-nightly.20210110","dist":{"shasum":"47aba74561ca0c3964802bb2f5d60cc0388d1482","integrity":"sha512-yX/OmVRhbFAPu/3GMTflfdfiyiDARHl8qRM60wdSv9mbPlK8XH1Yh5fy8Jtu9Ho7izOSEE5qnODiZmQ1PuDWZA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.41.0-nightly.20210110.tgz","fileCount":214,"unpackedSize":1341039,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+rERCRA9TVsSAnZWagAAh0MP/3y/tmJg7hMnyikVMPbm\nPHMTd5xNT8Ud3oYVJPePgehgsn/5l66BmdE3AfsyygBr1Epef9R0wSdVyAI+\nXvE5H2cDMqXqFPZY46jOT7zwqXAk9Y5PdCP5/0ruaFvAqVF7kcNg5+dHpPm8\nguNAq0qsttyEJlUzTl419puCnYdloRfiHoJ8DwoIzMATDghAyUQcM3DFLdZm\nsYMn7K/WRIfeEh6gGErTIpRTeKzAMcX+HEyLv7/V5IG0eMJT8LqgM7901V12\ntLB+E1LPxweTVcGxKUee+y2pmeO/Da5OsbHotIOBv7koAIIj+py1WsOuz5LW\nmbFvkNbxwSaMCMS0IueM9K6b9q5U12Qzf0JVORcdkVhtVcEvYRPUFq+Xp0U6\n1AZoQtLK1UrTuNPX6lv2G10bm2IHeMiUa1PoTC9VZ2nDy/8kx4CsxQS3TEyk\ndn8HiYuZCKeuVthw+V9yBUohy4uqzG06z3qqZofBKkuruaxwtO7uSuUHyoZC\nD8jlKGMu4CMkZQe0po2p6sk3R75OdeKYNgW2b1M0N/J0G8W1qaJaVs6ExnGa\ne0EMWtjYoMttDmHV0ufmlL6r/0GZQCiXkmx3h3i9ro0ySq56Pv1Hxi2wChBU\nbMnLbNSm0RUdiptv1/FjxO8bRwkJR9a/g2e3qAgpshc4a/++/w5ogWnwn9cr\n+M/J\r\n=9FUX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNx19l6roypIP0F+RL8attvA7q3v/BwbFs3OmdIJArAgIgZizika3n2iEfbJ5+/ZAS2O5tcvQOUG7TqYZUxlv4kbA="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.41.0-nightly.20210110_1610264848399_0.9320190699071724"},"_hasShrinkwrap":false},"0.41.0-nightly.20210111":{"name":"brs","version":"0.41.0-nightly.20210111","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.41.0-nightly.20210111","dist":{"shasum":"359661f90d909ace036840cdf77d376cd0ff8a31","integrity":"sha512-duCDmUK2CRtUaJonuIJ9ZLGdzlDmB6FGmjcm0w8N4rwrWqpwnrD9os4n1SJPQ5GgMkILTYFeyIy0hqLi1QfK9Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.41.0-nightly.20210111.tgz","fileCount":214,"unpackedSize":1341039,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/ALgCRA9TVsSAnZWagAAJ8QP/iL8qcbd2woIbAb/Z+ZI\n0XWO2x41jN7GijEf0WzShfVQq6/nP64/1f72CTP/K+h8jLUmLJf7/NjzbSNM\nZzrc6Lb9EOYyQ6CDev3AXqFFImI6IBKgHu/1osV3lvVFTqOQC1/6Xz4Lj3Nc\nhKsNtq1ZFapKsG9Ng0qQe0Kh7y3EyRqjOSUg/KoHHzNr0QM/iWOK1Vl4tQP8\n9C9aahSlUH2vhpFwvyG7FUDUMWo/5FyDrnBmKxpB/J2eAWFYqlMxRIhoCn6S\nRNtHSOJmvmK67NSZnQmRvP5lVHUHEU3DKn4K19psqS+wstA40bjKlmkRv8qr\n1w5Uxuo/T+grswJ71VsGQIOTYH66OykAm6OP7FWSpwr1N6WeMnqSdnOLH573\n/qsJ8oHAeAbXMw6AL8ZOG4hDMs/bK54D7LVWAAUleTrPppx4+XQpjndlQXw4\nw+lnOvNuRpItIEo1bHosxE8iUDLMfxPc7w6Negtv92GQz4hTp2v6Fo7/Yum5\nHhu/FZ6jEhNXbp6wvjeqIeEPMll6Vc29iuZyO3n+CcZ1YrmTJhPLm0TRnlZ8\nPJw2VXKS+ckrl414Wtxb8a/+53E1eSw7bhAEuEp+TA0oz/cXVLpGqbSXCftY\noxMscBabfD2icHKYiCs2/n5+4HW2aqPgqs/ZNjFNUEj3kty6ODsG3ZjLfTgv\nddIo\r\n=vJUC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBmtyjes2J9PvOHNhHPvqjzJmIThMNXYZS1My1QMuHbnAiAB8nSlXoTcWqxbM+r+NfM3QeNu0zEFAwRRQSkSO+Biwg=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.41.0-nightly.20210111_1610351328441_0.7138176691144518"},"_hasShrinkwrap":false},"0.41.0-nightly.20210112":{"name":"brs","version":"0.41.0-nightly.20210112","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.41.0-nightly.20210112","dist":{"shasum":"8fc83430766ad5369b0537db617f2dfe0f7d780f","integrity":"sha512-MhEEItBIM0HVHQvuDMLCWbpzppgCPnzY72CFrJm9wUggJ5tgHTf6mwhXzsm2e6TpihcaUMRLMdrOwarSg35fgQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.41.0-nightly.20210112.tgz","fileCount":214,"unpackedSize":1341039,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/VTiCRA9TVsSAnZWagAAGJMP/j5Y0bg3MOVwkxkFiCCO\nSVRVLVjnach8OmRw/7/EdtGfhRkwXdUj/6Gg7SUEue06tMVox2RRBItuTJmt\n9GXMLWPoyinoFfRJzgTixLLrLQGOqzfwVaYg4NnErqR4pJOPYncmEqEbUJW3\nreltzDVOueZMIGUyh8aUkpI+rZakJveNidSSZHt5qoXBCFnctREDIZh5AxEq\n2tLx+F/2Q861xrWzl9xsPFJu/+k5YS9slU5Zj3psTN+ZUQWEQYDlzo6DXMMV\nHT0e/MuFnWsTRn1u6oHmuT/rLTWuTffjHj/aHaa/R9SqvPGBraPOW1DHt8NE\nTOP7TSH4tCAkedDDeh8fksXl0wQJqDnstDBQ/ZoYr+uRIe9SoZUdMQ5os7R9\nWy1rWAp0JWePD7diXQCP76KiP9QjTjL6tGbsp4SGoX/Ep/L+qdFpaaYeMir8\noxXtVl3XLp38iy/EU1pTp4u1mggahhVhvtuV1Eb5ywJbFiRUs6kJaIcNTZZB\nRYIcppCaq/FL/2ggVTRwXp9BqvB6v8jGHuCoYrnl3tWgJIY3i577Lk8TOZaB\napcQ9BZlv4FPJ7ayNFRd4VfhDtSIacZVRshfXmGLWFhDEyoiBKPPgvDy8kcL\nXQb4m3mvUO25FiXRWnnfOCS3P4a7XGbfh3Tslu3jRYnWWPXJS3WEyF8mzcaf\n/Ag0\r\n=QoVc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCLT2QRTgkeLN8/i8HlmqwAU7OYRitNEig1DJkNsZdCEQIhAObRltbeyZZIFa8XYcYko84VNVlZ/uy/rPOIFZMpD4Np"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.41.0-nightly.20210112_1610437857408_0.03370829172443335"},"_hasShrinkwrap":false},"0.41.0-nightly.20210113":{"name":"brs","version":"0.41.0-nightly.20210113","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.41.0-nightly.20210113","dist":{"shasum":"9b567c7778694ab3e369877e7c8042817ca165bf","integrity":"sha512-z1Kv+vvpBkO9Y4rVXHtLH3qqgiP9FR9VhX5oRcN6gdS73R3lri2tUWtfFrLNtMPOUOsJKf21dlqaZhxJP2g0kQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.41.0-nightly.20210113.tgz","fileCount":214,"unpackedSize":1341039,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/qe8CRA9TVsSAnZWagAAdVMP/3N207p3/p0IP46U5NlP\natzN1l92G6iuqi22S7gnsevBvDQlIHqu1gaeo7MmetWjAGdxzjqaaBwVT9hj\n5sAqPrt3ejsD9wDzJ5EKbxQYyPilBxb8OUgb77GIEup0EuVxANJGzo5lXTXt\nI87Cw9bIxjmag6h+lufficaxSB3Pog1Trd6929tD28WP0/wPlYE7C9cSSLy2\nwZsJqvDtnmeL+f5Era5vmGxqBiPa1BCoH29WgCkryureHOEtZh3P3x/i13Bd\n61qASRVlqoy68Cxg3UpeWcDF5sIBMBay+wbugRjQmYe+ZzKYPRY1etvgMtmJ\n/plnO/pOlEByLJ3vgYK43Pr3NfkEQ3wxzmajW+w0daCIiFO8f26dsOP5R7zi\nPEEDkjrx7gz40o9WbiPedxTmrYazVVvDxkHQH1PvF+pjQ/Uwo72FtenSiOm7\nL3pRkWASFnEZxsMwIMIfAtKed3qs9tCLEN4Yy3rrDwOfxL5GimspogBYtLn+\n6y70ZivQGREZ1yKkH+XCS+BTQ/B79Srt2Ig2bTNAwKy5J6YKK5ZZe8qoWMiI\nchODiicPJqUWzN2fJlD0T8ZP+cz8zDXEHLGcmumgzDLhOP+/jGzOlLD1J8yE\nhH6QMP3vz8BLSrXrpVgoQZsNPiyqVPDIiuMUtpYd5gabAC5Y45snp0jaiTRb\nAbj6\r\n=Ts03\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZ/G6jrfggNZ6EqRnQq7G7iznFSTa5eA+6F9nCvUwwFQIhAN9bbgK5JF612Kw0vvgsbhcp+7HbGh/MN0j3Z2yljlk8"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.41.0-nightly.20210113_1610524603931_0.22683534502292613"},"_hasShrinkwrap":false},"0.41.0-nightly.20210114":{"name":"brs","version":"0.41.0-nightly.20210114","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.41.0-nightly.20210114","dist":{"shasum":"e79bb276b6c6d8ad15c3fb3943448b17379cc204","integrity":"sha512-BFYrWeBenmmNzVFKwSbPpMsQDSPPZu0EzbnP+uhR4oyetT8m5goFDOtmDpJajwjzGf6FCf7a3Y8Zt3ynZEa0NQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.41.0-nightly.20210114.tgz","fileCount":214,"unpackedSize":1341039,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf//rOCRA9TVsSAnZWagAAN78P/2yaTHlog0S6LYiejAvk\n5mqX2c+8zhH+gBRSCn4dZHM353XAIDFHZM15STO4Ut3OuLk8dDS7fPtXOGD8\n/t2/pblBwkLr/ti9Wacqe8LnoM9hl/HwYqBPhjojZarnt6jJk1GsB3WlB0ZC\nhV0YY1GQ2U54eipZd4wwPNXveY5nGYKZSDKvbj1Rm+xyE7qGA8Jfu/cnrPOq\newWh+HZac6nk1miU1whBQuCohHdd9WbWwb6QZ/yVQEluNFOxjzve1IGgYHCr\nzRaNmwGmnERh6xOcZ/oiAoAyIhgT1pLb1u0Tw7qCXGsMgi9cfhBZfq/vftIG\nMzPFmsW6gR14UR0W8YtZ39LGjdy411VePYOfmTZAqCOzE51kuiDLTjBdfZUu\nMU0jLq34Gl65E0de+rtuLouXHt9OQ04nrvD53wredUYYp4BtG2zH1ZwZQL3k\nV3z+WZksIr86HVBXEZcIPf/9g0Ri6J0mFNyZCq2lvuf/vHF0PMCaEmRhd+B6\njZXsHINT+0Cx+ebR1XWCB8Mt/sTNRdz9epoqGpFWNKFUcrWP70ZEg1oEkcmw\n25bLe7uVEgAc64QJfI5MWPkDvMWyvDLO+7hTSDsX9kmoEJOBt1VWZc6Ui8XE\nVPYDmfrSKVreXce3+aNHz5CB2Y4Jz3rETUT2Krdvtm4hahCUKjFeake6ehYr\nEMOG\r\n=E8ML\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH3T/n3ylup/bD1tewCMfzEHZoPRY3EwYTaQTLVf7N1qAiEAgZC3nJ/Cyfq+mvB0cPlHRXzeDefMVdbd2B5wkjLuyY8="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.41.0-nightly.20210114_1610611405657_0.9274158705968738"},"_hasShrinkwrap":false},"0.41.0-nightly.20210115":{"name":"brs","version":"0.41.0-nightly.20210115","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.41.0-nightly.20210115","dist":{"shasum":"2f2c85f10ae4f503a8872040bc6f7ecf75b10e35","integrity":"sha512-LoOX6ytuUgNs5I+Xk8WcyzRNBQx+iX/9ZVTOk2GsKvISYvCIZfjGy4XKo00TRd7ZVRlmpbudFSMFxtUZHJzpHg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.41.0-nightly.20210115.tgz","fileCount":214,"unpackedSize":1341039,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAUsvCRA9TVsSAnZWagAAj/0P/jcaaYAs1wBY2vPInA2G\nVBGh3PwS8DUj69Pjs2srFcByX6jdwh08UWZEAvgudmBrSpEo3NVQtlI/180C\nYGkNpm/EkLjFVDRrTO1S5hFIUmSCtMlu1LDtVGyhuo3NBD3o3dhXIqUYRjz0\nhPoI4h2pg2sg8kiue45XchB4Jb2OwyBJeBg10T4u+fR5joUb2FIaeI9qnncL\n4ivaoedAyFWvK10Yls9wTjUQ0V9bGuf/CoPkDyndLUpEQSnBgH4zw/4a0gth\nqIz5XTpmQSnnHhFna5cWHZn3P1ukDvI/2264Xm/3rmT3ANWnjS6sPSrW+uYd\nsXfK/c+cuelOjvGIFDS12kIIfnn76gWlUDVhqy/Idz3X0beDhHDIqgEgYzZY\nB54y+/NBd5plsOr94YZK0zw+cj0elVzZnTI4JTI2tV/YeOO/sPVqYJtltIDA\nG4BWwHgGsA91g5HIByz18RlSXNyG0X80sl4p4xwKVthMWS98uW2elNfc9d9O\nwBHt27mHKEDBcqWkzgdhFqHy4ftATf2/zqyU9DU2EjDnb5Fd26q1XEuGI2Lc\n1y0gvCSAwPMAStkObbboe668XP5tEonb1Be8d9YuJermFbnVMzjef0gQjsnV\ng3KENUfoCNmV4HDHnWtDdAyAu6JqVje+/ROflD1YlY0fki5b38014V6BOk9L\nyiUi\r\n=hnEB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDv61K8PLjDBaWYL3SPp3qweWIK1sC2T4UPhSy5zKl/ZAiEAgxiVYVFB2gKcm1uRbt1ynnar1fDASaZl9kiWiifsWCk="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.41.0-nightly.20210115_1610697518820_0.14772845201279705"},"_hasShrinkwrap":false},"0.41.0-nightly.20210116":{"name":"brs","version":"0.41.0-nightly.20210116","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.41.0-nightly.20210116","dist":{"shasum":"292382a579604421572acb380f1baf4447898dab","integrity":"sha512-TqNfy1dnvHO3bWf14aAZzjfmfJCd3MEvK4+SCxvdSuCZhi758N4Q6gAwEfpXVmmUbi1bhWRzYutCsOpIM1lkmQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.41.0-nightly.20210116.tgz","fileCount":214,"unpackedSize":1341039,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgApxzCRA9TVsSAnZWagAAKtIQAIszCWw4U4RtPKoFeZiH\nbh5A2ZXHB554jNcLLcbplAkv0uP0J58gCPr0WnkahyK76aCNyD3tIr71LLOP\nXbGrCht38GGK0EVyxjnZASO5DEqPmeJfwvXSBwaQylAWulRntDv0LWH4EXbR\nisxLPK/JGCy/XvaqAnhW5ltdIk7U00s1Unx1Myn2bNecNf0nVttRr6lv1Ysz\n8UDBi6o8MJWN8kTnmeQzJ9XqeJhIN72ROQ7hwH0DIqpp6ftAazhc6nU1D5oH\n7BH8MOymqfMhSh0T3n6tyVEY/cnAGA/R8UD8HSQBnjENc8iuvPfdMeXhdQB5\nOjmOS75wx71e+InTAQMhVgI+iCrapb2zHfcX7WMr053Z/0cMVtUVqykk2GAh\nufYWNGXBU8QDTDW5WFvb2lCcLaJuCgF0ArJRZH70sfnTnFBM1qCfAKnWt2AX\njE3kt320tPXqxDK826szxtbiUCHy7rOS2BhiVf5RxoWVu1b6BVR8jlThD8CT\nEa/E4WdlQLH4TUhb8vtRROiRvwZfu1+eQqTxb9LVPFFJYv6gUTX+W9lDVm2Q\n7bCukSKUIPqQaZHlQJAv83qGFnnBQBJQm0Xuwkf7Cxwl+9zVk2SjFczGyxsz\nImtrrGwz32SB8Gu85jNWpdHwEn/DktYQxZ/6klf2p78M508N072wwN4hCZsT\nQgv9\r\n=Q91m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCiqS8fPtXZXZXjNnHR+Tz4c4GmowN1gjC0KgpHqF6D5QIhAOIWd4X5Be9mPyMOk71tZByTL+AkfBG0Ggln3yJxENrk"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.41.0-nightly.20210116_1610783858594_0.4185587306312264"},"_hasShrinkwrap":false},"0.41.0-nightly.20210117":{"name":"brs","version":"0.41.0-nightly.20210117","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.41.0-nightly.20210117","dist":{"shasum":"d86cc581644dc782f3acf59e11a0b7934d7ba596","integrity":"sha512-1bU/2nLIquMR499vsRYa+TSGEclEGjt+4SfZNPEejiIGigi4KaoRPjQmIZh5MgsLbYbTTzQZmvcjyQjYtvFYsg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.41.0-nightly.20210117.tgz","fileCount":214,"unpackedSize":1341039,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgA+39CRA9TVsSAnZWagAAHJMP/2uvep0oadc4H2prD1OF\ngH5TVq6oA2cXkRXtn68veDAAxgWqTrba/6hX22x0liLS7uEsGTireG60sJdM\nVWyQPgVhRFHZcCgJghr3Jaf9NOWsRupc+0XEQ/R8A2hJOMzVrJ/ceBQTlZOo\nYJqrsJf56SVjIfVDImomxRD+d4cBAWEt2r6OoF917LbJpaOitx83qbY9FpnT\nKGFfyCSxh48iUfv0PixB7hx6WtLWH1ETA06dJO/KbfmJ6J0Q0UoOCV2PCc3a\nnYc7Tafq0TyookKYYVNBpEfI81tSvQeBJwrDwSfEfELESK/iVLVuWbLBnQt0\n4+FYXHFQPOr1CyCR496smoVB7S9Vf4E3RitSCdYkCZ5bm3MV9s6Xcxi1kNLf\nRDH0kb/wF2li6t7qDP6A1MTBQ2H1VqlbnIbT8dpx/5U+lH2WsjVFYISOCmky\neggT+6gl+zy8JICTyXU/tpzDhCbp/Qj01qICCV7Lf/M2LVpBvS+YRA5w9/M+\nNfK2kFX54qKr1+mGQFxxH9pVbtlCi9a2H+yRrpzV9DxAEQYBo3R6B7cPhhm6\n1kfAD0OKfguy0rwQ+yoN1cE0ZThBphyX/u+++YYyo2ejniPEX+Lwk/mW4/jM\nniQGkSPqp13HZtc/0GiFlLsFCA9C3Yfzll2egHtU9E+i+7gbf04e3E2565zJ\nEMYX\r\n=XNIc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCcmHEDbAWt/ElmXcOXVqk7xQ77A4nPZxl1+qAWG6Fu8AIhAOxsZuYFsH7uA0H+1DiM18JyVzSBfn56nzv/udkb17Jp"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.41.0-nightly.20210117_1610870268847_0.7400970583413726"},"_hasShrinkwrap":false},"0.41.0-nightly.20210118":{"name":"brs","version":"0.41.0-nightly.20210118","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.41.0-nightly.20210118","dist":{"shasum":"05a9e061ea3decf6fba8f58c72ab961a5c9884ce","integrity":"sha512-xzJwCiVAPdXD3wl6R2fwX3NMxOdY6rkC6tGVmpyd45TlLdQghhWmalvA5H1tAKixFBUUkGSlBsi0z5a5t1vZKg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.41.0-nightly.20210118.tgz","fileCount":214,"unpackedSize":1341039,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBUCNCRA9TVsSAnZWagAAR1gP/ixbCVzDXhJDn00AXT3o\n5+yeQIVMBopR2FBbBLDvT7B9fwUyuqpajL/D5jl5qS67mQxKeEms1qYPtVb3\nqNeOUOMY2MouErKavNv69sMKP+BzEhISdSUCXZqv4cl+rknRRtYw33oPJhdG\n/PjSPoEF1vu779YduQ3xcqB/6NYJGShPaN7Wx5+WG0hCO/0bQWoJZ+pufjHi\nvQKKPZISr6iffnyzG9VAWJl77Sc01o5pBO5wLU6T3PLfN8fgV5SI8z7NQwuE\nz+i8oL051Wxw3UL2ubR1me8IeRmL86u0G3ItSWf1xj/ysSW+YdZ4+M07ESws\nQy75hgoSTBNhkAI9uxh/v4T7tUnAH6J+0qA881f3t688hwaM3Jv3hR1h4LL1\nIyQjYCGbAG3EaI4PWG/xBMYhDBNz7uCHncfMoHS9tuYe42LXxUDhlmxMLGNH\nWLqkB2id5sFpf/oMlQDgfPHr+PzadGJr6u4a8xZJCjdS/wLlQb1aLoqrmN0W\nVUIlBgKxslwL4K3sDZFFb5471a2hSFmJZDVIBLAYjz6O9+dqvYbLjieQ8cDo\nnXRbE/dhPeEREszvi/gIoLjoQZRH9LUsTMcAMdH1qw+6LyCuOWn5ckNYJ1ec\nATXf6qLeKMnsTeYtsdjUuuETijpFLQfXiG8Srq6MJBOpdEkDtMhVMW6t32zs\nzicV\r\n=+HwE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGr3hVzGY3+kX+bAN1a73ZvRL/xTJ0yZIA7t0T/eUpJAIhAL33ExVDsuytXnUDUN9yC8hab4kpp60dB6fr0qyAtAtC"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.41.0-nightly.20210118_1610956941112_0.2663792825876594"},"_hasShrinkwrap":false},"0.41.0-nightly.20210119":{"name":"brs","version":"0.41.0-nightly.20210119","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.41.0-nightly.20210119","dist":{"shasum":"c965285d951cbe17523d28f4f887a58d5eb39907","integrity":"sha512-vBY8d2b7i3PONr8upamde1XPaXqfVGxoUNiKXAexgMRb1zUdEnZEJYWf4odGk3z1dN/uZ2geiIjrH+rDY8w2LQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.41.0-nightly.20210119.tgz","fileCount":214,"unpackedSize":1341039,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBpG4CRA9TVsSAnZWagAA8UAP/3HOICQx1bN40LjTTO+e\nMVGrHLjU7DUcewNdQ+huQ7fCQPpcmMTenMshTUAeL3fHHzu1yMPUdhlSvDPb\nIGf2Gqj3mCecdEXk8ZL1gUtb4zF3mz4LANX3/DP/RpKX+Ov/GSowomE3HvrC\nKfaQKQTbUiM4km/UIXeCadWc1J0i/G4XNKlz5E099r4oEfGHJy3Ge6+mquV7\nMOVDin0wIcyv5CDquxJUfWniavJXoLyN5NhznbEcbi96vxOwl+OP4akWXsGA\nhAIkwWiwwWrJ/GZQMHdHzOQf6pEuSND5hfrIwFO+uNMo3YdSx7jCwBfU+pJt\nfzbHIFn4UK5TFbNcPQwiU0htHPMeasPcEdY6ZDLvFltKKx5EzSaxDlnm5L0W\nuj6RjIypHiKvFgwgpKVXJBCQc2jb05NjDSh1RY9xXtfO5cN40FNt/1mJOvWq\nuM4+0fbD0HsvVrpqTKojE0fvem6zfv02wM6H46o1QdCmjVN7BSZz+PUyhhS8\nw/BLGWKimf9WFtZwO1sVxcgFAxMsQHgwTxJDKNDbt/Dra6IDMMW4fAodUc9m\no+TdjjTzaOOtRyCvbS57ENw/n3f9FworodMnfKhYJhGMl5TAx9OnEJ1ttX/k\nv8Yhpa+1WJY6Zb/kOdZas1GjU1x1WWpuvJ0lLjLbpUWALeDkcw3PLSVDVgjN\nCAbg\r\n=au59\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBxRepjd6xPJpSGvzZ3dIt5uVjJvI82t97F9UeZjjHXgIgR6fauV8AL3IGulHFRF94rR1JCQRaFqZg4dvXU5ownoc="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.41.0-nightly.20210119_1611043255702_0.5288496269935139"},"_hasShrinkwrap":false},"0.41.0-nightly.20210120":{"name":"brs","version":"0.41.0-nightly.20210120","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.41.0-nightly.20210120","dist":{"shasum":"4608683d4f4f1ec94d2782365278f0fd388ab6aa","integrity":"sha512-ue8in48+Ksikwl/LlX1kC3ppZQixyvvDI4yautgOQuhD60r5bzwEaoDsaFwPcmVy4DGZfbMh+dB1tJyeL0WGhw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.41.0-nightly.20210120.tgz","fileCount":218,"unpackedSize":1355882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgB+OjCRA9TVsSAnZWagAAL+AP/iQE2LjtQwHT3dHkfBoK\nHLWJWvTBek/j+TxBDWTe93RPCVtyFs+4zlEJKcbPMTcoakd1OYm/u4Hx68LL\nVztPMeThrx9hKBCpwu6/zyV0WqtFiRPxN5fw+EdW5LXl9bM6jav1UcaDUFlp\nq7ldv/gPgNFAmupjyQXUCgZbOTBMNX3kuGNv7UCZLrQFTdT9xpGw8bPjpYGY\nftme53MTbQt9vIqITP0UWUXr2e4r8JlB6xCmN1hXefDt8cLQ2S8y5fg48+8P\nZBKwiU24xumnYonflUISGWnjc5v+8l6vwo2CuEOM0ML+3TSgZmrHhsP4ON/L\n35hWKPdTdPAwqUwUHc+q9u0GSuTP38h2ac2bwald/1mVUa28xT0C/tPvY1c8\nZH1CZ5LkuDyXX7iyfFkQqSKMYaVrz4Ppa/LjvFo3XF5fB1t3GoxomEAsEy9a\nbYZ6kPl7wT56yFIb6PaySYNmKa+H2oi+8cl9oCHmC3gSCKy2QSpNrvNasCv5\n2knxo/odxJmXMYdzZUzUwQ/nVR2W6ZvuHk6N5r4Xo9la6f+Jo4XZMqIp3AAw\ncqFjRJXnWZeapq0Vaez52npyWfjfSFwRxZsIUwkZVbYvxH4fCb/7zhQsXwLI\nwpTJ8SObgTPX83HUtw4zsrjgoyg2Eonbmvant6hG3YiX/wHTCbEULL1KOfY5\nAr8k\r\n=m2SS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBL8xSJy4viSE6izN/rOMbFunaT8RzDDB58b0tF3ltbgIhAO3ePfY+ncaZrlTvzxQhvaSXjjhOLwA31aC1phKgQpob"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.41.0-nightly.20210120_1611129763333_0.7581521819956281"},"_hasShrinkwrap":false},"0.41.0-nightly.20210121":{"name":"brs","version":"0.41.0-nightly.20210121","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.41.0-nightly.20210121","dist":{"shasum":"119e08e85a6f28bbfd52446c0b1e17655e18fbb3","integrity":"sha512-SXAx6FAs7DYkHgjGeFRWqx2PqOASM8wrIOx5lpW5bg2ysw/c1ourMkPqciTbj1aOVEcVpFQ5v/xPMHesenWoeg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.41.0-nightly.20210121.tgz","fileCount":218,"unpackedSize":1355882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCTTyCRA9TVsSAnZWagAA03AP/RFcC6/JZuVHzIxnWOWG\nf8x4BF+B8JeUimjiIMUG1+hqndgMAJ003XLZG4nTeyytcYtQ2macjvfjKmsN\n3oKEvHtsXUQ2Rs2qlZ66aWYpU1vWhq/kjHllloRfMJFHUXzIeaxhmNGbFM/o\njtCkbNc8W3DX/9Jr8+582sd86STt7meR6QrW3CrW5oiSWaJvbV7dia56MCtE\nkFbxmTLbaMJ+XECPvVbcorRQdz1H5pzbHMfV0Im+OLUkwWXFe6DhLZuJHXe7\nqtlXNmF2zK9CHB5BknScFppx7LdULTN9D8VeE6bRw/hZiXhSp1n+ooHBQtDM\n82+JzXwrHul0n7nXLH8lb1VihPxX8P+YpTOxIlEMDPil6VrB5ahIzI+4ynPR\nAjXTd+rfPRsnZG2s63QqDTBPvKlZSDmR51rFQKedCYeIfBf2a/Vht1wKkWFg\nVntVmIt4foEWx/dFTi0OvvREHUfxhik7uH7PpV1+3tns5zC7guy9xo+7myoH\nKhhcU9ZOGCNcYP40DbQQ73TrqlIyBbFzlzBDVhGIa+RVT/IN9rAA1abwoCha\nkvTbI3tNPRfeskZJrRdtyrvProHXKjcJTieN7yLT7HY0iBH9JfyLeS+VDGvc\n7yQLRGrg02FHrfpjqNB6FUBlWaECheRgFiKvBNwqw2KM+XNIA2ao3wS2g1FD\ntV5F\r\n=63L1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZazTcIsPovpQQinav2NoeylJx32I7rNqkVT9NIRNePAIgALyrqSK4O0BLqKpqkoP3RYZO3sbHGMlrkVibBtFlWrk="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.41.0-nightly.20210121_1611216112970_0.5655555288807623"},"_hasShrinkwrap":false},"0.41.0-nightly.20210122":{"name":"brs","version":"0.41.0-nightly.20210122","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.41.0-nightly.20210122","dist":{"shasum":"f63dffd2832878cb7b9f48b976cd4b96d8bee233","integrity":"sha512-Tn9GcZCPI7CsfMUwnXxPcESP6FipjRCz8WM02CHh6q5Jdmw1sv/qAP6IQ2PjWalgRhgwLAr5NJYWh/elcMxuSQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.41.0-nightly.20210122.tgz","fileCount":218,"unpackedSize":1361679,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCoYOCRA9TVsSAnZWagAAnV4P/RVsqtdbLgePsdUCsrx8\nGop+KLPjtTYLTCt/N/Kk+BQ9cmbhQbQ/Ic5xQnhG4AQT5LsJQ+9d6lB/LIBh\nxCkcUoFYyt+wn9AFkiz8eranP9/gIPmCMkPig+VsIq9gALJ7cR+25ov1C/3U\nChiPW61y89f5C6IKXf1cYTr4IexPuib9hxix408T1YVvTp0/XAJKnrpzeao9\noEK0Jjh3qyETRXQenkj+4L84Tx81ZlQlyBBg2tWt6YnLLehqS35UPDP+YZcC\nwtEu0qCS0x7H2WcaFvTDrLulFnmuxyt1o1wUvkukUaz//2Je7urEEeRojwwq\nmLpDtB4vvnziFab3kr5e99P1aUYFV1QLD3RBEGSuHIdZepijzV8PE0BLCk0L\nIfvXRUMdqxkHCLNZ2QUEvBWfqSaErmbQPdeXjeVc8OPPkLN9Ib3AtoMR5JHM\nWtMgi9jcuPWz36uKHUpqqCeY9qYz5Snwvw5s0AobYaZzieYrJxrivR5HH3jo\nf3mCC7QiUWrl2Yjg1goA2AsmOfpYjP9ekW9yVVDuOHmj5oSzt1aH0px8x/dd\nRJDGnfz9v/gvadTcCZ8ThUZhgdyTL6Vl4udY+XHNPPgMlvbkjpEFKDuLqarP\noT/ichuVHzlc4LemHMejQ8dFPtZLITC1tP5KyuhrLrG4N3lVhNLEG84nToAy\n/PoH\r\n=wPTe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDfFa42+nJ5CHMnjS276NtSkCcecsef8q85QabXpqAYgAIgFOHrRDl6C/bCcSeSXil80cLq1Pf5WK7tkgBw+TJYNNQ="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.41.0-nightly.20210122_1611302413944_0.582187196387373"},"_hasShrinkwrap":false},"0.41.0-nightly.20210123":{"name":"brs","version":"0.41.0-nightly.20210123","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.41.0-nightly.20210123","dist":{"shasum":"d51673951ee80eb5bea0d78213153adc3601acbe","integrity":"sha512-oPXSLZuqE0WBAaD0ltXIUdwv+VoiMuLkX3RgEHyKpvUlSTyTKFFeFX3AZL+naNL3wwEI4p0M/w/X7g79IpUiAw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.41.0-nightly.20210123.tgz","fileCount":218,"unpackedSize":1362351,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgC9b+CRA9TVsSAnZWagAAEmgP/i4kQy3jgLfI/Y9N9JRm\naJC6FeQcHvsnoxy+0ePK3buj1VdCJH+9LEuTyFZupXE5LBoNcZvXwGNLcGrn\nGzAioy8KGJEsjs7krQtLqq8ZDlN4gqK9QJVD1TIDnxDk0b6WV16P3ggOYSpu\nn0XnjLDLMzhLWymV9yt8PA+nDLRheB7w0/IFCPslu4D5tTSjJkz13/r7l9Lx\nudRHofKYfAHoS+D/Th8+U6UXbqrM7EKaasrPBo/mhel/JuivHYZf0y281yBp\nXAvPEirrPdRVgmXr1aTctOj1VPx/Ighuu+5ajXjzAZW3tbe7clhdCVe/27E6\nnXJdFXeSiMEtGVpIuEHAVQo6dzcjs+d+sATR2+Nf+lxVzR33eCf1EIEtHQsH\n2r+EL1g8By3DaLYOp1uMl/KqBPWkJZ6h6Zq1RTO8ajt7Hm+JbPkyvOQht/Z4\nPyrE242brvZT3z5Y7A27RbQHbV6OFy5aKgQSP+JVhd414jAnytffE1tySOSF\nL1G5lRRieFNjnO67ozX/2szQr+GGcwyRwSD0Hg6zX04AN2dLHD1D4IJv1jIB\nusgxpaxb5JF6F92ix0twFf23ZFWM2iluLqwGr+7uo0orFPfe/kbiFYdGjhP+\nT0fkTvJXjOmVhntVuxdQdKlNHlVBwqp+L5h7xW1j4Y4PMji1gNjIeG8xaxdl\n1stD\r\n=hpfP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFNrW2EsnvoL1LbvteAKDvNntSTmETczeGv0nnq35kS4AiEAqBUNIJIX8Fisk8a/PPnM9dsiC2CKIEsatRDyLCxyiEE="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.41.0-nightly.20210123_1611388669688_0.8656349777353147"},"_hasShrinkwrap":false},"0.41.0-nightly.20210124":{"name":"brs","version":"0.41.0-nightly.20210124","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.41.0-nightly.20210124","dist":{"shasum":"112eecf80ae19bfe00e7267ed35f9d86891b7ad2","integrity":"sha512-r5fGRkE/r1P/mXQQs4ovgkW6zQGHlhYonLDC6Ht3z48U96p/yBOIlewd0xowLgJwLpZfbEP0O9/QNUlYPlaNJg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.41.0-nightly.20210124.tgz","fileCount":218,"unpackedSize":1362351,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDSi5CRA9TVsSAnZWagAADnMQAJY0n7uUn+IezTicfoBS\nPjEK1iYhVo9+G8oP/Eavr7Z+rVjMFtre1FlI2QybnKwE/7or+T+YvEKBFS9/\nLeKeAyavqVIBpRLu6vMSERqI4yXiEpaHz0X9rgZdYgvjm/TngaphSJb9GWYX\npNBdse8gaE3LcoB910OD2a0ec/KmP4Ao1YAzfjAnCk5m6oyfV5rTAS7EQmvO\nAnHd5f2FBLjnMC3GuwUFt00W3x5qwBcbM3qp5BW0iFbMdfw5MqsL7hBtv/OA\njF5y+yJfUmqKIMPO6lDzprCw8CmsFkaWOZQI5gMjd6JDRqI+9SD1e+oNsG+L\nGVcEFw6uM3WvndncJubiDE41TM6gLsbtHmBEITORdrRyk5ubFYO4N8kvkpnZ\n/W2mZOXEUM+kRuujNHD0nA5tysy6JFWWjIbMp0iGUVHp89yasOOsmCPcPuAF\nyI38+VBj7UVChIP75wibF5PUchhRAG4fOLRVdbMR07S6U1VC7oD8lbz+mA7d\ngPM6P6j0T6V0oBtcVySohULSJEGgImq5hpkHizSQJK/f0W1uer9JcarIQFzD\nsr0Eg6hwxzsyyXW6jhB2Pcs6Lr325D1OH28Rs7ZzcP/51TxiOawTG8FaEXVC\n8dzn7XVOC4wdqaB1obYxyd6YhO3zE0Oy3h6HJFC7p8JqoYxVf57a0WXpBDd8\nV6kc\r\n=Mm9t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAh1rqRc+FFd5td42sIKXDC53dZq68igEcvNCQGtIIAHAiEAumkrqtUeYojVOvp3Tnhw9BNW+Bt09p8/IEYUbFM7/Iw="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.41.0-nightly.20210124_1611475128690_0.5840670404963051"},"_hasShrinkwrap":false},"0.41.0-nightly.20210125":{"name":"brs","version":"0.41.0-nightly.20210125","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.41.0-nightly.20210125","dist":{"shasum":"fceebd6d9b2d2039e0478860d6c88f94d6df8447","integrity":"sha512-4iMACvowKezrxxDPgcSAoPtWP2vQhWp4eD0fnTWWDvcMJS6ZTLviWJo3bQLi/xaBLfWKGZoAUZUWW30DWnZgAw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.41.0-nightly.20210125.tgz","fileCount":218,"unpackedSize":1362351,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDnqmCRA9TVsSAnZWagAAq+4P/02En9AcBxW31Ul+hTam\no9p1MI9tPgMGtJMrGp/iE+aWhQXdkzWI0/bYO3z5wcAlNbhh65nynbRskq14\n2r1UugErOevbDeQOCd/h89/DuJpDskT4AekdAPPWCHf1Sd7tT4MndzQDvSzP\n/cj8l1MOc7DhxHvey8tOKd+AQk1YzIpo1/OeKSQ2FBZz/I7hZ+9TZ8CJkLas\nXLY5bbv8BzxGE6Vbkwt0bz1YlDjYH0tvAB3RRLfyE3HylzoKc04Pt5EAEMfI\n/YSaOIv8wSuuWykB6FNiuOz/nqraxntLhlPIa17cW07pTHjiuP81eOPDtDy5\nc4cUqxu60rgdsO8Bx4HHGQB29+peqivkYGZtt1ORL1defYCucYaoFcC7YZBO\n6wrIOFS0rU7wxsWagvMyu54XeeQvRlUP/1CglB9mRZBrz5RmFUKqQHQFHA2C\nyaDwzyge8sASsaNcgae/7HAPh3tLme7WdTLqOu0oK9LyKTANrRk0NLZUngqI\n3azy35+YuwKrI/0oq8T5qtF3ee41afB05miaqg7sFhWvNj4sTVOjkmKS4t4B\nojma+pjeTqbmq4tSh5dDdlV0YCZTJlAb+8G+40GvviRb4338PnUzWiNz3qCH\neLw/pdlPZTcKN9FLVrnRJvvCHsc4Ryn3D5Y++8iofK1VBgneJ8Yfxl0TyV4D\nSxqY\r\n=+4hd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID/1Qq8WnM1rp0VH0UDnW5WkMLT8UlTH6mz7Ho6JtSHGAiBE3SIrtKq5XljCmFb63YoAS/IZfv/hCUwPJC0NlYZmrw=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.41.0-nightly.20210125_1611561637456_0.36563613213147295"},"_hasShrinkwrap":false},"0.42.0":{"name":"brs","version":"0.42.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0","dist":{"shasum":"ede25655e1c4a131038bf1914a2720f137bf0c69","integrity":"sha512-gLwsizqnmUVFhRCSjr6d/Rs1s3yAfj4GnWHxVdCeRLXB8pk2+i/xK4S9a3tuREadXXeqsRarJ4gqTxU0gzKu/w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0.tgz","fileCount":218,"unpackedSize":1362466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgD0JQCRA9TVsSAnZWagAAYssP/1qgubjBTQWaYtPds1Vs\nchlJ5tCGzYWBsKtLpGW6L6V0GHk+8T3FUSR8PyaRrdP1vMjXkUytamQmD9ud\nW9dSUPrlPgedBPUvJVshHQsmnnnvt8Tl9WvSXK2P/YBhHHJfHsOjgHFg3ENX\nAwaYO4iIXenoEzuL8wvB+rL4Zlh8eGTcL2gnDNsVbfHbiwdQjzkqYZG5DHD6\nXZNcuEvhrvQkGdlLb66lNOxSAbF2bLcxr7uXjmueCGyTYOJHX/3xS6GIS4Ri\nUGDXTRoIDbZo8m8c9tMkGa46dclJo7MWn34kCFEp2VOmiW9JMgLIcDKi8IRf\nBbtpH2bVW18dBD9zi6nDfvF8ByNu0PD35o/WGRwXclDjTQCtzo+T/p13h5Y2\nu48xLNcVtpQCehvRz3Is+B3jXXGevQ5OG1AGEuegsr7heoGbZU9bsVv1bohq\na5trByZf2Taj7iCPDmQpV/eG8iMRGpG5gnjM/dXwDBeCNVHwDHeTpDKuku6P\nBj8w7lmKv+SPrdVpY9St0LvhwbwLij1gVcM+YPZ/2DparvFFa5fk5kNZkNGN\nRU9FNQ7CISy9N1YKizgthCEFfMH0FeyykgZyh1rXjVguRw4+fKmdQ3lA30Xx\nYnANK13sSGCeerumIOfPnUYaL1yJXIxiPsK1xYtcmdUX8jBSf/xf3nOG8DNk\nHcG3\r\n=CRf9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClbNj/sh+BZZRir2S4/v0RL/xQus3Bvm3Z3W8aPMkBrwIhANNvF6GCPZkk3hJNbnzyZPJMCE0q95eyeMfLT+3Ms+l1"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0_1611612752179_0.6011401529653151"},"_hasShrinkwrap":false},"0.42.0-nightly.20210126":{"name":"brs","version":"0.42.0-nightly.20210126","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210126","dist":{"shasum":"c01ed6e16dc194f1f8d86c8e46c12092a8b822da","integrity":"sha512-1gaHIC8yY9wET3X6WZ9HNOaFWLxCBdEpOkVzSkGf3c8p/oyeblDM+T9pbimnDyMeQowoxZZ0hM0AZwR32Vx+bg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210126.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgD8UzCRA9TVsSAnZWagAARQoP/R/heV4F5c5ckwZPsLKY\nJivN3n4oiMneMoJWq3nHwYlHdruue0sxEL6bDQPp1UTzipfQx3KPiAbXVzHB\nJXuATsH7rciEysNMIYVJcRgSUoBT9e9wEQm1Vx8RSjsIyKp73B0WIowddWp8\n3jLB5ZaquvtGOfewHXWsnl6ypXQM47diLms3G3n9/osZB1kiuZkErBTVtWtD\nPhgyttY/jThdWmwWNaCRIftbSb4Y9xumvrQBSP4U3780h8+iVX4VyxnUhxMD\n8pEYIHfLfvWthAphZJnZHQ6OPOCQxeujaJ+dImtq6azLFbkmM5PL+6gd0sao\nrqYnu7iVUAiaHgJ8ysnwBvxzy9UQcTirV7bocLrF+vQXHPGD52uennOqqJsn\nrnsW+kBKKSaj2OOWp1x8Rtjozi4H/msQA8DnTdUqkmE3yeihU7pEeZBBVUv8\nouTsAvKLOPI6YVSAh6wo5LYftoOkHEwMHDe1IT+PtuUQfS16y3W/AZ49zC8h\n1j02uym9JMoordFXPX2xHl45gwDXaTB27wj9vhHpOwK6xIStvsPLw4Cyt73B\nJdghsS2W+b+RenEuVABONsJZPhpU2Pkaok2LAyxJCZ19jSFBfppE99SZXauC\nAxjLfLnwzwgNiSkkEK6MefDZGQFaaldOBQo4e3RK1d4T/cUInciqOYP8SVzH\nvIF7\r\n=rgW4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRvrGVrNbxlxt2696HpoDk8IAu/G1Bl2tYjheBghuA+QIgMnnJ2MPGlL9NLZK/mSXXvQViCSQLeQUFa8EqTao93tc="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210126_1611646259261_0.7363089445641036"},"_hasShrinkwrap":false},"0.42.0-nightly.20210127":{"name":"brs","version":"0.42.0-nightly.20210127","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210127","dist":{"shasum":"d41e817d3c015e30c349c50a4850b1fec414788e","integrity":"sha512-vQSUwr8Zy/W2iZCE1VdwmkU4En9WnUzWrVHV87FVCtgETHIREaZZ7/7Q6/LfU7FS0Wy7LKdyDhlXpkKSMgkZSg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210127.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgERbuCRA9TVsSAnZWagAAv5MP/2eOS59Lg7Ind52aGcNp\nQ9n4hSrn0UcI/4QdBnlTGF7QAG2hYaJAQYl7oC6PbbhP/40Mz4PQ+hzOEC0j\nsKnah4imJwSz8WvnrE5IMS2Rfav6wqrOWbGFeut2T4Uc4+kKihYYskg3ZBsa\nURVOnhly5Sv8wMQuRc5B2/YDJXp/MVQGL8S2j22uK0VF+H5W0tGar5A5f3gM\ndctoZmLFU7Syx2kxmD9LS79dMfq/qHHD/4PnPO3R2168Gf9GMkefP8myAjA1\n6kdaMkJaSw/Rc7DbTq5mlwrUyUycuT2fKv1lfaa5yH1IyUNdX2Eb2+I0NfgN\nBUl52SDEnRYp42ubNVWJ1dBTtZKe/iUd0dCBYBB+iCndgSibPAs/QBrg2dcf\n/ncPTdDgY7s9XmBEQpRtslNgsWCiWvxSe6in/zOPNvbEEouUB8sraStVrRPl\naq913ALUPy3goBTUUY5ZbAXtVlZmanBKhtqcISODwW9qGkPH2gW6r6N+WqOS\nznzaGXKUyvKXqSNjcZXoC/GjCUr2K29RFdg8+E326uOMb7TxLcGdy6tRB8aT\n4P06VRpeMpLFYVcrkBmpa5L0S6xT7y+H1spsWVTSkItadj2tHpZkD5+fFEGf\nja4hhq2vJkRymLPiTJZytLCyGUyxIhwlXd7gv+6bRHkrEP7guMq6ru3LfoD2\nYsHn\r\n=sCjg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAsnerdfRjmd5PmerIQlhJ2b68ln5s+Wl5ZqyNm6tYIhAiEA1EQ9ZwRFn4uNqKPxifVfCWcRqCSNwFYoiJfU8SNsXuQ="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210127_1611732717424_0.9862247622066811"},"_hasShrinkwrap":false},"0.42.0-nightly.20210128":{"name":"brs","version":"0.42.0-nightly.20210128","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210128","dist":{"shasum":"fb8808242b168afb0c37b9962a1bbe9b3121cc8a","integrity":"sha512-j/EKAuOfKqKjGSj91yShj2LCN6cWj3UliTgVmF5wTcpyna07mZR9hMoqQ0eygoBJJR4jQ2B7dYru2+snrD7zTw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210128.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEnooCRA9TVsSAnZWagAADCsQAIXvH/hCYX6lWTLaGcQJ\n99T32phNAhGqq/Ia84U7sLQyorG1AZfB1/dDeiTdvgAAqhxHdJ5Sm4Lv0oIH\nwdfQV9TCovhoAhl/mfuDN410yIsZrx+S3nIsEUSPLdMiIQGvneD+UD0Ycwsl\nwiYR4yTaZUSglrkz8oHCJBFE0IW+qtIaXCssiUTggfxAmMOlgUZGoqzHkpQa\nfCQOeiPRgvucaj9a6HUjjqigxB/7/G3rZv0zgEtVPCd8njOEZo7drPWLmtRM\nHv14MBnb+eIot9sUvt43U664jPk8JagwjWD+Cn9to2h4Pc6GqyuQLfiVh/kL\nYargOPfU9Obq4MZIH/DobR30UdXgHdc2VDCWbalJiJ3u+PeAXWNaDc+GCLoW\nvtOaZpSiKoe9NhFp9EoxdBjJEpNwqmCQGTrUEIwEpyFqpyWD8kVYk12JhFGN\nupnjSi2EGBCMjTHK8ia29S5PrT4uFdX70RKeg275H9PTbzxJx6gyRNIZU4nd\nUi9UxkD/vK8b5OAEzVPys+slRhb2BHwyPK4yl4HkAGw9xrnQcTIBIwiwvdUv\nTfT6zfJ4hWbm7E+DC1ki7d0/cL6/bm5RrG8agUhFof44FqsUKWM57EQ10pHD\nbAFRAWqTDeJG2EVC+WN9aSTzwDhn9X9eLSN6OKjZlsEDouoFijuIfZ0zeZwL\nUJkO\r\n=5Lek\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCacCsERxE+CB+7YghkgmfXEr4y7x2tujpkog+yUYnPDgIhAOFA19qdsYsDA9zi4wGBpZ2QbLNmqm17TE1LCH27Angs"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210128_1611823656169_0.6940310079778111"},"_hasShrinkwrap":false},"0.42.0-nightly.20210129":{"name":"brs","version":"0.42.0-nightly.20210129","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210129","dist":{"shasum":"0615902625a4dda595cdeb257cd9ef5189542b79","integrity":"sha512-g8OBgff4sRnB0Hlt9RzjZ6grnpQIOhYeeDMKFBZgYw6mG3JBdF2yZbXlPjRfXfVBoxiY1+b6ZAj1rWoFJ2J7zw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210129.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgE7mrCRA9TVsSAnZWagAAHcYP/ivCHUcnV5At0mIPU0DG\neJ9eAw5LrRY5U393liCsa0I0ek/WlBy8M+jcOD43yr+S47sAYZkgl1wRt6L5\nRSWqKdnqBd6KZsRTpNvDmHFfCY+KBY+MvA2kcDwViyEJHcNFzUQd5JXdkxlV\nJhwZAADpMgSzMMGaSu/dN+tJz+++wA9yDYOrM3sWg9UzMkAtD5tLAAJwKFYo\nq+tHCPOaNqXfUKUIR6DUkDWYnb1EfrPIDcKYVkqLnfHdeGoo5+I2sJSxA47l\nUiK+Iyji5a4H0ZdfMFxxcbrAh61k3+7HQgJ/3Zy77fEFxVdM/wYRU8mh7TUu\n/2LX6nvNBjlU+vZ7Y19PW9hpYSkCNMYwsCVTLwb1DRMjXIYY7tg5rj5nw03M\nUDOqfIkb/QrXF3wrDFeLBmf6SY7fInBPCHr+6X36Yu3TkXofGmP3HG9Uu2BT\nkTozAS5DaFmZPN3/4lCuKsZt2Gc9TRjPM81x0DeVCRArlTIHA8DUD0IKOkmN\nsYbStuqNtc6jR+1MYN8oyPQgl5kDi3XrIsDESMOwQAntcNDXI1BDSWudn/4n\npfz/DVOwkraXrxwv176npVVO7ZAnwNNZTAO5Z0eYih02EUpQsW78NYak9HYT\nFnfFHJ370meOhir0jmqv5vGOj4iwHsxlmENwGAzAt7Vrz4mMO6PgVLY+8Azn\nODMC\r\n=P0gD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBFU7wJr2ZOHNB5iVV4nzJZJBkpI9+eFN21gCGhXsViSAiAXqwfgK1rd2dlnAiIlM9f+jT4CMCg910aLUvdfKltSYg=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210129_1611905450647_0.03964562648224779"},"_hasShrinkwrap":false},"0.42.0-nightly.20210130":{"name":"brs","version":"0.42.0-nightly.20210130","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210130","dist":{"shasum":"ec0e9b5d38e11fe6994fc2902facfe8f431021bb","integrity":"sha512-ozEB15Akz8qxqRYg7QxX7HJx/rPiCdU2FYFvcAOcDhBJpNQaN3rT4HSZ9JUfTdjyANvPEq9VrMaSJDllIAcO5A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210130.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFQrrCRA9TVsSAnZWagAA0r0P/2+rxhVbYwj1kGgkrDuf\niNui6V/LbZAY+4xKdecY9zGkn71+7sa0eluLUZMgcpkcrdLEdDqmuFB01Yyb\nMTAZa7foXVRMsVFxaLrlWSCL640JOxCcnRZ6FxtdqPyXuHQq9/QCqIwGTVnu\nC6gaazlji9XEPoyjN/IJaNdH89b8PROIrP5MKOnYRfred6OA8+dCyHAhGeii\nT4Ppgi7y5XZygD52HeegCiym+2VgE+BRZSIq+486tBSAuQ/s8gcIV/3p3IJJ\nhHuUMz7HyMto04l8sR0vW3SZdqw+ydxC95hCs0HGUm/cWEb9N3EQ0JvJeEdT\n5Bjf3IfyZcTQuKraOlPBRpsM7rSmJMgwF1uU+bXMZ1YzS1lbqnX5Z+58hD+P\nuDkOtIe7NGN5jUho/D+F2jwDn7NEBbx+6+UHJrpMf5zcQdDQl390Fs/dnIlt\nv5lkQKRT5zz8uEh5ueCyg/E0yKa0zcdH0jU0HI7HozFuAuANks71hLBAUApg\n4yrhqasE4xERTjmoWVhLiJ0vO3jV9NaX27Vh2jkutjfsRAvv54TMcVb6ntSe\nibxbIoBLK+BpNgq1IpM4pOP7uapSXwCbz0DKbXGTccm9utpttScHfhEmiHbH\nGPUIFeMZru3NLy9Gntfbx3hPWcwQcV7yyS3GUW6m+T/9DwjeDb1NMoyQA63v\nwBOg\r\n=p96O\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHY5UsRfQXwwHO8tjsu63dUo9GuGwJR/50VydDIM5XSwAiEAoDvJsXITXIJbJIfV9gA13wRBqD081NjKvR1ZkjD00QA="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210130_1611991786797_0.23925876462900741"},"_hasShrinkwrap":false},"0.42.0-nightly.20210131":{"name":"brs","version":"0.42.0-nightly.20210131","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210131","dist":{"shasum":"4a9e0761ccf94156108c01dd10648ca57b24ef2a","integrity":"sha512-UMX88/vrde3q/ykV0o859DkycTMCZfIxUoJ+ADlPBR6NZ4S6S3AzN0dFWXpprcLpNP5QO5GFUiKSgGhC0jDumQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210131.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFlxwCRA9TVsSAnZWagAAsbsP/A1SOQRts1s9cvTYKm7k\n/66/sebEmlzG/HeF5cI74385JZPT9YdFF/59DlYzQ6QA7e3pRJMJyAIlVEz5\ng4E39yZLlzxusCqfi8DNWCJ/5CS/qRWB5kW3Ahtqq600P4dwBZF3W56OSYOr\nXsRW80MbVUvr7QxJbaWDF+z2QYpcY8nnMte7r5xNyvvhJ40dsr8vXRRbhA8l\nDXkUEbtMeqw1gQILnsfFxpOrFnaEHXSSmEsLYEcLG2YBcub+GDhoUts6Ud7D\njCnhVvoJRQ0XtoINQmLtW6G59MTeaPEMf0DeDzPqisM/soFLFyyZN7EzfgPb\nudW4Q0hRkdcjCi2NQ9x/HwWfDO6dNf+gqMUvHYHQ7JLQaNeCy/09cAdKbPDw\nT5NcDbSU4RpfyRPzI8BDr8PRjsd70h2o0vW4ACyF5DQ+8e2yDs+vUnLhQeCm\n13g/y3Akj5jXEaZJ172Q0pSqUvkWDDxCavVss025ySwh2L+zTr2ACivk1Rv8\nC/n2bwJkDOafSv542ZDc7JSPzfvC6IzUwHfcTDqEMDHw1MzYHnrMAUbjFYgP\nppw3VVWZblPtW4I35hvj2Z2qj+QEX0sQTQ4DuOYKzMp9iPHvuQKEDcbVHUPX\nX97v5umxUqxBhI+W29THlPBSeCRw5cUCfSVo9sAHeNojwRT+nH2IRHoxnqu0\n3icE\r\n=YICZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9ikJ6VWa2mMb24LQOLxiOH1GTUDxbOlJJhOU2i9u9fwIgal75Tro7LzD4sAGdXZbDw0RBIqaNcj4nGRrjMUHGKfo="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210131_1612078192129_0.24097303384815216"},"_hasShrinkwrap":false},"0.42.0-nightly.20210201":{"name":"brs","version":"0.42.0-nightly.20210201","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210201","dist":{"shasum":"304d349d6448f8203a0db1ce8c11eaacee86c5b9","integrity":"sha512-w0y+IA7kN9Fme9ALQ3X+rGFLxQHSub5bDq1t2u3I5xzmloYIUGb6XdcDEocCzKb69J0B76H4S7fHldoSyb0V+g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210201.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgF64tCRA9TVsSAnZWagAAewsQAIB7G0/lE0wHyKYxwe8P\nM8epbYEE6T0xeo9APceiT6NZJPUT47X1/TmAMjlZSsz7BJOySY5mUTvVy+2x\nWWQcLKKgCqseibEPJaLf2nGK0A9nhgGWfO/XDa0tsgScGmTbIAUsa58fh944\nMdpdIFo8hNDN94pxKTQGuQ0gvCxO/0OPSsfNMP5ySiz40S69oUONinVA8XVp\nLi4XsFEIaOBm9I7pGZP0OWZBUrI2Ex+p1fxFSLc1s8Xv4YgYRwJBQ5kiVg1o\nPlvBv7h67/6Wn4hC/+7HqMyT7h0lMXWWZzSZmWUubf6e04+oeghFEvqlMM39\nvuRlQdN8xB7gc+74kVh9re+zczdMHDwcrPGQmM5Zd2Gy7uD8o4lIEfoMLPAm\ninGUlnnu9hQ3vhJKh4BEQpgAycuY2JpUZFJ4WXgZEHIqXOYky7HdEDELHclq\nCdSAI5XIMBmntFoQv6OLfxC7whRk7GCJQCX5PsFhTItBUxf2xfHdxAMbG88U\n/pFVS/xWXadya9h5CjwvTL6gPgrl61fb5iSrmNORFZld4b4WX8DyoEZ5qgp0\nHhvL7P+49x+ZLjO78/EYFLfZSOJAZ5wApqF0eck03KJNLg+YH9Kb1QcrMHTQ\nFvNbQd98nLAxcWADlYzojsaKIpkDtie+vYnHHxYw4Xcskk7/gq80hpUjWHU2\nfN13\r\n=Njom\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGxVXD0m4HXoRq+MPHCn/04rCNm3KemgxQxsL1vcMiq/AiAcOrTYWjZtvfxUIUbQXett2aksUP/xbyesHleVpo8rCw=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210201_1612164653328_0.9961102317601542"},"_hasShrinkwrap":false},"0.42.0-nightly.20210202":{"name":"brs","version":"0.42.0-nightly.20210202","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210202","dist":{"shasum":"f58511abd1c03c3e37061f20679226d002c2f3f0","integrity":"sha512-slc0XCbWQLOtZjzosm3e/YIxNvGztwK6HBc3HA5NLFRZVPIUSoCHf3QypHW9c9Kp5adl499P4iBNck+O00DWxA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210202.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGP+jCRA9TVsSAnZWagAAFowP/1ymATVZU18tEXclTLYV\nAi/qE21dUQgh8yKUZqPL4XJvI/tN3YWnFXhwm3jIH8c5OuFAaq8v8kLvwLeD\nh0q3LOMc9yN79eTqO9SAmXt0vrGozHeFpAdhscOWQ9g0Hm7Dc0Q0zzUOj1Dx\npsAHeWCqgaXsN4XqOJHjEvBYfTbrxlMiDFTPRUgRcLp9mA0QnmFxyDuAUILq\n5T/Sor0VwC4m0lJNbtzftw+n7IWA92CFrXRpPiX/CK7TPbieC7b0Dz0hdJpW\n2Q79ViCKfT6eCeZsm83hN9zaz5Or2oeI0nxoZCWiUaNhHUkVF15tjwyp4guE\nMkt/+PVaatl2Dn7Wl49kj9TJO4qEq1sY51LGJWMrVL/HeKVK+4DL6H4wsds7\nFiyM15x9fMPs2ZxCimf9VD4uIUCLbviDhlsjuGAmXqCvhGP7j7c0H+F0KDEV\nBbgOAnLP/ZFvG++3YBJRbF6N+IlVEZtAeqlkiudkgGB8jNMUAgUfKBk7meBQ\nqAZ4FhYBob2US/+jU1gEZAIP3u/1m4QPZTFAgsyvnafPJnN72uNdPwC+Xdwy\nCSFQigxQh7TktEQeYnLva15/kh9ZFTX7GOhyDH65Hsk9NID5LBZjKO1CTEmx\nYFx3msYEqKCydv15fVHQ2hEJHMH2EgngSetxixSoGej/TyqRIwEJC3SAAkH/\nDHsQ\r\n=BQyV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgj/d4poKX0ZPaT/BlIQiRUKOyLiWpomLqRmnQ9MuMHgIgZuGMRWzDnDPrKMD40L0D357uRN00iSBkTVseLpZzy3w="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210202_1612251043394_0.24993868724489055"},"_hasShrinkwrap":false},"0.42.0-nightly.20210203":{"name":"brs","version":"0.42.0-nightly.20210203","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210203","dist":{"shasum":"ed828054eb9fac2b9bc00c8f7cb11aeb590faf85","integrity":"sha512-gL7c4nn3ihTJpSIvQc23WsFw9UVYq15c9n5JmdBf5aNfw5ke8p0CQRLQ7ruZzgi10G5y6azdqn5eA1B1uIc6gQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210203.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGlA+CRA9TVsSAnZWagAAjVsP/0JpA9DMQAu7RWmRAQ0T\n35/jzCIFVaTYt5nSmpaCUXwiHAk89FGV38ycsFoASwh7tblhuhAkm3nltyUm\ng5BQPOzMw//+F9ZzdrXy/KvYR5h6l65qUCZRmqvQowuY/TIX560HEAtPzu5F\nIzVwtH0GisY0alP3paqlz7TJyS/DrEh8F8GjOA760tseXuodUvLJ5PlnscLA\nWujPSglyeZC33dcvo11qeSii04LwWOHovCe4oqRzZpYlg8Zzs8GpUv2F633m\nME06JeeLdYRZQWp2zksmqLfaHl4u1CLQjGhWp8V1ucSwr4s5EFJL8ZAdOKhr\nmGHDSC6OPVsTIZK4jL2QfqKxyxPfirBUGbce21C7jDU8kjan5uSyWcN0h+K8\nCU5kiB/c3fR8gV6GLi6S52+cj40+tpnOJcM8xsS85BTbC1lqSSvAgFmhXXmg\nTCQrxQbCt5ZjA7AdBPThXIA+AFWx0UHM9zAN0sYd38XPZaQKzDCXCGTiEJ/u\nXFcHI437ZYiOAs1M8iAGFy+sqkJxJPrwLaCMPt3/GqA3dLObsVuWYYNhMyu/\n/MfkguO26McXaQQngGuV/pdyr6bbgPwl9cqQDLSnZ3PIce1EoZl6hqVuD5dY\nxTV7k7vnSQ64bVUIlDuQYmygL2vw7KiBhhPUEoc+iRKmrRJ4L39H8I7mlxA8\nX75N\r\n=VOyS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIARnMCBv801Vq50O1g2ri9SBOUqV94ixDw9Kxh9rg1JjAiEAixDwVyiV37VMus0hsPF8nRQNgkCi3LIjW1k1HpgO2HI="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210203_1612337213494_0.41262679545606806"},"_hasShrinkwrap":false},"0.42.0-nightly.20210204":{"name":"brs","version":"0.42.0-nightly.20210204","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210204","dist":{"shasum":"42e3f43d20e72f733c097a99d40322a4f3007cbd","integrity":"sha512-7UYW8dmgcHMjceLiT2pP0DXIRBdkdmNl3Xqz0pKuJmPICSRsGaXv2Tyd3zkYH8OxZkUnL0eRlWxbHqrJ9ARNMw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210204.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgG6E1CRA9TVsSAnZWagAAxNgP/0IJhG8O0k1Rq2m5Esra\nDaGyhce7cQxT1/Pcx6zZFa9eh5nACZXu/FrwowSIc/gwy6+RBCp4ixo6pZ71\njDMgXCTw6K8a1wH+2Y55Vmj49iWdBJxSlhMXzzwg0RbzXdLfojGgzx9L+30l\nH5QLIbudPacvPNOwpDvmDb62kwNW6IfBTHkUrQNVCUx8q8OsiZeuFReHfeAU\n14R/kAlX7R/raa8asEUBeSwL/4znTWowBfyzd169hpcEo9gcYJQ8Hm7xuMPW\nAZDjejwugS1Vt4PYLPIoae8zzIy75anKIBd4EtDi5oN4QTnoFrpBcgF0dRMx\nbJtEG4fFyd2LP5v2rJpgB3CAcnccFEghsWY2QrLWTwNcAxmlCiADI/t32f2N\nPe6XV0einacjLr0KCYGlW3ceVrHuvOg7ryLWyh3ingErZrpF/errFw9wsw+L\npH/b6xaoBeGu8w8SOcaUfofdWLvxsTdAJMnJfWPryAL3jgC+3Hs3gEbpupLu\n5kRYm/P0MfPA8Ut3FiGc1YVBPads0KIUzXSupFl69QnPR8rZYGQGU70Y8YYy\n03/WjTUm3dj1P5FbOLrtcbLSMG7Cpdf6tvuHdej11nHTQcwr0b2PFDqE0TIB\nqLrS9asSUDYuIEccie0IS7tS00youj3Lyd/tpalnvLJmSckz1o4pQ6Lc8nMy\nfjcM\r\n=+EgX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCjdKjYBZLJyobc7tST6IucnICLzpVGjDfBZpnHL1/wFAIhAIuYBXVfGKRhSUzOdxtZggZlAj4sqBszG9mprk1OfMGh"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210204_1612423476588_0.5167458686438644"},"_hasShrinkwrap":false},"0.42.0-nightly.20210205":{"name":"brs","version":"0.42.0-nightly.20210205","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210205","dist":{"shasum":"8e570b6f74d766a9d6d2c08e0aff30791a864bd1","integrity":"sha512-YK2GmEyC/WdiAhAkCTXXUgFPFIJGA9GYYX69uTMuXAcPT1+ow3TtgcYrfQB44YSTyGhoZi6MZCNp6f8ocWJZcA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210205.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHPKjCRA9TVsSAnZWagAAmacP/115T2AI7br/lGtCjXMO\niqAyAbSYfmcDTPxoLAYSwYxat8pqy3voTKdxVqVkrfiHHWtr1aSxBP3knJfo\nLLEqfTq6TB8a50H5dwwd+aFHfC7sV/zXZmqKtQXrVWX1lAHfWcGWbCYiMhrz\nQ4g9ImZSwiJ01jbSBa5CInK9nmW/6AMGi/kTU2lOVa+zydZzCO2naaRNXRe9\nUtlsQ1q/KHnlVe3fRNaBj9XWzML1IBcpNdTCuftaTT8DY4HsoGcKoD4Z5QqJ\nyi7+hFeCFLFq7RpJeaRfRiP8VLOstV4DS6P7XboNTi2BHKhtaCdQHZEzJ9SL\njrNMRPYYXhrXM4LaPQBa+mZ3W0QPpIE0yOuwnaS5aso9jis1K0lUnADuFC11\n2bkTuo1ZjPUT8R1dVd8pxzdj7qPJyq/XQvrEMVKNUOJLIxIffpxh8QrdF08/\nnLXnrrtvp6F9WpD47dZTt9WRdG94Ac/ZA2H+vVsn6QZhBAoU26I1p+gGnNQu\ncoxv77ApHttgkQEMnEjbeQH/p1xKUdq41EvTFJYp6iIr71O6qd1FOP9rjRaM\nRpxAnGsXoLrSIq+RGr5KelNj9cZjQXAqGligMEsUe8Z2ypbsxbnFPXr1J4be\nOJ5d+MJvyrVEuW6KQ0dtfe2uaplkY/EBdGXIWrFS18sJqkasVP5EaHAn4Ih3\nrOcA\r\n=zQez\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCiHLF7XWAzOOafq/42/fxJt+rXCVKVot7VcJ5PtT7jegIhAKAg7jtfqr6uxIhvn9QcYSTpHwkoSaA9PTRg1DghHAFA"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210205_1612509858812_0.5426188046505149"},"_hasShrinkwrap":false},"0.42.0-nightly.20210206":{"name":"brs","version":"0.42.0-nightly.20210206","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210206","dist":{"shasum":"a887b24f40857062c27566bc9e4d169c2ebbaa19","integrity":"sha512-ZGF3r1/ogUuNSQITGRp306ThBBj2O71Ehas7XacEeK+MvQkL6CVQxSyBE2B6ocq7/kSkZUVfVl199rSHmOAX1g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210206.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHkQxCRA9TVsSAnZWagAABy0P/36TGOqI98Q+k1vOwl8Q\nXLOpwriEaKHr2Gh6YDcTVZiKw65qW4TJRQKpPM0eTHSYmLMdQecOqrBWLJm0\nm0JsUIUc/dIcb/oWEGHFab0LcAF43sjs6HOw9tvVWTsegitBg93Of9gwS5/c\nkw/lQrqQ7nQ0vTXfWTVsj7jB7KJu72KxDsP2kOa1vbuGlEmpV/ZDBodrN0jj\nEnvQv8YgGj7CZa65wbfBxKAlKDc3y0Bm7OY56PrbtGAgIkmtTmZBezkI9r1W\nRMbEByN5cgWFCcDY3ueHhPRmGhIRYOd8KGopuePfcW+TNybyx/YM2OhHbzpV\nwB6OCxXS/w/6MtrTbrYdnLqJMmN96fc2SevckhTjORg3+LBI4UCGCmq9LijO\n9l5smHfHUrUmxTajzL/HechGFMuRxEyIc2kz55UlSp1XdWlUdfOkGwKJoHCV\nsf17fW0X59KM3Ztd2uucaC1A8ZkQG2mDBcXkfaX3RpdcNyN56+7MXvfyG+1o\nF0cjdtVlISVh+qM/AtePOvu5Omj02GiA/S0lSXq516bVTwEv/lweoEkPM/3S\n/0tD/ZMb6G2WpuAqpdxy2wuj6k0r15t+YXSwPD8wJiIAuMmiABI3k5tZpYaa\nVJJpU1qyIlhXj3bzcPMQvvOwlwWzZWyRLXYLMwczgB9pcbRbdcytsXl8CxUh\nhNof\r\n=FgtM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIElyzXuTtVTFmP64zT2bi4EIKZ/siOaFLrSeAiOurrxSAiEAogoh2TQSVazXNyjXoRRDzrG9vbib0mhugzkjS/gGclk="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210206_1612596272473_0.698876660481607"},"_hasShrinkwrap":false},"0.42.0-nightly.20210207":{"name":"brs","version":"0.42.0-nightly.20210207","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210207","dist":{"shasum":"fbfbe277e7d10dea1294c5b28d46438443d749f3","integrity":"sha512-3fVfSYrpugLrGyDgf9cGlHDbBOJDHh1PCsWO0ZJJL4E7SdNWazoye5glN8/Rj1dr9mdeeK1o4zuxKiQXVvdFfA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210207.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgH5XuCRA9TVsSAnZWagAAZmAP/2XdsijDJGFZnu25dhX5\nUAj4bAP8ht2wxyXSDz3pBgkLR6jgWGBoOGgT/khOX/quipE5pwgprnvPRrR3\n75cImJDIvPJivBkxWBHRtZX9zqUU9UXRITnwM8V0EbZW8wtYZhXLp8+O3I8/\nreKnfdmtTczzyVr2enrh6flGTAM2Qwhii3RMWMYfBtMhclma0sLerVNStD49\nEtyoMwyE0cwmVbvw4U2u2KDWOR65h7NrBvUFt6aDxFVn+FGkFxt8CXVjVq/y\n1vGip4RaO+yvx/LEdr++JQEL1D642j5f2vJhWyUeowPnQ10EpkNTqGTTKoUd\n0MrZEoeR7E8iru54imX38ZX09LbVSc7BkIad5zDIg2meNAw8C7Fb01To3Khn\nznyH+Io7WcPPZwcTv2bOayL3F2OJqrY6KOaA4DD+vIkRe25qQBKXD8RZUFB4\nqkX0I6YYxtOrpeVG7qtaIcrXaQstD5gKSaw4I/5kuuPakPUDzx1J/ZNFmvNa\nKPCgHcyaKBuJzDng4kcf+V0yIdUfl5w88XJ+2QTRweF5d6XtZWNq4EXh8aj4\nt3Jb6b4FOldzhtut8eYXmn7h/mlotPfbP1WP7rl7d6B+ZkO3/VxN67tOqm9Q\ngIcYnsrmym3oM7wO+ilrBXZd6kukl+oSufUZapvBGEzzeczrXJfqZd1sxCM3\n2QOW\r\n=ChG+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHK+8uK5zWXAtUuAxxezeb3NRnrKmjF7oFWh+RCl13XXAiAOcS6bbGbL+b8Bre3nNWbOL/YeNcM5lC7RF2NtTgk1JA=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210207_1612682733787_0.7594443369661799"},"_hasShrinkwrap":false},"0.42.0-nightly.20210208":{"name":"brs","version":"0.42.0-nightly.20210208","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210208","dist":{"shasum":"65a16059baba2602290234a1700f36839a9d1ff2","integrity":"sha512-ilqtDT2gGjhCoxgMNVLx4sPRPtv1wSXhPqAcbC0nYkYJCyRvFBSBCikLdfb+akXwKro28HKSM2ukNswg8bg8hw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210208.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIOcsCRA9TVsSAnZWagAAtaIQAIqr5rLra5mFF5jP1dt/\nxRDcIezuu7FKVmFMGMqws2p0AqYXxT3MVekdYq8ak6LD8FEaT1kw9nBfZO13\n6zWb0GQcIOZ309oqTpz/nj1GtydLuyKwEsZ+okkTWuweEC+13CkC0Lt79qGe\nYBueKwBueoQRNdzUvC3+yxMu84AIclje77Bzve0vpnSiWZqPJxRxAJGq29ma\nDTJPuX6DgJNJH9VWdaJ+EfxVWrmFO7V8sXG+f5ToVHWWJNVNALVV1zjNcRU6\nuPGt385ucB84OGuqnGHtOtrggEDmbDzQ6/T0Iuo4GlDvfIIoyEh2jz8kHkpL\nG+9Z3IxiV7hd7ncWkJv+w1jFEafKcQ0kUEw8DAG3M5X44B78HmoLIeZwnIhx\nsA9cQntFUhLzKBhBvn29sYS9GbVynCVXGycECJuqQMlbkcV1Pa/sCVeztHl1\nczWvjf8bNBnn5+xOZ72a2jGyDls23++yOPnWyzCIOKbE+mRuPtrnYCxn+xPC\nlujmLU0j4EaYTZp/BKj3EMwCiL1GS+0SV6qO0BznOsT0yiPbvL7U2Sa4IwzR\nD0AQ1DuIDI8UToS9M9yXrFdGJjQQx0OVRTomFatNJiG0fAqQL3oVkTdOh8Oj\naCL6lJfQp8dIMilzgUq7bRbOjXD1F8ECW7Odnbo8Dihhpmb1sEM+bsduBl1w\nIwtV\r\n=QqTc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHJzY3HVBCbebHWWoDbh9U14eecSNRhD7nOeG0I4eFeJAiAU6NnP06Xi58M9U/3kIaCRPVRE6yPihglN+1LO4pzmZQ=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210208_1612769068347_0.7013531370725932"},"_hasShrinkwrap":false},"0.42.0-nightly.20210209":{"name":"brs","version":"0.42.0-nightly.20210209","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210209","dist":{"shasum":"7ed9909ddd7471670cd118316e89d0f423c4181f","integrity":"sha512-dOyDBk5QgzZnkTb/6nqCePyyEpmFyYdfKlym3iKWuoBpMz6nf368jh511Z1uH9s7Lz71NL5f1YY/qXuXk82wVw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210209.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIjijCRA9TVsSAnZWagAAxNQP/1kCroh7pSDLYAZmUNcl\nlHwScRK11m/WDQC+LqQDNwYtmM3V2qLo74ZQ8WfZZNZgzEbmgK36PI+Ic8Qc\nG04XWJ9qM4RMt5+Of52SzqOJEevV6cgDvO3+KWZa3FhkAoBDX9N9CASKUfZO\nKRxr0w5NPXefZIfthn2sw1P65vjpZET8kg20/5VFof+iJnrwIhpo36N+Q/mz\n1/EHNGwGzG4sFsBjPXp89w5EizmvUMxUOnm/UA3OogW4/HfYAs9gMBgmCt42\n2Y/rkPEzENHBlD2GZ8634ZRtOXUVSvcqRmIYFYr26ljqfDqdjWzZA9du7V9u\nQp14ctVx87uRNeWkyGCwM1/Uvv4cuqMmz1iesoGMgwsSIq+ZYP5qSDl1H/d5\nta0rJFhbvLhFY7NSpaosmr9NJ4HKSeZ+LAtrt1hz4so5Ti3JJlezkK72P6/q\nCDleqoAA5IuHMh5SLr4/XG5F3X7I2fUHgZO+vRfXKwUYkOHl+SHa+AVX8HxP\ncWvA08KDGq9fWX93ZE/9XxERMf4LPGbwrVwC7Xqt8eo1kmv0iLIPnfTUz40s\nA3k/80N/PFjQmUikbXf54R2Lu0oj7L7othRPrSrRzFKx91jWYwSJAviO+qSD\nxvln7lVwyXLGmsm6JGlEWXaMx9To5sNahC0BmtSY7MyXiKkOs45WI5PyggaX\ntBkf\r\n=KjOl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9f+mYgXJKvNjTX+ku9Yr096n5FAb5qZtbC8l6esWtEAIgVZ07om0itW/D29Cgv1s9N8AMNGM5p7OMuISoR/HLo2w="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210209_1612855458390_0.8828165061213957"},"_hasShrinkwrap":false},"0.42.0-nightly.20210210":{"name":"brs","version":"0.42.0-nightly.20210210","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210210","dist":{"shasum":"b2ed9ce3b19eb585b51ec5d561bfe174f81fcae1","integrity":"sha512-TbFw1ALfaEuGjjGfUWGS2KfWzNDUNZD3dKTWY43r4KY6I7mSR/nMvcN4UkPl16zgA8yh2rx8/82wyRoFJ4eqVA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210210.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgI4p2CRA9TVsSAnZWagAAp30P/2/YcHZJu5pb+9dkP6B4\n4+q2tbbj88UulQ+EvY/LfF+uIQSkL9+H47UKrevVvGIoTqQIQgjNo+jyJDlu\nZ4e69B1Wi4MvxYwK6kvwmkkqWTatuNfLjV4Jvlg+pimIH6lWuom+iEbJ4F5W\npUSyJ9fqhWsJXa+HnSI8648WPlwIBwCKgbV8gKmDTpvY4+ekIEynTF09gBGu\nBT70qGdJdseePQFW2eeHrNLIbe0JMaBeMIkkEZV/zdJkOHbov31x5z4G3K1z\nxcgf8f3ty/Z7jeVFjBY0uB6NVr9rqB3gUseRTt25oBuooZzXL8OI9TW9ro/B\nTrfAGun3pNLtFtjChD5AR/6LMGMGCp9MzzAbFIjaawW+e3QOCzT60c7uefc0\nv6C56Ad5xKFSY2LI0a7GSwyys3gx2cDPrL+ucDVgu43zhNfIPZ857C/rXn4f\na+JeSOwWJESb7IQ2YIL8xGM7TnXVLOMvpTY+Z01LAzpOoTg3ssbscVouOx2J\nux/Q00HJz02hGnsrY+VpkSV4kHzKM1JF5SehZ89azmwx9EHKuCfatRLv4m14\nwCyRgi8B0q77tAgkx0/1aWoXBt/uAs/Mso8KkYxdbq1GXqojPF8HbNpIvOfe\nuMNH8KMZ7HILomi/FGyzUe4lLWph+hPqvAP6sHJSHAPRlStu+z2TvCrH3fI8\nKQBS\r\n=Yfze\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCgvgivpXnqQ46xnMVafdjyAUdJjPqiVT4eDkjJ563PpAIhAOyhDlXee6H0gYvhPQ5Z5HT7Q4S1QqnlsdrHz2JZby5r"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210210_1612941942045_0.9909857611725132"},"_hasShrinkwrap":false},"0.42.0-nightly.20210211":{"name":"brs","version":"0.42.0-nightly.20210211","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210211","dist":{"shasum":"b113dc35d334c53aa7427948c42a7c6df2839bbb","integrity":"sha512-5LMIQAcOEc5IkfZxZ+XYVfiqg7nn1N4CNJBNPow0z2qB70k20nanvrtip2KofssXS2PFU0SRGpcP4rZ3Qb9o1g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210211.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJNu8CRA9TVsSAnZWagAAVFwP/jD0SqQHuynLZ4zo0Lc/\n9pKEbkmC8TgnzHgjI5jz1pEX4SVLW/h53IaE3inMyCBPCiJFqsJvBfcmDO9+\nULg1NGwOFrMI7WTYnc9XyfxPe+ywUvWNc3baL92wV8EYMk5kZVmMy9Bv/p78\n2iMrNAhjOtddnFZDyicgBzhrc+7Bvn/JGp4Ym694YbiplbMTrUdvz30r6oJR\nVkWBehqvh4sUS37CiAFwU5M6UCLFWkPEIrkyGxiTpfC31Zu8g4Qf/BNNt66K\nO/kfk6FErLKfV0/u3F20Nnsj4+cnvEPS6LbTZ33Ch3DMaPGOKLGiENywuGqM\nnnTEDYvANhuyBQih9zac8jgxCuBINWlY64Mwx0gDQqxqbSa6zjMJ8ivYgJRS\nNMRHjYjsFmAPgpBkn1go9Q1AFucIQTcltGK7aPCtu06RcS4D10MW61WV4iNv\nNnfale5+DqVwm7o3808kYkhx8lVuAidMveO4KEOvJVxnWPIxABT1HM+TLdqN\niHyMJCoOvzIqdcyslJxRcCiBm9ofkw0k0M0pmI1siQsC1b5f1IPe3RRjXM00\nfrmrDp/cexx5vuZTptCGZ2lslOsgcRFSEQtlR/4ZLQs9SsKD6lvkRHLlwOx3\n+eShiBrSPF9bsuGNxARREGWpuBXvDrAkBiopskNl1dfBxufx4qt+R6Cq6sXI\nTWKQ\r\n=adIe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIENLEMKPEgq3wpbElL3YC5krsH4hwBqZXkOyfRW6Q8JUAiBzQJu74kYeNYMwXTh//qi+FyXqavWT8nlXuEy6Uh0xEA=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210211_1613028283456_0.6157041373563852"},"_hasShrinkwrap":false},"0.42.0-nightly.20210212":{"name":"brs","version":"0.42.0-nightly.20210212","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210212","dist":{"shasum":"af9c4b9be675475b523f4b7e5399954d7bfe1c68","integrity":"sha512-1aUzlJNoPTKgGE5U3nro9dBexXW4Cb05V18OEaJnmjAFisfjbJousbXlu6JOihkhqUnmL1rk1wAOBQ94uurmfQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210212.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJi1DCRA9TVsSAnZWagAASuEQAKRYU+/iuvycegz7rW++\nJ9bqroyMh8rF61GTNFQwSSv7zbCs5yemGBnrLoR0TzUkUrfRjsxxq9U2T917\nZN4RWrIFxeZvnQ8okJ+9Fwlq9L/EOqdQwq46ULslSufWDj1F2M7cbV7twNLA\ncYrnNZt2lnA4noXrcZ9XfrNvv8CcfIjHa6ZKRmnQNExl1BK7k/4JHUZK2VeQ\nv0dGR3znmhLgCIu1r/3us8M4ZoiXvvAFM4n30Dv5Ig/iZ4iF3sAGGZAFtIsV\n0K7wjGNgGmueC/x9kKkTShAroxxEtGRW/F0c4FBdoQN2/m4JjRbjcHIYWT17\nelVZW6fFXX0jl64sqgajqzsxS0aJ5NjnAiKtHTTet4BgOkjTFBg+o6g2oZha\naK4AD4yIu2TGmieG7Hp+VuDyDbvmWWIerOHCbnxYTop3iCoYlVNEgwxySMU3\nnyZSfrs2NTAOsh3t2FyNAg3vzQccBTL6hJ9JrbUZgHWXSDHPiE6blVZg1uU9\nqPp2fz1DbcAZy+NI/UnUjkW308PpuD7FyMUAt4GtzpRwLLhW8kWfKC6c5etF\n0ejaYjoHenNG8RXUJUx8Pt49a3AZhlQISG7EFh0jPBveFSn69VV+/4nki3Ss\n/q0zm1KyBwfge1x+dUHkPMmt1VvsPidWXlwY22XlL9+NSvRNsR4LCQ2/o4Jz\n600i\r\n=4uYm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICLYWUnzb1MsE8LB3uf1s/AnjaPRKvGrxJjvCIOyakL/AiBPTP18/I9VC/g3Gk+vgl0SgXN6nPtBLb3d22GUO+9fBA=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210212_1613114690382_0.8559868063473215"},"_hasShrinkwrap":false},"0.42.0-nightly.20210213":{"name":"brs","version":"0.42.0-nightly.20210213","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210213","dist":{"shasum":"c268fbcbb7684450da7866519a5b447cdb1d2f4e","integrity":"sha512-iLg7nzbNwVIAUV9yTI53hlkuEkZpgr5FDamfgHh3sH2OI8of5OWhOv9Cvm4gFUaxrGO+BJBf7gcZiFYOC5tz8A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210213.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJ36MCRA9TVsSAnZWagAAcH4QAJlSpWEkheKGW0F3BrIw\nlRn4j/SPfAbiJGLbPU6zz+FYXhvyp18f1H+603bNmxpzrub3rWdfPGwFSjCa\n7RV5a6kO4tsLiAVoHgIh5vqBeb56mIL6jSHnf5RvbFG2axwiU9jpAxEwXXRD\nB5EjysLVvaKBSyObYpxFuHhu6FNJetQJH52SiYS9Mb9l9fKPO3cw/OM1uzK6\nXGd0dBa2HkR3dkNIhXAq3GSiT+sr5aW/3okNW6Hw6tLRpqEbkq9T9Cn6KmM2\nPwFzheiir/eR+mjYkyrZGVP0+h1x2CXZY6r4lB2g4SMupzdotlnlXrpXsfMU\nR3hwFh64NQdqQDiKs3/pF0yyAyReVA2nqySNbLPtSTtoYMZPg98LhJAFdOID\nTkK1f2C7QmJnGUefajVP/7Vp0J0uHCcO9+J8m71z8Mpw/z27uzfHMp/JMKUT\n1iY9lBqgVJ0Ru4d5/6wA2QqzvV5AS6t0THqb80Mjm22g14AosPlktVMkxqrZ\nHrsgKXXaYThxuiagOI3ZoDJvyY5Frp9CYC1LTmctAvH6oWIq9gJcVAH5fkuo\nPj4I6KbJGxS6FQwncLKmAsqrEoU/8lojacOce3XvBpYszWfkADo62Engj2qr\n7FJg6ISnBr0rKKh7P+4mTTP3OxbjXW2HB6lolhQRJM+C5y488n4rWMOOWxja\nArwX\r\n=qD3C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE7MLIYwBImoltCODbxSpu/SHJrlf4OagZDZxNt3kAy1AiBI94n0dAun8o7SACp/2tar87cDK3+n+ic/A9QnUD8iyg=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210213_1613201035374_0.42898741152376263"},"_hasShrinkwrap":false},"0.42.0-nightly.20210214":{"name":"brs","version":"0.42.0-nightly.20210214","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210214","dist":{"shasum":"d8e8d173037178d192e6cf817ef16564dfd27884","integrity":"sha512-WS8aoMgpyW5/bj6m3Q2u3HR0KaLextZ3Td/RlQxcCC5oaDDpW/X/0SNZ8XmlTAhltbpwhbnmsYBWASzhlyzMyA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210214.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKNAnCRA9TVsSAnZWagAAw/kP/1T+dxG7EAe2Lq6bsRNs\nPAv98a6gHOEAaoOIB5Rgi5F4TtpX8YZHUmxK1BvosbXRza4d9svyU6zUDPJO\nhmySFfyDE8v2wr6sU4i3jOWNDvXBTZilO3Fo8LUJGHVj174h+hEYmTWvnr1G\n/Yap71BCfH6euO4hFUMyrONUpbuIcleL34Ei8ohW8vpr9iGSpd5NYzRDjBWh\nY89/qIaRScBtaLVz9f0FYuVoXgwBlCavLcpQNb4cyTYxragBy66/TWTYtd17\nqGRjRAmp0gs+o/E/eRcpYvFAQuTunslPp3hH5oRUzhftAHITkLu9zraVMjui\nspZ7draYho3n/RB3Yk7dO7yZbvMkKFffovDTUKl6lb+rUXXU3AQDNCIlxJNM\nR6vMTfha8IXCAv7xv81txkcGJnPBa0Nvp5GVRl76Np52Ma1hb5mK2QAtcwCy\n37vb/lm/i4kcUMef7ODxSWVj/BS7v80z9XIBjwqLfe+Rp+kSouS07+AyEB1Q\nDDKapso8zj7ob71CiePOUaEwDHCKzgQzhXDvnrFhwcpBXEwsIE4q+MogNc/p\n6txwqG15viYcQvTcsy786UavQ8nGKpiMF5QYWEkVwhCD5wIKlYu+qzTkAkcI\n4y67q+HwJTZmCuSs81TwoQ/C28DAJ9CU4jDaPX8bALtjzAniXgn1KlQxEptH\nRGM8\r\n=0DVn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBDfBznRA61keruVFPFrRXJFSq3Jmrj9NNCGktNq8eLkAiEAnfTIMHKweUV1BxyHDeWX927pS9sLHFr2UP3zEJwTQFY="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210214_1613287463161_0.7647528881384813"},"_hasShrinkwrap":false},"0.42.0-nightly.20210215":{"name":"brs","version":"0.42.0-nightly.20210215","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210215","dist":{"shasum":"77997c256368e341c1b7546761f98da074abbe1e","integrity":"sha512-x8mVnXFl1Z3ttnjTu0DAvbQYnQwVipfyb+juqPx/jB53L2ZWjR6R/NsANm6oZNqmY+NiLAiIwmf96AVZWk1+VA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210215.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKiKiCRA9TVsSAnZWagAAjCIQAIqPrpfPPb5+x+7/HyIg\nGWm8ZESzqxLMKIyIdHIHISTjRATjc+6SkfyXuiUHsN2/pSvkwBuWBl4ybvW+\nMIMPchUxKN712AFook3xxiLW9T5Wi85Kt4zOHBZ2Zx7a4fOm58GZgF4Bi3sI\nXAeAM+5GQ3PR0mAn1Wx2cCFKDN9iJVcjhVIjG5PYeBIu0rgrWffxPk1I2ND+\n+A587vXIv9C4P461D9hDoMynEGO2r60A3ylXaMmgq7897BHKf27nUQUuU3Kl\nw6Wh/cdz/tZ+3itERWsALsMKiXvINu763+BbX5dZytEVsoOxe2qSKqwFgRve\nvn1ARFqXbt+1AnIX9tFsJRHfXs+xIqInz/mQE9GFzyfzxc03yRZ2secsJdww\nPK7YSpWP73LvRNL8Za6vKsi0pphmp9VgNFyiuZWxc3ARapqeRay5DM1KsntU\nO7+GR7wGGweq/hrfRuCJ+L45522pJXORNb9QveSyLrYdRmnUcXCWH8r/a5SX\nBeYP6KsV4w3mRk8eyDWOXTCChnGTxMSCwv37IRo222gT1COh33JzSyR3Qu4e\nC6Oui1Hodhl5XWeaX+uQT/5qEK8ypPk/7tvfvM5m5W/WxhNu7FFtykPTMUg4\nvWfqRszooUlkG5A5dAcbTNKNi4U243qa218P6+1aKX/H8DlIrbn//4UWhIXB\nRqcF\r\n=9unL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFocR8BY/Vw22EtK8KrHy7JMJ10uom6a24SKhtnDQ2dVAiEA4uDaTxmz07QYbAvtrZg0T2ETOHEmID+6fOOXk8vXfwQ="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210215_1613374114181_0.3309804588801408"},"_hasShrinkwrap":false},"0.42.0-nightly.20210216":{"name":"brs","version":"0.42.0-nightly.20210216","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210216","dist":{"shasum":"a6a09fb77fb7c2833f401e9ab01dc5b09e4260cb","integrity":"sha512-BkYPJ18HZOui3Rbikp/vsxGekf2ykkTLSOsCeFm1VBAkfuZYqWJW0eeiTQslOhG6eeXVS9WFdHgsgoOQlNUd0g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210216.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgK3MxCRA9TVsSAnZWagAAsG0QAKQU4CrnmuvfZuuf88ar\nwwzQb32KNphMh37iG0ZAuvYLbyxF3EGsmH831Ucd6WCBlYEQYjQA1vdZ3k+r\n2ekvM1w+lLjUz7JtNCcJHORNlmzGFsYvtJP9rqcuoqLCH8f5PDxbbOTp6cqN\nl6gw84PfsfAwhaU/tKuW40UVSe5Qm/iIrjXu3rsNVbWDXiM8dkmYoc2UVFxN\nB7MJD4P4I7YIexkh7VbEHz2SdRbZC+308Hr9uz4bLFu6ShFj+f8SSv+yjnx+\nA2T0BZFzGG3H7kqHLI3M2HhGG2PFltlwKXkkZBS9qxvnoauzQZD8GkIr1yyi\nXGV89CQeSkQxifqaKEXCLbs6xa05cl9f+hEng/ZzxPAwQZqPwYmgKB/KBL4e\nhtoUFlvQ9cloGfgtcqbXuNmdCgy1CSZa5sqSenfO2QCYovwPoIVB0CLyqqx4\nYf4CCB4uTp34SMdn0I73hDzrMkpQ4NlfAFqUzEuKqg4DqL8oEmbeFY1HbDWa\nlX4oSva4vJFG7OtyNyHWrgUFIRcMM/H8kBdKwbjBSyS3rXivXrA9CchVZE88\nipUdtfRIQVLJI001y/tmkksRuG+eQCA/DRcS1Oxd++xOtaHxWHFNS9dS5bX4\nVkRRfogGQizWaYwV+6r6TSxad7Kd3jOAf48qCfdtjjWTnuWlUtd0pVtpPuYx\n/0U9\r\n=dsr/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFbn4jRIM/O9RhYRpD0VuDRp5dycjiQ8XzVxBhHkFQeGAiB77fO5D6+RyMPHoXoq3fZH5YJhsGRWfxxCAJP6zZDW9w=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210216_1613460272760_0.685767197896836"},"_hasShrinkwrap":false},"0.42.0-nightly.20210217":{"name":"brs","version":"0.42.0-nightly.20210217","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210217","dist":{"shasum":"d101ff8943e879b1e8adc90a86fd0f50a412971b","integrity":"sha512-MjcdlSIzvHHr2gfozCjUsiwhTyBdg2q4HjNCCqjwQYk872XuTqyIFuejthpHnCTZos5auWD3XXl8VoJxh37/0w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210217.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLMS2CRA9TVsSAnZWagAAHXwQAIfmpuEjQZs8kscto5Ff\nSEgYZiMh7PQsdzjpDSKNeJKpxKRai1e/15/n+8ri7CTgptk6aqUpR3doRLXB\n9LmdkuB8FZJG7gwI9WtLVifrVhzex3iukIGVq4isJrScq0DFnHgmIqodOAz/\n7iov7rGYvuie2jogZKPd/OuGlokq1HtxW0NzyiPt6DirWDVAss1MFIeSvjZ9\nP+MQ8wpkvqa6NrAXp1jvOW/7W6aINjnPr2Q3uuR71vJ4OXZM6pd4ON5PqxbH\n5UoGs8TZhANEwVyYnmjjSVSoYdNBFsz+1d80Tl3OrGt/yrnfK4BW9tBbLgP+\nNkoK6IR2gpVXPglvf5CpozQTAUgq65tQ6zTj8TKBBWSL813cl0VC9ljXh7FF\nVs0mT/wzO9rR2oxTb+9rGQQnWxAm1sMYGckM2u1ik4EdSXzOC8AbCyZzlXcQ\n6c8N4edGhPGeoE9bvRsjcgJkJdMkjQfJ6zI97MWAAzpi85V2XouBOv8lHZM2\nkzLYq5U2sIOCRuOkOB43YyhqIK9qGOS3se3ySFSz7DCZ8ZSrHXfyx311e0YA\n6rLgEscpahjbYpFA4L62srP/tjMt4A2GssoVxU3EtsktskfClHCJ2tsMwSVn\npG1t1MtKwX4WKsKqPqbBbgFKdRKZNeG7SZOJjAO25cbZKvyJkr5aJZ7vpPWY\nKBDs\r\n=9cPY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbAR5GQ7lJgdahptRZukoejie7ihOAbkIu6HDEjDgWGgIgYIZ6Do1fHgfVSs76exjESdDs7OK6q/IB2hLLE0SfFp4="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210217_1613546677887_0.547836195185565"},"_hasShrinkwrap":false},"0.42.0-nightly.20210218":{"name":"brs","version":"0.42.0-nightly.20210218","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210218","dist":{"shasum":"8ea5a7517fced2bed4843040a6bac6bbebb0f8c3","integrity":"sha512-1CMLg4n3LSNx7DXjJp9Qk7xmpHm4QwGT+5DTX1UwAqZxWQbpk8xX6E/BMeZrYEKYOZj3LOZm3jCnagBt6V9JPQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210218.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLhZHCRA9TVsSAnZWagAAVz8P/321AXZ8FRiaQEQtF8Ms\n6lt32x0tPJK78rdenQ0LxEkiv4vA7tb3czMWVcNL4pZpLbCsgyj/fkir0CtS\n0sfS75pXFiuc+aLQepWcFBapCxF8+P8qalmMxlrO79VoANtZZPylkB3vhIEl\nWFcGK1RLls4eTnBwganQ/VPRncMjYj6274PERdcHV06nRJ0l2S25owCU/uoH\n6KDgdCNHJ1VJ8mJUzg/uNFzxZkNR77U6bParf9qO/ltvx8taClqVpnl4xs13\nQtKOtI2vfFu9ueRB4VLNlrS297+RRZFjQhzMCQGR/BUGbenzrbOeMnh3NR6D\nxLCp0GEsbrh5RMvUfuLgg28AoIpA8UZi/tLn/xfknUhtZvKipugyT4CStVUW\nS5Kzs1vEIOPAKdfNDa8oKwONsaTrN/tPBAxP65NakNNzjWXT8UpTIh7IDjDA\n5GnByXorBHgjU2q/fZmEc+eXiGE7DGEXyS3f1BMm5plUJclpyaUpTfV1r6gC\ngAkZ9z+Jz9r2uHbwSFKhyalwo4nt4NY58s9vhVHVzWG2Q/FMqIg6FAJ+YZwb\n9SB3JyBRn/Lr9ONoiIQaZtLppU/NvfGXR4u//YfXjXPUiuIry4Hohq8SC2fv\nCHHo8/lVVxZWKrI42ehxvNYWtvVf8TJGvWIthwZo413SNdJa7Ay/omfpDZtB\nIUzr\r\n=DxmE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGltVyOwUzc6bMB2SgItpeCzumUXiJ5fXHamNdv8RMEoAiEA3wAH+N0ZbaC8NlzrG3sHiz2smGQE1DSctu800db1nhw="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210218_1613633094912_0.22787275255462136"},"_hasShrinkwrap":false},"0.42.0-nightly.20210219":{"name":"brs","version":"0.42.0-nightly.20210219","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210219","dist":{"shasum":"8044d9238e7ea3646e1fb5d520e9f8af928548d3","integrity":"sha512-ipFkEZWnQPyWNZsQ0n53Aclbc1Pi0fA3OXb680SteCvm9SVDjcj1rijqEuAAEpa/Z4/VLE5x8V/nmFgVmxmzdg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210219.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgL2fLCRA9TVsSAnZWagAATtwP/RShe1Kb8Aiw8Y75285j\njbwvrYWap5qkqx2qT22v+I3E835qAo0w92s4LnqTcHt8LDxalQzRzQQc2t7U\nkEK2Nvnk6Lvc40xqzfNeytzHpB+cl59rmPSrn6Q5NM70hWd5JTRN5s1CR/nY\nOJmEMEjtv7f6tIneTjP2WTdyQaerdsHxISu8dNmFmYJHghxyWdhk0iTknmYh\nh2LqF/1bVI4gm9icx43G1Nt77uXeaZjVr1vQ+yt0u3qPF8KshWpFNUmosGA8\n6teA7cPj7Qy9rk3PYDnpV5VWW7gavMXCJiiw1nfhuTu0sFkrFzq5Cgb4b5G8\n29mbjrSA/azxlFlZAYSD5utYkHJNYgK2juOy166xDX+Ug3vtY66EmNxtnVl7\nybsTHoqMJhgUaN9xJVCfX1jE0xCvVhvXwhZ6Gp25nAl7ASnnaZZrRKd0uPJn\nrCXdvgzkaFSguDTxYQ8Ms8HNh8svxa8tEbfgUR7zhaJ3rp94BXpztK1IjdOc\nYGHebRhky5nQ0ji6WVkf8Df6kW+KpUxfKQLklPvLy/+t/hARIRyuWJVwvf+w\nAtFsb4eh8UZtTce7bdXLxlUDjl+eHEKpCNw/VhOp2W6ZpSOREskn6o9HDmtU\nwImGqOWkHAUfmRmR9E7G20plxqqlT3gv9rcb22ZvaJ3/2CWujzPIMBAq2i4O\nyKA0\r\n=cMlK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB+TgcY8y5sNOIb7g/bdmwYw8dOE90XJ5SqaUreKbAYiAiEAjEGphdyrnUrrtXMHr2pkV4zY/+JLIj6gek6ZnoPDLbI="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210219_1613719498587_0.2233044288359547"},"_hasShrinkwrap":false},"0.42.0-nightly.20210220":{"name":"brs","version":"0.42.0-nightly.20210220","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210220","dist":{"shasum":"7f0acc65fcbe04dc87d6498c702eb7ffcec69c24","integrity":"sha512-kEH8vWFPGnd8NCii/edVPtshBy7xvpExHL7Ur5RalFRoTmuean3IBw4wMygwHY2JIEWTC6fLgs09BCjl+QFrxw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210220.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMLktCRA9TVsSAnZWagAA+TYP/2wJyvbDRRXJhXHzYFC/\ngYMQm+qOchwCL78hAghwRy0C/XtqTKxuT2rC1Sn0UfUyFZEFVu2iaB/6Nlbm\nny1Xaz0gpn1L7gYvCxBe9JShPNid2WufaMTano+Z+09/vizFk9ZEeSAw0Ai3\nsGVblbgJlqTzhLoBJkqFM7M3fv/s4RtYMUCOcPYq4apwEBsNdK8FHqE9btM6\nX97qX80yici5Fk1TgEDHn/y3gDs3Y5cpZllFGe+8o8fRVldz3LZRh1tCkym5\nTQZWvuzROl4CK5wTWNDKIEcqkBKpkrc0sD9WrHH99YqoQ0j7etMA4o4NOKGY\niCthiz/ba9PXi7rUPg2Nv93SpBHuVH4aRGF2q7YYK8P6dt+QgTmmeTPP6Lpf\nLWepEjisjEJCFUH4+SHH7FfMbi4lMoK+z4At2St8Xpg3bNGyxrd2SS9O7LvN\nfjXzXaSI4KOeGRwzEw4WBAjJRP6+K/mc+U8/SlWjdCAGKeRrqZP7lu8/GS+H\nTWsKLnDYvIo4RDqGvJ9LUn2FYnADkx+pUG45KMKcKZpq0TzirqGH4l2WwSt5\nVH/q7UF1FoOFA+ubAqqCY5GrxjHydVd4nS+buNkwiwgieLBiTlcIpQpD0RyG\n9y/X822ks6f70xHsht3ngjHaf8jzrUeCTL61pr4XWUuYTaiK7+hPKDXK4CZ6\nBXwV\r\n=FCxR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjXaMgwJRCfMaVV474U8XsKONcP06bUTcpPueAB5uQJwIgegvF8GyV7OrVy5MBytjoPE86f1kgA+3hFdL27LFfUQM="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210220_1613805868382_0.6402437630230806"},"_hasShrinkwrap":false},"0.42.0-nightly.20210221":{"name":"brs","version":"0.42.0-nightly.20210221","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210221","dist":{"shasum":"58dbf6084fe57e883d7e81409b2241422673a525","integrity":"sha512-HciSQr1Ynh6ERQKK69FeXNp1bE6bW8sdMDCz6eao0+OQzcuqNP3+HBfqel9YrpakY3OHbtsAV8MNUegX/BfSCw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210221.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMgqwCRA9TVsSAnZWagAAddMP/j2m+8iERrxLBfUdnmCf\nagloSDF4aquqLne/WXiQuC9ePtevvsAKDfqFlt2XK207bhkxLsJ/ZqXrOfA2\nH4D3VY1kjOUWNj1D7+23rn4C22GJ8xDbFfKq9Mf39OY0Ie2jx2B6JChqsCKv\nn3WntP01tPv0D3sL8LFff/916OSMZnF3bcT9+0FQY8was7tXobkMQy2iU/bv\n+S78l6dw+TX0plc4C1mDYfBqDzgBrdev5zIQkyWEERL/rrVBB7D4baDXjehC\nj/uzKiJNHy2plLIlGECt8Q6wfVyCsd4IWoZxVnorZwl5nHvblR+TkTfULGAM\naiEbm1gnLpR8US2ohWuRhdxzPD23d4jPxOjK6e5sRPiGIVcazkTZ7HgvSIOU\nclirRf3D9Dbttc0ijtseZftH6JDDLvmrEKl/+Or+jcH5MwXInjELMjeOByjY\nkNCjcRLtJOCT3d91gy3iv2mH3I78mh9ktOMuYmElZTj3rEiVwsWJcxU7Tlni\nWl2XlDHCi+zA9gHYTFu3zS8pPZjrbMvy7fcNwFFJo5faqofGFKnOwT3iGaTI\nkzXVDJVX/yvmp1hNevWfXPyaliUHXScQVcfL67bjsdHljgL7oeVXLPjUcgil\n7jhw2jvBra4Gsgok0vMEI4GFGqZITb3wOOMSZLj0RIBhz2j2N5lQJ2/0/XDk\nxCwx\r\n=5Bm3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFZx+tGdywpGC9JlVb7wXwz0hXpp9Sc1Eoo8maTfuBMzAiEA/gd8JnW+4AGUKhwNKUKqJ/us95Kg8/g6QlN2OsKRJqk="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210221_1613892272067_0.9254994183094047"},"_hasShrinkwrap":false},"0.42.0-nightly.20210222":{"name":"brs","version":"0.42.0-nightly.20210222","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210222","dist":{"shasum":"7597073e6f009a87d19f26cb01089eab48d22a2b","integrity":"sha512-h1jFetAcAym1hDButo2CCuDqgNfOfMtugyADYeL8PyMAWg091rT/EMVBgeCZLXutvI076KoZwhu6O8GaXZH4jA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210222.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM1tgCRA9TVsSAnZWagAAxfMP/0ayIHWWOJqXw4mUqC8o\nzfOzITG5jZ9uXGHkzJmJXi4tAngLhN5GkMFslQbwhbwE78G4NT+A5tDoqcG+\nNrhMaotJ0cJhVX0SRXZvwoZgAdgZnpNpkquk7VJzj7/AbMkDqFNYvylCwGgK\nIXLTXPLm7+Ax6/Fe4Ffkegmd4GcQOibpxO0X42/weaKO6LYST2i25hpiWcLv\n3jas5aGViIpd+JqfzrPgTAPt+cZMjLPgPAccetluuuaL//68cxiR6/D5D+hQ\n1ToSfLBXU/zY1tzVxduis3uh11rhH7fnGxAbgnjkJx4jiSlHgAZq6FrbkuYG\nUB/9T1c2GSejkpgECVqW8qhhJmJya1KCZTX1HjZTAOOC5EdJ8K4xrWJVLOOo\n4YK+nqm7V3g8I8TG/jerTDnAMeOowqwQAsgRAZwmESaOLLi20K9f8bO2gE2B\nrdGjo7GjscUjpM7SVMw/RAWilhG7sb9L2URR5/HI7nOT/y1Fqy9jxCUq1bHH\nsA5az3LAwmQZ9j/IhYDEAbnzuc+zSvOehBluuULsi7Eqk6q7xKRjT1q8E0JG\nWEfikr0LUyVvzvSHbxnnnjtiijXKGW62LCt8qokVw0Zz7euZWAxyVqgE2sLh\nbr4ofrzUyxfHq1aZPSt/F87pCoEmccrpMKWlVa/0F2pKpHkxFFKxxUyWMj3F\nbthh\r\n=QO5s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGrpkmoWZbzIMliwaMmCUfsxrGA8XgLHShYJUJSZFAEwIgBk71DNSVZJoyok184jbDwsrIYe5Xt1vUKz3tDftNYRo="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210222_1613978464008_0.8745026480187039"},"_hasShrinkwrap":false},"0.42.0-nightly.20210223":{"name":"brs","version":"0.42.0-nightly.20210223","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210223","dist":{"shasum":"ea19471cec2364fa9811281dc10159a58b8c7246","integrity":"sha512-sfoKY3XS3sGAqlWiiQrB5Q63MDTSj4ZXiAr2srJILtJbHVmHnmOltbxmRCK4fU9QfFZJtqk36q5AjMadxOEBqA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210223.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNK29CRA9TVsSAnZWagAAfD4QAIQKc2V/UsXZKqik2ske\nJy1X7yBH6ec20k9ElGtahpoY6weNcVkWqBeT3H/EqGoahxoTJ+WnrhnAWIt6\nnT2mXfYVSsdYqc5scGVKtoqpawqzaux6o/s3YMsA6pR9OYg99E1PFmp9us+S\nztPU8iVOJnvslvPm22LsUZHcQ2Uaq0TK1OwJi9pGT8AgAuEJ7kmDTTHEIWt5\ntS6x0auarwldnvPbQ1MPhfOuawLjkr7srE6xBifqJpi95x16O0wkmZKDfXZL\nk5ja9Yn5xCrURBSqIy1eoVvAD9g5oFYtKZF2VxhTyMLFN8mkZWtyNHDSHkAS\ny1a7YpywKXiKzTquSV+RQCwx1+9FjOaclfAGszaOwFH3I0HJ8qCjl1CuWLAQ\nFeRtepnSQyMAminy9HKzQwpQFbLNKFveIOkMvhdZzbFRm298CfdYqYCcpWEB\n26Wx2MDUya0Sfs6+qb02hfRN092tkKHoRH4s4+6HTZNKKThYhxPrpjWlvp40\n2gtYUYMW6uPEtULiSdW/R18cGd2ds0pawg47pAO2tHS22UKHzVD7HJTGKss5\nuh5gibANG+bBs2xkHQuLMI1sSPnisyRj3JG5knWY0yi8S1Cj3f+aDYz8b0ig\nI3pdvCKp42hXjy83nAE9/6PtXarczShYDzNp7q/VO6jl6/ahDdtDuS2m+lmb\nCWxy\r\n=HDai\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBy8Cx0hoqRHvOiMU40ILSgFJK4DWyvI0Re7HYmUDrX0AiEAsS8Vlb0kD+N62u/csP18R8xkRZhN2zG0lIvfGIinnfA="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210223_1614065084882_0.7165044850360451"},"_hasShrinkwrap":false},"0.42.0-nightly.20210224":{"name":"brs","version":"0.42.0-nightly.20210224","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210224","dist":{"shasum":"4558ebbe54130a3a1d01f2a7c7f2d8772efe000a","integrity":"sha512-x/LRojL4s39pjc0q78X9efTqdUoTT/urw8+sF+sOIlAHTJmiZWrA9pl4nhBn+tk+JaHLoZlhVgniu/d9m1nLKw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210224.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNgBvCRA9TVsSAnZWagAARYAP+wUtEctA2oRLseQ8YVd9\nfp2rxUFVpiLQrHMnjkNpUQlV+ZoTSrZF2UCd06N/UJI1CEO8166MjsFaeUgS\nl/lpCfEzomvRCMUP69ku6OS7gOQnYC9eKXF9Vj2lLa9T/Xl2M9JOyvb+GY8G\nbdXcaJR0tfiNj4eVzYxRsDkRy/y6DkmcpynJTVdXHnX3UfP+T1lsqH4qKCOt\nRwCJOSNn9HbGfZpeC3KBSWttxIZ/ohc/M8EQNHKUyxDKYENhJ8GBgbNCdpin\nD2B+otqr4lIQtWZIIygxFXzMMCSCsl/qsUydY2S3CCZpPCAiOFTZyz/vXE4Y\nmCJT/miWm74kGz6jsQmocgmBxZuhLr6QftaTfYspmzqi7YQBwkVWoRtUSJfh\nWCG8zMbWJ1cZrQ4X5gaEs8PgSeC9ziF5XhzCmou2jEm22LH0WBrcaNHzz6Lt\ntVAMqGWgZj389kNJUPqIHkhPU3WC5JiFiublrh3mKJahgjIyt9gIhKyg3Wb8\nbOxO91X0xtctiwK5HF8Z8esf83ODBByoYsx7QBR2sOH5E6i/kCiPKijWmOJo\nO8YZym9ag5YMm4gkdhZvJKKhXLH8CzBHmIWNSk8egoNBnfC9w2w87cFhtfsR\nbVaiL0KelULZUUJINh5+fvTndw5hDUntOnHgWd2r9BOckDHMWYG5d+Yw5mCS\neZOL\r\n=jSXI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTa/l9ilWXdSpbp3eoyZcEh0uswToGazlPViT5iKcPlwIhAP9SktGX2pnIy6VMqRxjQW7UKWptCIg2qI377nbs0paW"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210224_1614151790956_0.6149003987370301"},"_hasShrinkwrap":false},"0.42.0-nightly.20210225":{"name":"brs","version":"0.42.0-nightly.20210225","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210225","dist":{"shasum":"3a81a1c8d713a88e64757ce7a7749e62ce06ad94","integrity":"sha512-6M9Ul/BEdoDPzwLcczLccK44d/GW6THw8uwwkfQhtOGQowuDxzM2avw+DqSbIK3jqli8HMZ+4jHP6vYJ4iIHJw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210225.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgN1C3CRA9TVsSAnZWagAAStQP/RLwB5SlpPByXonttuCo\nDLoWaKhFjDibv6e0vJboVH5AoUNypMUCFwL3bmCX6AJqx06VKhg8AOY6qrdm\nl3rk62oVuEhJlKiwfnxV32qouCrio1YoWL3Jr0Wgg198QQS5amcT5B2GQXB4\nWn3pbt5wItqsBq6ltocKMhRmHNYH11AkPT5v3ofizIz9voRQOaqZiJv5DVgZ\ngbF8XEs9uar69lLP6kXtZhe5KOy3GBVRU1kb9ZUuNzvHXgdW4i//t8GM5xb+\nmTyyP75x4KT7hz/rtEwG0ExmdB/k3G0ZBB07T6dgL3+61iVbuALoYvNjH4iv\nF1UzdxOoutduxEe/f/RsURlDUlgO/8PXnOdGJh6w+7RNehPR5M7tWISh+/Dv\nulx8dsyQG5HL5FnHYVkqJ6aYv5zi75ytxPJ6SKVbdn6nBv3CDsmEwX1FqPeK\nPjgJ2lJl6e9TMoF8HYa1lRM0UGG/JJXuMQQ4c6fnqb9gWwLfm6vI9+kGsv1M\n91UMWcH8CWhLkNH5dn9/MdqII39VrcV+hMDBhfV6C2WHNZhQV0RfXUFz3Qkw\nrFVi4CgKdHlmFB82nUqYOEoKbQa5QPMYPSnJ1mXkTXkqyiAOGqJCVK29B0Ox\nOumISkFwKZnADFaQKbhASEzNccCgiy6H8ITCRi3bMq0Zs1M9JgPX7e3yFIVo\nTPtm\r\n=vpYE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9vly/edhq114g1rWItelXwA/3rJtUmkLZZWP0CPxWiAIhAPg4q80A547mKp6sRgxDxQrVVSDzR6801Z8/X+C+txYF"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210225_1614237878998_0.7176358928493931"},"_hasShrinkwrap":false},"0.42.0-nightly.20210226":{"name":"brs","version":"0.42.0-nightly.20210226","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210226","dist":{"shasum":"575cbf78f1d1abeb391bb33adeb962bfcb89f655","integrity":"sha512-ViH2B3JnZnXpcYwXOMSVDD4dq3BuXhwmH6xZwlsDXdoGuVagKdTiSZ/e88gvBUZdSMH1/zqbz3mNFEpScd9zmA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210226.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOKJSCRA9TVsSAnZWagAAKgQP/34TkO2FDx68DOfHbSxv\nuJp+f4jkJ+TNR/nStLA7WFNt9waDXgWQiQA7WwYV5m+boD+naxdGjFUsieXS\n1APCuDETMJHssCeziCPTqRjZkcs1fHjq38FOGCUzs2JjY+bCJ00ltdVluL5F\nbGtkOnAimJCeNy5Z4eieOPFmmu/1s7/yajerA8LKvzL7bF4YBCSEJ4IExOC0\nLOPzxdWItfJae0i/JXYtfrEd1caZ3sFnTqnB0jIHTdjFCNZE10tKWp8bYkK8\n9SDdwHWDT+e9V+uLZ31UDRksTFj2qwVCB7Omcari89LqAWoKQor2h2Yp79+C\n2SxQpVworCE/NsZSSdZgyCjJ8KKa89ROUNA7ICguG1+O3RlZFD9i4n9bBJ+c\ngiqR2gX85yHNJx/rGi3C242dYaYtP4YeR1q76eEeE1EcGeqVGaIExB09yxk/\nHPo2PJZPb+N48kHzStEOPjrcLQ5yIhkdOT+E8OcKeQCTgfZPqNx9APkkZPmJ\nwHRyZHmqPO2K6RO+clSiJDH94ijgO5UVBbcN3CYJphMeVJJ6L9S0JZPcug/M\nFLmZBU7vdWTdl7lf5NB2F2oMQ4/WTs6Kq4UtwPvqLcasC+Im/TK1HsWAlhiZ\nvIfRC7Vrds/s8/DZ/4lBX8eZHe9zMF0z3hP1ZkSZ9OR/Mw7yrQmr11i9m9rq\nXabh\r\n=1dOY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICXrHtANRvH9FXi6Pur2ur1oNBm3i35zOpbxragDEizqAiEAz69kmloxWl4J8lUAMDL8snOogp3nEIc/mzlL6GbSU14="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210226_1614324305948_0.26029471276949767"},"_hasShrinkwrap":false},"0.42.0-nightly.20210227":{"name":"brs","version":"0.42.0-nightly.20210227","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210227","dist":{"shasum":"fe5ce69bae4fcd53a282397a7645b5342b5d6690","integrity":"sha512-Hifc3lnz6SBCaowWu+xpcioVxBSio83UKLZak9YyVuePDHq5DkC46CY2NCE1n8uSqRS1OkyOaMyVqPCeLQZgmg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210227.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOfO4CRA9TVsSAnZWagAAVRAQAJJTuLKkBwiD/yemtteN\n+BoSjot1VaWWpnvovZ5UNFUQs5w0hNXvvac8U2L2Z5zueHC7t+hYfFsHwjwU\nbOZJdJumFJThsGKLw+nfc4OgAyJt0vsNq8zUCwg+i51FD0DicL43rrpxbM8J\n71usy6YH+UrqSJeR9e494K06Dfd7kzXyKC3yPpnqRJua3wcQi+JKkwdubDbC\n4LZZcVKCWAmHkzL2A4gWQrIQflG1SidF7IBm/lg+mxL9m8dbAyxo2ez/Rc7r\nB/0X+PbHGoI8frIbaq9rSU+2UccxRM6/OERPartRd0DtsWF6dHhx4/2Rp+SW\nRmzbTbEG6CCu4eUA6afocZTfipH/IoYzU5Lh6aGRcR3RQI+YcShh2kAEX7jr\nsFdtdcneFClsaA9tx34fDSsjBwU+Kf7v4dCNRkNsLgfxsUEq0WQTv2zW/Hog\nqdKMC8ycvJYNRG+FMlhY9FP3HVichR6IYkfMaQu/XtRukucuwVAhPw9VTkp6\nolJBl7o0TNCrA2Dxd4Tehz5tXU75fDFSip/dBiscSNu8AeJFzonKHs5Bn5sp\nxWwue8MCwV/dn5hNuAvikY2N5t4ov5HKEuW7+/dcydy8tSz3TyVgpSz4Xzdh\nJMOspxZXHlBpeGM3aVs8xSZeOsQEMDIdYcKefzv/1hKQ8/SuajhfGJFywkAi\nwPRp\r\n=DTp6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHXuLr9xX6+2g2F5wnW9CLsjWwtoDyeQYV9hT/ivtQNjAiBv1BmM1YSEcfEIdnVlJYvsC/vCo4kjwxf5JVL+6DFgUg=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210227_1614410680309_0.44710223673067695"},"_hasShrinkwrap":false},"0.42.0-nightly.20210228":{"name":"brs","version":"0.42.0-nightly.20210228","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210228","dist":{"shasum":"33a55fb98d45d347ab192aa070dafd8f2be9fd9e","integrity":"sha512-kyQEs4txxeOJXRfUo/c+aZCmmXSquUt/zb4ZX0LYCsGqK2j2OMEY4OLPU3ujtVLYHC9vXDjwJniAhgi+XpTFoA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210228.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgO0VKCRA9TVsSAnZWagAAVvQP/3mgnPBGWr4WmyYkF98n\nUqv5hguyDis3OisLFChUISD8ifuZps02WChpi1cu9nOMTmW2obVIyiju2onD\nC/QR/MNv6dU0edV85ORVO1XHyEl4M5OzlSpaQhGeZD3lSDQ5Y8BUJc0GEd7y\nlJ1jplKqZ6J7eKa6uLj4vxTcw2WYR5bnX8GX0SpQogt2WQhAg899hnb3WzgU\n9qw9oAHTswe8Hxs2+acs4uYgjxl2d/09tYC0JJrJhErDqfoJEluoHX6bmEAF\nG/BX38ZnznRBmVesokPlVXIdVt9oKqUisQfxHS8+c0rMoFoQLsJX0ENG0mRt\nOVZcRZZgp1P5hLf6m8fzI8DkQksFMGt+FDEuKo7DLO1RgKFJoV844YW2XXUv\ngU5fPsqPf1wAzDB689PE86fjcugQtcBBHMFwj3A4h/yhODE5nc3xotUy8MMf\nAMNgEV34gjgsUZ/qC7LMugcIqj40q3Swu2Op+Q+kYFaAxGQLtD3nfBLECXeB\nuMN7+lh1DZ1C3Uuc6JtXP0piohGlUn7PqoV7WewxbEplwrUedRgkw+wCIz26\nF+lDNlhi9L38A2qyolpCQrSTX0LxEkxGnKpGTbpfK9is5mRViIo6TE8l7C7S\nVxkkADBlWtC5xkPqS8PBU1HWtAfborQtyPt+CbXkKma3adE8iQqu2C2ZbyZk\nxNgc\r\n=5W9p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjoUQsNWzU7NXrXpaM7hTDiMkAZM3tQmOISdg9dkmTFAIgBseiWvfIUi16ijj1PEGriz7GvABQ4xK+L6QhpTRR9fo="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210228_1614497097339_0.1159661246502135"},"_hasShrinkwrap":false},"0.42.0-nightly.20210301":{"name":"brs","version":"0.42.0-nightly.20210301","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210301","dist":{"shasum":"f9735d56d261939a2d6f1b96a23f1ffe76fb3805","integrity":"sha512-mKyMGh2oR0dXHjdZxPCvAQj8w/xUjwx4GsF9sY/Fe+EHDBlqNqUGGauf/1EwBtTgvFjgpolT3nlv/vmE8AzlEQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210301.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPJbmCRA9TVsSAnZWagAAAV4P/1n82QkrZIaU12SK/Gnx\nF1ygiOlzVlGt19Ac1eHE893wDPqxqgqx287UdeVYzImt7h29NOtXgv/Lkmox\ntUlJsIM2tPi5ToVNQyu/VZMcrtt2g6kQnBpA1VqIToCzcn+ldYb4PVWDKWK1\ndL3O6RPhNZtydsf8MaUKCln0D7n/GMm0kgySTzT5G2eeztE64Nd7AgqtuRy6\ngUAc7ir3IYOwvggIj5wQCLZpKWuSdBQWSbIWiwZlIcfQcpZEPkV3QDeM7bFK\no+V1F7VYXEcuaD7c+r10xAeZqmoXWc4rbnT7mZ1/qbIdZ+BiW8cT2vvVi9cF\nn0NCoodL3998q70yjNjfZUEFrrgV486NHE8JcXbfaKB6He6dMDExyoAmm/pC\nK1w+nh3zqHnj3Kb+LA5R1l5qMAnrrLe7bmIPgm4ZoHFSngN25hg6LSfsaZZ6\nKzSOiUdauBc5T+6JHhAtQbUxW4FNmJcdAbpEHLbPT9zZTUvIMeuNwPwkzc5I\nk9csjSiK8I3/39wN+zleb38b7qFONUdVgX/L+DRz4fNqjKjFNLhu20hpS9n6\nm+VlOnG+vhfGRVQ06d7nD0v5rOaOShVT2O8cfFNVYXoqlM4T/2gRRe8ZaFPV\narXVCtCh4Eksf3c2N9qct/z7mOZd2seedFj69RZy07QKCLG7kVbe+3heVdqs\nP6di\r\n=KAbP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZm79zm9ZJmvS2PHMJkQlfpOZ6HtX5r4z4o1+ov+opOQIhAJ/p031pqQ/LTS2KrmJmSHknJipaNmGm01aeTBF5Qttc"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210301_1614583525770_0.13471036317361706"},"_hasShrinkwrap":false},"0.42.0-nightly.20210302":{"name":"brs","version":"0.42.0-nightly.20210302","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210302","dist":{"shasum":"812093a8ecd0fff0778506feb0661c79eab29140","integrity":"sha512-/efRmQ1D0dx2tb0uZOEV10RrkN4rJXZ4yaVv6GriAdHCWCOd80YPLZlcn1J8wpWIJC1dtDF5N4P18NwvFpzo9Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210302.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPehICRA9TVsSAnZWagAAIIUQAIwEyzLiLeilxh6ORUkS\nA/1R1PNkEu8LPqYKUW01bf6mt//4wMcTa22PVaMwHuG303qGtIdj1SPmcdDK\nX9jTa91Hzv2KFbcLQHcMGelSoXIfcpKBZesKd2T36CrOP1P6JONARmAkMOaN\nqpKCyNGlSPBeby7qdjoBTikr+/YU1WXvRu0eiRcu2WWOi5hQtWEsjJSkMZM6\nIKLKMz2XuyzXXFiNcawsxkkcYiVdt4Dupx/po5HiVPAKxi8guIPcPBmLEVCT\nQlDDr0YCY5LxxDh/GntUrRrBBwtEPZgkmBujsY7x5Il9vR14dKbZXX/4XlH+\nU5aM4JQpcHPPYK9uRc7zraMX7Ntab9A3kYaZ9EfwbQJxCzItokkycmF3niuO\ntEt7KgQqzrOG5q0VOLA/ElSPcXNSUvC2z2ev8mBKX2V6YRRwwIkdNtHphV1D\n+bi92Nuz3/joSDfV7wXUPZ57XFBcWJaXg+kiSjtxKXv60ArnKgAyEIicz5kA\nrP8VEn3Ucvy5XvXa5cPLXuRv22JTcPq9oxMD0x5fTpm8S5qIuFQ7KxsaQvNd\n0Cn2/uFDEpU8P9OjXhjI3SCANDLw316/RntYHYcfXXQbj3Lsf2Cohvq6Cwcs\nwqLg39RSMG+VHI/ALZO1y+FK7HRkjMD492EsRVvAm9E3pEX/jqaINiwNE6pk\nU3h8\r\n=vlIo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGWbGswYyDi7D4+DThqnaIjX6fywgUkSOZEZFWaESZjzAiEA18xc+AzuKw6+/F+K2Y5dPgIwW804ACRHqzIXI580CfA="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210302_1614669896176_0.9604017375507676"},"_hasShrinkwrap":false},"0.42.0-nightly.20210303":{"name":"brs","version":"0.42.0-nightly.20210303","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210303","dist":{"shasum":"866ddd64a422913359107848f171b9726668b316","integrity":"sha512-YkVCZS9ZwK5vyriXCieDZqUSWntijFLyg7JDdgKtLZrLCyjOvFh4pfTDfwyDYnFiCqysKdTeqYIS4ynfgFdg2Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210303.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPzn3CRA9TVsSAnZWagAAAeIP/1016F8bE0RFbNQXLXL+\nXKEWpkcRb6Y5/XNWETFmgmJeAZetTY443vqi3G2gP/Lo81iYb5UtkU5xnIze\n0+VGc7Qw6pmMNTw7lM/iake8sKGHn7CiKs7/d+me8lp/CluItNyDijnkDDun\nDwJ056U+v6ZfemMM2SDC52noKVidOUF5PUiIzVKpTdVXRCo2QLbbrdQ2rngp\nE28DxT3LJIeLyS91o1M0lRf+t6bC9JP/aQT71cUXDqEhBTh+wERIK8R85QoM\nh8ewdG18ZNSg5M3nTCAJsMGTUr0KUvNiwQ4w2aEu4FlocOanmuvKG9V+HBiN\nD2+oRKcltaEoktomqXxqfZzhWwKLPwwCwYGuxF3DM0ixSq49vGtNXxtR1k63\ns/W2mQbnHBYgIIM0sV6OqdzZUSn2eBhP0p7t8VQuX2Xbw+cCxgBisXW1evf2\nqn0J0I0rFSUtXjT+36lUph6spNJWHjpKujQgRIybp9LfspS+7Fu1jiSSnzil\n6BA/uq4/R8TXIxo5FOclbx5dYY7LoiIHYTBdgaFOgKYte6J7jxjr5oH7uLPT\nBWYmuJ5Zq3FaVdxBJJF8vhj7lIgt2Oy3VCLnwN1Asfb3Iyy8YK07UDhSmE2I\ni5/y/mRbLI+YYAFtwj9Jolw9sfKy9O4fomETYVhRZsQtNzJ84JMmsJDA0UsK\nZqDD\r\n=jOyk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHjPQ+fkvhcUHPryK5h7PLQYSaBIAQgw1zjzZhHCb5qdAiB6L1v2yMtfKZyXRB08Jfz3g8rM8mLzkorhx3g8sFR4KA=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210303_1614756342880_0.6406020401927408"},"_hasShrinkwrap":false},"0.42.0-nightly.20210304":{"name":"brs","version":"0.42.0-nightly.20210304","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210304","dist":{"shasum":"4295853d13ebc06bfb2fde59f8e72d46ca2bc588","integrity":"sha512-6XSbShVNOqlfUvVbPAOpTJVvmEcMiNqGEI86LvckMSRp1z5OuN0bfbkVshkdgeY4aS+hQT3shCX3xzKIxrPGqw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210304.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQItLCRA9TVsSAnZWagAAz8UP/AxiZ1iB1XG1PnWco4yy\nXZ7Tk9NiQKZGtKvzKmLAMbYkxbf1Ub0raGiRjC3QznJxKxSzHVA4VCCUjE1B\nhrn0jfmZcILAaJOrWBKUOkE/VDMxGG3kwx3buj0IpY32L0UOYzuGMBlO3VkO\n0GmS64Rjbyb0HSV9bMqeHV6+YgqQ0QLxZccd419E037duMx/FqbX1W8NJC23\nS6dQShq/UJudzEgW3NZKws4u6DwDOQ4SFDDotYiLKcv4thKCxhX/i81JvCYZ\njnYYNp7LPLFKUAFIDDPOFa8oxf9Uws8bbtNHi5Rmk7nQJp6/L1E1mjFuKqZG\nLtONkgFpYwFUBBAhJwgXxH/nuEc2HHysBl+e+7lBzumbs6LJ+XssojXnQuUQ\n027Dvjnk7gtLpguPwTCLWF29jhPYgEMd1/uLyLCBGu3pKwh92a7TqmFERZAi\n9soW0xcXkfnH+Bwxp4XQJYR7ZDdCxsjRq3hEdEEy42sK5klYAbxBrbuCJlur\nl0lhTsj1Md04nB/DBtGJbXa0C2saPFCM95HnAqqXvjiGjvx0KZX9XpDBIRWp\n2+dQpVxUnII8mGHHKJ7GNsKlwBKGmU2L7VwCxN2VFZr7qkC2DfiXhRzU6H2E\nxqYTdWz00gS8r/dD1m2ozA58AFPQiut0pG1yCQdZxoiKNMLVJpfrsr9v02Bn\nDz92\r\n=NmFg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOb3z//0vssU+h9EEyMriyx7ihcuCJYmRmgnrBqKY+zwIgB3XRPHiepq2lbdSrWJVZ5cl9s/PirOUOOKx5QBKscEI="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210304_1614842699153_0.15036190166431096"},"_hasShrinkwrap":false},"0.42.0-nightly.20210305":{"name":"brs","version":"0.42.0-nightly.20210305","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210305","dist":{"shasum":"7629fc168fdbb918522ee6f81b94e8aa66236902","integrity":"sha512-MfqFDDhGnZ70UG0ZzwGy70JPpmzU29t1JkK90grMfpFjbp9U7t2aYBy5KSlZk4t7Pzc0U03eJvuuyNoulGrTlQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210305.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQdzhCRA9TVsSAnZWagAA8ugP/jib3FrOd41wDB77UzX7\nsBeKD6RgenqqUzhlh7MeLJp2+MExGPc4EBjDzGNgEYZhX37dFS4qBvuVq9Mn\n3QcH3LWgDnSwhMWS++D+HsdUrruvSuwVH591cLDaE5gXy2n9CPGSTzCO6NNf\nzqUDPHhfjz6PBQ+gMMW1O9eePdnuQ5ri3zyEbBx7duChbMYFrSycejqgpyc6\nriMGgjKODD77+DBwvArD9qP/JR/sa5n2KUbab68t3LoTxQKfo37NnZCf2Tp0\nEjeHF5AsS9hPggTTsopAdkXSn831UQrnFsekZFo2EYB/dHFwSrTCNPipZq3l\nG5IUD6Eg+eK6TgHQ0BpOBEh6OKT/C7ZNsos9UQy7SreNktzIwJqGAbzvQd5s\n5Cu5Iu7xWFUL998ymK+lGpJLOVgh0/bDq7490lq/uYtSQUM6erewFmHLojNu\nbL1YUsfC/CoyRL2nkOCG7Om7YFwGhmFPDS07ZqezkOd8zJDOmvNnbOHik20i\ngOTc/+SEaKje9RV92XMQaLzyzE66vZlS6vlIvVnWElnn/tiXNKz5iKz1gwWH\nbYAUZpBZxHDJapy4oMIg1+vVQ6JMP95L2dC2p0loHwkLECEQUPINgfkw4HS3\nsUTETadQ11CKK+igOlS0aIUE5qaD27sGQsQkSGi2CgyhteC1wZkmQAWP0ctI\nLmQe\r\n=6/fb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDz6MZa7QM0eSjMBVrPExlEGXY7PLI1iPfS4XdwOkj1OAiEA6SYn/0YGZYgvls3vTESajsnTs2m6AGO8RQOD6MiHwCQ="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210305_1614929120392_0.28361228289536533"},"_hasShrinkwrap":false},"0.42.0-nightly.20210306":{"name":"brs","version":"0.42.0-nightly.20210306","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210306","dist":{"shasum":"0fa029d2190b4fe68820ba41487e6de9435c85f0","integrity":"sha512-hTtm/F8zruOB9EXBHU66R17g/rrbI60zc5QalzyyTPYRt+9PsfZS2G3wwuGE7jsCnZLMWlUHjyw8I0gNjFGDbw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210306.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQy5HCRA9TVsSAnZWagAANYMP+gMFTxBTHOs6O22xvufs\nATkRYPwQUMSQMWJNQ8EqQyDiQWk2EArTEC2oTEch8pEbCOWWBcqVlVb8z1VV\nyqSATd/JQPpiH0VeaBzf8A26eckRKyKeQ1ukyxsIl61uWK3V+GB5PkZ0RLnt\nHd2vVN8q2g/SkLHZapwYSQ7qkHKY5EEWWiwzb1d7Qzasyx//xgHqwhPJghBF\n7P4DvX/sgHKuuj8cdJVDDEB0DOheEWeaJK1QZQfz9OQc9kd+HAdRmr559H/y\nMRNKRTcch3ifHpIZQ9WdflZVTvvH/m2m8XSVEVMjPYzhMFkQogu4XCrPNMhT\nxU5p0WKobj+C7wuAJJTOQ2UCzzJzfD2umQSmOSfKcOOZW7kdWp6dKg+Q/JIY\nCrbA+kIuGBdl4E7kIsXIINqgQi0e2w0WneO87d+d7ZHQLESLy4rUj4O5xtGN\nI/Xgnr0WFP1NPYjMC6TiQuaPDA4Cim8aQ4+Mwzojo9eobvwD+YMXZcIAU2R/\n6nePEMATzpMJMM7dCvOdAbQ7W3rreLonEpiWRbCy/ABV+8x5ICVhwL5bNbvt\niDZMD/kM2Et94FBgrlcFQ/rk/igjEEMvVtrH97yy76Q3Uppmi2JTk505GzW+\nVlmgFHfKap+RgY64BvPs/HUUDQPnuXS7C5rikQGL1ROT2gwLPWcaoAj1K26U\nKen9\r\n=bihJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGND89Unb03t+QoHVCK7/xXcBkIDQX9t+5LlLxFytRjSAiEA1zyo7BQYKxS5gZneSnIzz8in82YtoF82v7ePLquN78w="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210306_1615015494472_0.3395998788303185"},"_hasShrinkwrap":false},"0.42.0-nightly.20210307":{"name":"brs","version":"0.42.0-nightly.20210307","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210307","dist":{"shasum":"543429de9d40d5d1f89047fc5c42f11fe1486510","integrity":"sha512-ICpZ69g+ApIZ7tlRtbldOznMx35vb+7Bfq6Z5pVQ/YmjV711mhhkWhgrj7XCV82HohVr/ztPSIsGFPr8nxr2zg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210307.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRH/QCRA9TVsSAnZWagAAYzEP/RKerL8sft3f70DQvhP8\nA4A65Wppqks3rGoB7pf/RgvePZUYABr6dXAadpdVRaaHkR1iN7dcOVQQL/ZG\nG1gMWPrKvtlaLY2JgWvQkcqgF2A/YQJ3SjFC4HHrLAZCYAbNM1E5zv2abYHD\nXNTxKH/TyuItNOSI38G9ROA/TMHvfgGO1l4cIksAl3rmotsYWF9+OnEOj7QG\n+ibF8bxFHIFpXxU8R0RPuqXeXV9be+HZWU38Te8FEXsXKtSDYJLxDvl/qXby\nAv2t8XN2JbHlNVt+fuFn9h9hdqj65HZYm5Rm9v86MRY9w25ERe/84vw8diLk\nzA6VwBBSOBaas0fiEiN6P67bj3G5P3gbzuyaMLCqHxZQ4gqBekwsNO12CK54\n13/NtDeZGXaRiB2qtjAkoqhNw+hPPl8c9u8800WGd0EYsnlpMpqoN8WjlrNJ\nOGqyZpZLpv5LOC7WwvRU+T3kyYq+zUjMVEyiM4roC4Sk5WvXJP/DNXMI/y35\nUcmAfYLh385S9aY6SQtuWJ5TAsqyRnDic+xO1tX/zh441etrofC+u23/6XI1\nSGjFahVWgbILi3B88m6wDUm9lXHKvJwI+6AJeFMNmLh0UhCq+OHu430xpxto\nExLuBVvDMymAu+jVNuMxux3pWMheTGhty1CgIoirwbUZ+Oxfs3B443+sskGX\n/O0H\r\n=2xMG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGqvCOkZFnFi58c2BqvYunfGkGpUGZ4OkyyCDPHmh/K0AiEA2CU8T4FB0YkORDSPAH5dDO782EVMXYeTvaOjjqJbm+8="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210307_1615101903419_0.7682274160689058"},"_hasShrinkwrap":false},"0.42.0-nightly.20210308":{"name":"brs","version":"0.42.0-nightly.20210308","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210308","dist":{"shasum":"72ed62974e33cfc3471c5889b75a06eee62d2da6","integrity":"sha512-wD6WHvBEiM0y3k+VwWYBayd2CSO/NGE9LffaM3gSeD8DN/y/OIAl3qKXxFDgTpTBsDdoFg0liwPJ+TvKttXBAg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210308.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRdFXCRA9TVsSAnZWagAARWkP/R0NeVv1pUij6dHlMfvH\ntSsxMemhfmy/aj4EdAMV30MBYP8KIRE4LyP7nGNxW5baiwun9qSSVin0atKS\nARawMJKuAVq9HnWGZANgbPz+vp4gwugOkt/kKOVwtBsPZmKAHf6gRU/77dTN\nHFp8c9DK0oAnaT3hMJj89rudaQ80AxXeGShedW28D3FHN47+L94B069h9Vgu\nEkWAGcH0jAlxJ1bZi9Lw49HWnTe0NdWPUWjK3x0UjkSSbaEC8ARA/Rfj5vr1\nGSk5pyZmq81+SI54VU2KHxMoztaprhidJyIB5/2E6dKhs2uL0OZY4pn2McFt\nAIDzz6+kDZ/qkRxpHvnfeKgLvAp5OlJimFJbhwlH4s1wTaB42Brdxz+fa6Pp\ntTX/nbX7cVC+BjZTyVehao1rmkjAZ6QURNwgAKn1aHuqPCXbdF9tef0aeQkM\nI6Ksm0agQdJkBlrt6RJ4t2hX5y19/SyY+Xm3Oyokr4nUmO3Ceku0wC1PRPcm\nwz6Z30LnaaZ1C4l07wbH9JzYhfZ3loCwp0nsgynqNFvZxDKN8iIWMBMA3EhK\nxq5ADVUtjZJ1bvOQMgCc/rOTUIDwq2reB6xWHq8BLDimb5ulFdQgoHwR2Hp4\nD8AhqY5op5O9J1iHdAB3/GQB08DJ2VXaxOZ4P3H9o1XIVBFW1U1zA87tqAXK\n+hyT\r\n=MrS9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHp1/VWZQmSe/SBBa89GfLw/IoJFN/56YOhA500HzU/tAiEA9VSj0xWghYS6WPe4tgq5veYgThqF/Y90zETzV5Xvoaw="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210308_1615188311356_0.12105341752237675"},"_hasShrinkwrap":false},"0.42.0-nightly.20210309":{"name":"brs","version":"0.42.0-nightly.20210309","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210309","dist":{"shasum":"f5bd5280def9845fe33393395b41e93bbf5f17fd","integrity":"sha512-XlnmqjmT6GAiLs9h9h/NxWuGmewoACAHqzAycM+LuGDTUo9EDUrUZ0vOrRg4MogDXJsbJoovnZAlH/Zc+yvVEA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210309.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRyLYCRA9TVsSAnZWagAA71IP/24Q2j4LSbuLgvs2A4EI\nnWs6EPYCqX2V/o5P/zijuyQjFl9atFXHgFAP9RXZToh/WZkQC//d+aPJAc8E\nDcfbWRlPglD/Lr7B76OkKFMv8vBzczQwJXgezzNW4rRKDuGuCkG4OrgSrNi/\nsTihrqBhSm2y10E9SXh/6/BhQjckZjzvql37hLHH0lP5Vi6Ot1mClgck2nCs\nFM9npHS6VKbwg5SycM4OEJzUrY7c4nYk63ysRxGLwc2fi0SSLxaZHjCWnTJn\nfQSk2LOGO+VwWhCoinXcGqjYvEiRw2zvrFFztVNqnocbA6yPd1OEWaRp56rZ\nBklifEFq0xjISgHjhC6dhpxEDUrmDbyfqImgdQ4ZQIkACq4ev+Ak7CmAsIyk\n5/W1gJYZdAheiXaDDJrANjBsNC9ocHWPoyS5cPW9bTBryt4X34dIKNrvYfRn\n8vf/zqwYdWWaLKN+MYXJkttse6B+i8kXsl8N6tnsj4UY8SsUCLNfygcesyZM\noxeBWCEDhkqE9TDh4zxO9buMWYMOkGzOB3k+/bSGx+kb17EyiPTRBUqiO+Ld\nAFM/H3eLyv20stVOwOufFspBDOj4/9hOUeym5he//y+rgej2hPNL0B26zG5D\nr449uSj1VnqdGGI+2OYOASqQz86hg07+nduvz4VZuSAQP1KTLnkg+J8qDYP2\n/g51\r\n=EB3H\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfBEF3P/3a2YuxASjoDMnkCaB7nQ2YC0y8EJ7a+TPrkgIhAI6rReUdWuRQmqX9kQuYQ4qK+7SepkemkzgrxlWxFg9C"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210309_1615274711585_0.7779742508628498"},"_hasShrinkwrap":false},"0.42.0-nightly.20210310":{"name":"brs","version":"0.42.0-nightly.20210310","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210310","dist":{"shasum":"db50e3c2cb431db81c44432cfb2e56bd3843cafb","integrity":"sha512-djOYjB5PDtyimmCkuPG6tuL1oGevS3EQXO1gVsSfIFRGjOqq2K2HaZAYXkimIbKxfBWbteXDIZ1E+ug8Y7Id4A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210310.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSHRdCRA9TVsSAnZWagAAcfsP/iMzMalbjoyMORiPlLjs\nRqtJdc8LY0FXTd4N73kWueWGIP93gVWvgWUgxE+MttpKR6Bi35qJ41ha0HqZ\n2hflyaNpbxv5KoGmpNZCJXTuyKj3i4F5FkANJN1PmXTUVsl4kFmcwF+u8FeW\n6tWjx+6Mu1wHPqzTbXkOFYYtKb0D4mCm3/hTRNFYoyhBWBRXlwIO5fAsjL0T\nrM9SpmYiYlZ0QdbEIEBLjYSPlzAt8ngfC49Au8ZxRhlJ+5r2uzzPQIwnOxjP\nR9ayhjzkZ4+LvqG6vW0L3i4cLTQj+BtRH02AU4LMpOj7JkLsydwB58WbBeZ7\n5oC9Jw+X6JcTv+eni/JQYGsyNFONaSNYON8ryTkRZf2azV2p+WSzne2+JhIr\nzXG15UJco4hsBOL6718FsLoHQgjyi6T8d4DgrJQyLZ18swuslbcbvVSvKjdl\n/1TMZi2lbQvWkj1VZv2wT1BMAvfXv6O/fbtPe8y1++8K330l3H1I+ofrslOp\nEdTPZtDE+6oSIB1yGDshtcN296gVa3570Hhoo3cV/JCeEVlGlUt6BUma7Rmy\nTwMO3NzMsI87O1LFVi3t9q/+zkwCwnEkysMfP0qXKYmJQ+/SThxnfv7agqrU\nkqwJ5MijdRixB94Ng0TaCVm6NFljuv5XdU3d9+3Ir255dOjxpN5Tf1HrJX7h\nCX5A\r\n=H1eY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDby/1349tlhJ9YP/eQVDGkZWnQVE9sArv5J/39122OzAiEAm/UqhBQ3LK+SScEjFi1GixXe7b0rYpKNO2cMIoHqMYE="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210310_1615361117189_0.25612792584379385"},"_hasShrinkwrap":false},"0.42.0-nightly.20210311":{"name":"brs","version":"0.42.0-nightly.20210311","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210311","dist":{"shasum":"71cf9095eca369b073cf400a4167ef6e8de1953f","integrity":"sha512-+YLnzmMUtQ+VanzgjIRkhnzAwtNGIEXbJTBTgvRJjE24G6s5JaAhmuCWDBS+bFPcuDffEV+NrXLigXT8/N/1qQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210311.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgScXXCRA9TVsSAnZWagAAAz4P/iWKZ1UAvE0r+4kTEpNN\nfFvRJsCEKieUXEopXQAxSpDu1N32brTyc26obEMg+Dnzhh4e6V1iFCXyIBuM\nLpnRvvWbopZHEQ9FNSAugRbzvF6F27LeUquvXZP3NjdTqGnPdPkhkXPSUPfH\nERthfnsOroen5sBzzrwEHg5uCY5Abp5W1B0IZGvjTLo8P3MhAWLFiiqw/qtx\nCnerEeVtqPJoFHx1/CRvvl/8xyjaYK6NPNIWyQFvwm77+EXNzvTnwfoHHYIa\n3KF+ULp0AzlsFi34qMlDQI2IXKii1BteSGb3oUVL1chp7Lk/SpLJCdhvTWeg\nPnhFxo+HIvUDSw62Nm4QaSNxDi+kI/yO+bOewVXnThnRJnU8PIgiksqyeGsu\n0BXQmnqk/HKzLJhcZGHbw+pSzppcqpOywvEZd01ODoauT9b661733e8hhWBG\nQXq4v9SAt0k1jlgP7B7Lc65x+fjscOuTaU0OYvNic8LOKWWXRGsUaDkQHmG+\nflFWX3ZPAwQtvTsXoHCivH+eQPuaX+J4VM532Qtqe5G+x6WE7ZyjAqV3rLYg\nxubiUn0udtoEjGiA1ghZvO2rSWi1l7e/5pUkj8OBYdBQNxWMjxBgQs1LSquR\n+SjMLOfRiQomhFctRsfHYDp6iDvh1O9vY/bLagHl4z5UqsMHlzkDLm9si7w+\nAvEl\r\n=TGLK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDaw70jgy61deYo/8Ks8FfgrXWBuT8L24675p3iEQPh/gIhAO10jptIboU6YgNcvyP/qHwYBC2QEIYL1XYHFt1gmA0x"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210311_1615447511408_0.5260947743020625"},"_hasShrinkwrap":false},"0.42.0-nightly.20210312":{"name":"brs","version":"0.42.0-nightly.20210312","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210312","dist":{"shasum":"b3ad98fe2a4821b11d4b17d456f32332db71394f","integrity":"sha512-zuszJsceM55qj84fkxIxxmjLYgCLzgz2nQp5uB/PGqHg1NRmxjr5fnf+nc6Cw0xv8h8DFNrSx4g2wPyfjLNuCQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210312.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSxdoCRA9TVsSAnZWagAAZRAQAJPwyNIaGfM3m1vIGQiF\n6PSaUDSFpani7m1hqGqPjs4Jq8U1+Rdo5iCuUEFE2DRUb5/GWcYjF34aBAt8\nKoWv1rhJH7w646CZQuglr9pqYW8akwJwiLf5B4bzNjEk+eFeMa9ZEAvJYUtW\n+rEC114hB+cOIuaAkbg9W7kJwz/zj1s8QMPX/i0H6YfXvotuAeqM1TQ6xpeg\nOQgb8oQRxxkgTjVHQr8TE/9p/7juBxCvb/ESW2zcbwkuFFgqcv+AOczcSpia\n7bpNmmL/aiTN32QiN+WTT4Wn9f0OKfglK1bxJy3XNSNyMI7KmvUewEC4c3hA\nX0VUWVae3GEhbhmfwHiFMUwbmES3Ups5u2jx31rAHHlpb9XaWpk6caA9Nj+B\nO9u7+ZSvbHwEwS+NwhXLHIunVWbzIuWWt9/848XX9eQMPuWCK9vU+yUrN2nE\n1j0FrWXWAOqUX6lS6dBYsg68Nw5c2+Lz8Z7xnQE7jbke9rDyWMOcBh+7LwBi\nDOyL/Zp+UIrLjjLhaSy/K2cHjNjJVMmX3awF/AbP+sI0UdJbCUCsdfVK3pTj\nGUlfvuW5t4WbWqcvhZxnDCW4uGkMEWD9LTGPym1J/pHrcaMoZhfv9fW/2rFz\nM8gG1U6tr/aNTaxPCX7czIa8Kw7hbQAKIJ3VZK1YHRL9kQY6IVf/2D/LAFpS\nVRF9\r\n=VkI8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDWqTabJ3aKKDEYAD0amo63PsiHVym6iWfN3sMNvDkhUAiB3xKAVkynWs7KgBdstTDWAxfUiITriqhFhF3FhkX53qg=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210312_1615533927584_0.710975401862644"},"_hasShrinkwrap":false},"0.42.0-nightly.20210313":{"name":"brs","version":"0.42.0-nightly.20210313","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210313","dist":{"shasum":"107b9591e681ccc724dc5609143ef3a02fc60ae4","integrity":"sha512-Jr7o4VGLj2WtjAxxQrgp5nU9psbmouUWZtRi43p6lxt2YvCjpWPmFckKbiQqSZWO548NRsKjR5/Z3WhWL7Hgvg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210313.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTGjrCRA9TVsSAnZWagAAE7cP/15IzdACr2AsjNRyHg+7\nK1K+RA0ZqPDjvw7kFkRLeYIgICu+t+TiU8xNpfnkfg94sVnG5da/StSpwTIb\nP8/3sisuWjZSSsIp0zSZD3FzNyMxDZs4mY1sXOBYCtDML/Haay37iK7QxMmH\nTsZ2tZe3Yo0EJQgZO9Qhg9+mMaTR5ypvPwxJRRxmu4PXwh3+wH+pOs2oHi16\nzyJ1pN7ob22xuftzFqMNXqj3u3931+SvE2IcMA7W5H/SzM9FyO0fUuQqXKrQ\nxtQN/xpuJyptTGnryU1VQQzWZc8c4STI3dUkXFqcLqm3MFDMuKXbPUX2LXwv\nSCjff41lWc52UCf0POyark37r7hNFXgDnDiddFXNEs1d3OfVqERyewzKzLDx\nzOE+up4EvVsrHxe6zdPv6f7M3W8eXM3Zq8oI9hUcC19ib0CJFPJOQbLk3Z+K\nZ3y0fTt4sexmrv7a+3ymUUK9ws6Ufg3GYEGz/MGfIKrnqWTRJEodWgKPWdQy\n/cUNNbKVqZnStaL/9XVlyEuIGxkvWeaKvKqqMQc9CAEBJuRIRRygUMVNVEYG\nPuuMYBlfC+yzcn9MnQgMSXfLvtBwAox/oWbx/5RMUYBCcT5sd14/YqCcxvuN\nHKq9MqwO9dfhuJrHzTGtTUGBxFkTU+h923PuwsFoMLb9ajKgych6hBeGXSWD\ns17z\r\n=7CMi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEy/eFm7aZxSGvIqONwAHSEKSqB2IXBmzXuE0ArEGzCbAiBiDzalHuXgNl0KDyIYn4l1XSmyABQgSw8hLPUd/qwGbw=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210313_1615620330578_0.8390613128734132"},"_hasShrinkwrap":false},"0.42.0-nightly.20210314":{"name":"brs","version":"0.42.0-nightly.20210314","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210314","dist":{"shasum":"34e0cc8b8e576a6f7c7121bfff83613796eeb653","integrity":"sha512-1BN4PEqTNNh195Gl8ZiQCQYEcwwvSrp+XY5U64rozqa06tTpa+v/YHk8prPSI8utLwteU2mWO+eY8ciTmFodUQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210314.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTbqDCRA9TVsSAnZWagAAIA4P/jUawAQeDk8VR+DeTWiW\npgkawsTQjCScm3xYJyzgj2KMseSed/nSUHnlPmdM+3uJPSR7/5EEhy2j+ZUV\nyg0lzbpud8A7PcLr4azN55kmfllRvJagYvd2FrPaYWZ8XCD4/sLkDSzRkw6H\nrH16HnEWwvFJWupdp1IkiaoMIKYLp7KhMfR1ETBfimCZvwkUAtY2bCNeJrUX\nYax5NUQje37IsaJFTvGfXA4iL4gluFrRj7Wn20K7cdPlrjxBjTw7OHH9rMac\nOE1+BWlOqANu1NxejrPYDrgnSgLC5BhXDMhh3Hy/CJURfP8BlVLkZk1CpUpW\n/Wwl8fpQscEKWm9tOwPpks25OY8hfwgm+C/L/93IqDzOsky0K12/Lr7vrdKC\nHeJsP5Qbfg9+TEw2OdHlpMWMChJp3Tzrpe15mK0ZITLwuqX9kGVTkG2TxTT4\nj5cNAWtNALHzhzHtjU82w9akIzBHaBXryTq0N80O4bWH3otFCJjqiEDPBIWo\nYdte9l2ml1y6a5s1SCdz2YOp1QAfllH7PWB7LbE+T67ymuFQxtZJ4mvZla5t\n4LZGarY7n3jhyU6DQwQB5/A5sRb92lBJyOP1H4AcK1XxIIorFHT5Bp5on4Bq\nj+VexQvFzRqYwlE+oW6p4xtUvjvbwALQyLavvljqHBJqLseEoB9/Z9aX8W+i\nZi4z\r\n=te55\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpsbdbvlGqVMSyUbKYb073PZXTkzVESB22UnGC4kgd0AIhAIX5TFnAm/FnH0ulG1sD1gipqjlOQSK5suJhiXlOCn7C"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210314_1615706754874_0.7816090337594934"},"_hasShrinkwrap":false},"0.42.0-nightly.20210315":{"name":"brs","version":"0.42.0-nightly.20210315","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210315","dist":{"shasum":"d8fe88c5b6c82bcff4b53f2924f0ea82b4dc5ed6","integrity":"sha512-TlRVu8WBck3MhHjD80ytdquaIV83VRLxpg6+s7i48sbLldCfYWxCVtrQ7hCuIH8KQ4XtZ3ajTqPS4xbc4zdWEA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210315.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTwvNCRA9TVsSAnZWagAAAckQAIsvLoyqol150GrZ5HS2\nU9fT/RxMVV4bs30ijpCeoYOvOyN2zzCuOmfep1bDulvps1rqxd71Q0OvV3RP\nskFn7qiaD63ozTiicIxmGvDL8Z3dwhdN9pzYxuaps6Nauioo+SXZOYiE2SFF\nPKmNr7TPQdevdMKlaJPn0j8JcWNL+bDVYUTIPACtNVb71aySn36aUim4DMFa\nSkP7eL855mB42j6kzy2FiugmNuNyAnph+Sp9UGw+LNJv9K1kkQTDEZdoqV5A\nqvyeK9Bdutrgqhu+vP6wXKRVDprE4578vOrP2sfbi7Y5wRGlZsJTQgPAtIkl\nqGtIPwKj1MmcJ76CBmZgr48aDJpjvg8WJEWKUw4no3WKchKjwsGXAgYZOcCf\nmLTW1x4dmAnERHPlnybEEYW9HWIMtSFRaq+Ca5ZeDFDQWkqvp25w9aej3nCe\ntoUt9rnVhmH2oS3GjYVDIDOdpd0bEqqEdXCBArm2BHeNbfwDcIxFQcWz+7Z8\n6rMTWbDih8+bipupK44520qAu+sH0eVHpQCc6Ojh4HG1V3Z9uNISxmubaeGC\npDNQ1m8nlUN5CpQWbcjOXgbBPySed5ThYcxqRDMmXa4JkeQSRF0XtezMCuWm\n96bSqhuaMgNYOeIr3ywhdR9Ceh2DiJNec9CBT/naApmZpwi0ZoQ5axzNB6Nf\njIcd\r\n=mRan\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICgAVEGdTkp39LgwqzeJ9Fob8ebcbkSLThDijTQp6LL4AiATlm1hb87acw2FmjL5b3TTZ6EP+gJ6RN7Oq7Cw9UCCfw=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210315_1615793101320_0.19728912165974433"},"_hasShrinkwrap":false},"0.42.0-nightly.20210316":{"name":"brs","version":"0.42.0-nightly.20210316","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210316","dist":{"shasum":"f36ecf894293e1470d35250be2530d7ef5a2a1b4","integrity":"sha512-TItcwyBWx2G0wLHHGu5gWjV9vU44+SvfuH7O1ypLkwPxfJRYCmVCa/BCanmwkc+0FCP2Tg0RvxtwPws7SwAP/A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210316.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUF02CRA9TVsSAnZWagAAgn4P/27LMZ4ii6yHRa7ffxra\nRlAmVlmqbrn3wsX3KYNLgKyatNRTSGK3bI3Tp/ae5KbTF6P6TRL0uFpedi00\nYXd7+dmktDgX874mLd7MXEaWgAeQDMgaB9t6a8RFlLoHkF7N+VDD1Rec3KL5\ngVcvSebre77DwRIH5cpTIEjV680ArgG2GCD3gGrmKj1Yrh/CqwRa2sAyMCDO\nf9hRLFEJft/Mf1kSiV5gSqmcDFuZqRk4mfxdt6wlNPgkkTnmjnLAjhhQkCBS\nXjsXoFW7flshoNqNfhvkIbJ/ECxtXtxBs6VvK8dqPdjtjjWotJE/RfA6oxrD\npgaDnO5vNQmvNL5T6nWusIVI9NLhGSykryhBpi4xhhF2OC5YIfgUj1VZSbGg\ntook5uZgFdAJw9UiSAcAy0e2U3o+pjDyB1/PHRCSAIYtGZoQiDrPHenMNA8m\njqBCVmTw3hwagSIV89iVqDB9uzPu1wElSEhUJ1JpbfOlsqUV+afjVmWaydXk\nz4Pyf2kYaHPxEDOwBx81Vv68afw4HbV8eOcPUXYKq6M01CnYXNT65FT6PJQ6\nuVl6ZK6Am3N1LKikSdJ/wqdZnbf7NT01re/tgI5JRdwyS8dzT7ayEDZd0pym\nXBMwp0qMV61dLywsuaBGaVdJn1T9lv29N2Cmc+yJK9+sJwSrsh6XOuDJRXa1\nW5P+\r\n=GyQE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhCc8cUnV015dRpYbXOHTS9qsboBLj3eFhET2h7GtyZgIhALpO8lUrk0PS6IkbBnN15UdwZltCTYEUaShPFhUcBPgi"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210316_1615879477582_0.9893911507168704"},"_hasShrinkwrap":false},"0.42.0-nightly.20210317":{"name":"brs","version":"0.42.0-nightly.20210317","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Gaps](#gaps)\n  - [Extensions](#extensions)\n    - [`_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`](#_brs_getstacktracenumentries--10-excludepatterns--)\n    - [`_brs_.global`](#_brs_global)\n    - [`_brs_.mockComponent(componentName as string, impl as AssocArray)`](#_brs_mockcomponentcomponentname-as-string-impl-as-assocarray)\n    - [`_brs_.mockFunction(funcName as string, impl as Function)`](#_brs_mockfunctionfuncname-as-string-impl-as-function)\n      - [Mock Function API](#mock-function-api)\n        - [`mock.calls`](#mockcalls)\n        - [`mock.clearMock()`](#mockclearmock)\n        - [`mock.getMockName()`](#mockgetmockname)\n        - [`mock.results`](#mockresults)\n    - [`_brs_.process`](#_brs_process)\n    - [`_brs_.resetMockComponent(componentName as string)`](#_brs_resetmockcomponentcomponentname-as-string)\n    - [`_brs_.resetMockComponents()`](#_brs_resetmockcomponents)\n    - [`_brs_.resetMockFunction(funcName as string)`](#_brs_resetmockfunctionfuncname-as-string)\n    - [`_brs_.resetMockFunctions()`](#_brs_resetmockfunctions)\n    - [`_brs_.resetMocks()`](#_brs_resetmocks)\n    - [`_brs_.runInScope(filePath as string, mainArgs as AssocArray)`](#_brs_runinscopefilepath-as-string-mainargs-as-assocarray)\n    - [`_brs_.triggerKeyEvent(key as string, press as boolean)`](#_brs_triggerkeyeventkey-as-string-press-as-boolean)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Gaps\nThe API provided to BrightScript developers is quite large, and implementing it in its entirety is a daunting task.  Parts in the standard library included with the Reference BrightScript Implementation (RBI) are [listed in NotImplemented.md](./docs/NotImplemented.md).\n\n## Extensions\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, in the spirit of unit testing, it also has a few extensions that will help with testing.\n\n### `_brs_.getStackTrace(numEntries = 10, excludePatterns = [])`\n\nPrints out the stack trace. You can configure how many lines to print, and also use the `excludePatterns` arg, which is an **array of strings**, to exclude files/folders from being included in the trace. *Note: this function internally uses the [Javascript regex engine](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) to match the strings, not [Brightscript PCRE](https://developer.roku.com/en-ca/docs/references/brightscript/components/roregex.md).*\n\n```brs\nprint _brs_.getStackTrace()\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"lib/utils.brs:25:4\",\n'     \"foo/baz.brs:50:29\"\n' ]\n\nprint _brs_.getStackTrace(1)\n' [\n'     \"test/baz.test.brs:1:10\",\n' ]\n\nprint _brs_.getStackTrace(10, [\"lib\"])\n' [\n'     \"test/baz.test.brs:1:10\",\n'     \"foo/baz.brs:50:29\"\n' ]\n```\n\n### `_brs_.global`\n\nAllows you to access `m.global` from inside your unit tests. Usage:\n\n```brightscript\nprint _brs_.global\n' {\n'   someGlobalField: \"someGlobalValue\"\n' }\n```\n\n### `_brs_.mockComponent(componentName as string, impl as AssocArray)`\n\nAllows you to mock a component. Usage:\n\n```brightscript\n_brs_.mockComponent(\"ComponentName\", {\n    someField: \"foobar\",\n    someFunc: sub()\n      return 123\n    end sub\n})\n```\n\n### `_brs_.mockFunction(funcName as string, impl as Function)`\n\nAllows you to mock a function. It also returns an associative array mock function (also known as a \"spy\" or \"stub\") that keeps track of calls and return values. Usage:\n\n```brightscript\nmock = _brs_.mockFunction(\"FunctionName\", sub()\n    print \"foobar\"\nend sub)\n```\n\n#### Mock Function API\n\nThe Mock Function API is modeled after [Jest's `mockFn` API](https://jestjs.io/docs/en/mock-function-api). Methods:\n\n##### `mock.calls`\n\nAn array containing the arguments of each call to this function. Each item in the array is an array of the arguments for that call.\n\nFor example:\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg1 as string, arg2 as integer)\n    print \"fooBar\"\nend function)\n\nfooBar(\"baz\", 123)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n' ]\n\nfooBar(\"lorem\", 456)\nprint mock.calls\n' [\n'     [\"baz\", 123]\n'     [\"lorem\", 456]\n' ]\n```\n\n##### `mock.clearMock()`\n\nClears the `calls` and `results` arrays. Does not affect the mock implementation.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nfooBar()\nprint mock.calls.count()   ' => 1\nprint mock.results.count() ' => 1\n\nmock.clearMock()\nprint mock.calls.count()   ' => 0\nprint mock.results.count() ' => 0\n```\n\n##### `mock.getMockName()`\n\nReturns the name of the mocked function.\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function()\n    return \"hello, world\"\nend function)\n\nprint mock.getMockName() ' => \"fooBar\"\n```\n\n##### `mock.results`\n\nAn array containing the return value for each call to this function. For example:\n\n```brightscript\nmock = _brs_.mockFunction(\"fooBar\", function(arg as boolean)\n    if arg then return \"foo\" : else return \"bar\" : end if\nend function)\n\nfooBar(true)\nprint mock.results ' => [ \"foo\" ]\n\nfooBar(false)\nprint mock.results ' => [ \"foo\", \"bar\" ]\n```\n\n### `_brs_.process`\n\nAllows you to access the command line arguments and locale. Locale changes will be reflected in related `RoDeviceInfo` functions and the standard library `Tr` function. Usage:\n\n```brightscript\nprint _brs_.process\n' {\n'   argv: [ \"some\", \"arg\" ],\n'   getLocale: [Function getLocale]\n'   setLocale: [Function setLocale]\n' }\n\n_brs_.process.setLocale(\"fr_CA\")\nprint _brs_.process.getLocale() ' => \"fr_CA\"\nprint createObject(\"roDeviceInfo\").getCurrentLocale() ' => \"fr_CA\"\n```\n\n### `_brs_.resetMockComponent(componentName as string)`\n\nResets a specific component mock. Works on both partially mocked and fully mocked components. Usage:\n\n```brightscript\n_brs_.resetMockComponent(\"MyComponent\")\n```\n\n### `_brs_.resetMockComponents()`\n\nResets all component mocks. Usage:\n\n```brightscript\n_brs_.resetMockComponents()\n```\n\n### `_brs_.resetMockFunction(funcName as string)`\n\nResets a specific function mock. Usage:\n\n```brightscript\n_brs_.resetMockFunction(\"MyFunction\")\n```\n\n**Note:** If you have a mocked component that has a function with the same name, this _will not_ reset that component member function. For example:\n\n```brightscript\n_brs_.mockComponent(\"Component\", {\n    foo: sub()\n        print \"mock component foo\"\n    end sub\n})\n_brs_.mockFunction(\"foo\", sub()\n    print \"mock global foo\"\nend sub)\n\nnode = createObject(\"roSGNode\", \"Component\")\nfoo() ' => \"mock global foo\"\nnode.foo() ' => \"mock component foo\"\n\n_brs_.resetMockFunction(\"foo\")\nfoo() ' => \"original implementation\"\nnode.foo() ' => \"mock component foo\"\n```\n\n### `_brs_.resetMockFunctions()`\n\nResets all function mocks. Usage:\n\n```brightscript\n_brs_.resetMockFunctions()\n```\n\n### `_brs_.resetMocks()`\n\nResets all component and function mocks. Usage:\n\n```brightscript\n_brs_.resetMocks()\n```\n\n### `_brs_.runInScope(filePath as string, mainArgs as AssocArray)`\n\nRuns a file (or set of files) **in the current global + module scope** with the provided arguments, returning either the value returned by those files' `main` function or `invalid` if an error occurs.\n\n```brightscript\n_brs_.runInScope(\"/path/to/myFile.brs\", { foo: \"bar\" })\n```\n\n### `_brs_.triggerKeyEvent(key as string, press as boolean)`\n\nThis will call `onKeyEvent` handlers up the focus chain until the event is handled. If there is no focused component, nothing will happen (which is how RBI behaves). Usage:\n\n```brs\n_brs_.triggerKeyEvent(\"OK\", true)\n```\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210317","dist":{"shasum":"fa51a56f6b8eb3bdda17f9ba231467047d435ca0","integrity":"sha512-u07+A6IrWVJfsaekNy6rEvKQv5anjr/fFITpWrANHEuqWAVjabTCzZ/8W2hm/+JVxVzKyy/TN2SVxqyeoMatcQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210317.tgz","fileCount":218,"unpackedSize":1362483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUa7MCRA9TVsSAnZWagAAnA8P/2TP7dKUxHWTxbnp5wiW\nEVK8sBZQxx+GUv14ouaW+0v/yYTdbZwIAICUsFmzE8tbKeUNYVgY/mokJ+gW\nAHzVsJVV1ZopvmHSfQfbGzn6CB+C6rMzcsTMOATEQ4rVhQkah/GYhyoactAt\nwP+s1jlDXCmmMQ98DFqG7chmdEbJepAEg6d2Jsf9MF5/aWDr2E3MHmdwlX+7\nB2ilpVeRtgPLQDbigfyPdJgXQ68FJbvaehnRioQ9ThYdSz2CxqOHoN0xo948\n2vfCfoqRiENNOOoN1l4sGWuGtJgK40tepmNcPgP5kuigXaXvg4WLhmaybqmi\nStsjqrns5Al+8crIGpgVsHqjPuLXCnS4ZO1Tn4f/HI4hVqUOOAGfoc81xdGb\ng1udLLUvdkJCnyrDHLVDInYAe3YH2WiHeFgPW+5hhI1ngq4r1XLJa8GhXfno\ngbeVP91IGCfQ/44hc7MxE9aGJi1K94DbGDTX7cx9kHcVz/hGew8pUdzhfmTu\nuQ1X7x88kcfxqydV7/Dm6lyOtAQvNIo8K3XXFqnMGmgInwidxi36+L6XZxh3\n/oADN4SSmfT/eNwDF4h5qsw7U/S97SgqVTcNj3BbVjS7OjPXDMfV1ycNStz8\n9LM+mpWrJ8agjtadUHSlji993Qy/fUAmdfxjmJFxx7agqstklxcu6kapfa/g\ndFdG\r\n=4i1l\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxitoY90JlCxHwnNbg4Mf3MT6kOlK2zvZ+69TMrlukzgIgYT34H+mrU/C1auAhIS4SGNaw4xT3DRe6lC5Q+yC7+L4="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210317_1615965899786_0.37783619532578117"},"_hasShrinkwrap":false},"0.42.0-nightly.20210318":{"name":"brs","version":"0.42.0-nightly.20210318","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210318","dist":{"shasum":"536e5e292e065d75ea50045702f0dda1f495f379","integrity":"sha512-6JUzXSl1+h8n7TOtfhQrwRB3AIbvm9rapyWcl3c/0OSChAbrGYBhgo2V5Kq2VJGOeCM/xgS7audk0dhqIv5gYw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210318.tgz","fileCount":218,"unpackedSize":1355489,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUwBHCRA9TVsSAnZWagAAxRYQAI+TfxD+dcqOwuNoerd3\ntkh1e7z7XCcMcm4LT5ODx+d8GlWYobS6l+J39Qs8GjWRNQ8ehn1SzcABjZTs\nAZOXXwHurebRpIxiBoV5pAe5AVBGR35iGxgEQU23aD0YwuaN9ZuU5kHJ2ukh\nuxLhkSyevddtismrIqgMT5U9v2252bjIy8zyzNlTqeqOd+JfcEmnmzJjMPRa\nDpEy6aDh95uJj4ITvRUMqZJBj/oqXclbb3CiMAthASZe3+dtbqyWMYEePqSo\nCuQgGRq10fUF+s5JmkvoVa8nfZpWigg3rul4e5nHw0BJLpOfdwNTgeGe/otB\n8Vf9IDtts2iGuFVvE8lvQ4bvi527G76Mqj5Y7Xh3PnrlKA69AlyM4qjKlEnZ\nsI2yXpPVR1sUUMwS+fxa20gsvWWns4SOBGzDHS6OQ9NxCINTOC1O+5Gi49r2\nnmn0DECSeDTyoVKFTxW4YBMRHcvhI4v4ph6qbDMv7dV35i0zuMRvwwg7XGSm\nFDt5tzfgIVlA7CQ3HxnEBmV03EmKFx+0v1PkGUhhvF5n5ZU4TQG7mtkie+8m\nmdV2aFxLo9QNaXEmFZB5lIExRapK7gZfYYxxBMQv8GTUBjzYdEr3rBzl9sH2\nqJ9FYNvYGbDE6uHkFt2LMfYZ2G+cw8Es9nrLQ65Bt0cMlXlcfg7yOQM9bHcn\nB3za\r\n=FNKv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0Ky6k3d3zyO4MxTmEqmZnUVEPR06HqvlJQVTHWGFdvgIgN50dGbwJkIGpeV8VsY7tdZT6m08staMrvxwDYS/VEME="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210318_1616052294176_0.5726854142423414"},"_hasShrinkwrap":false},"0.42.0-nightly.20210319":{"name":"brs","version":"0.42.0-nightly.20210319","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210319","dist":{"shasum":"3c50f1c261fe38364cd24c428a003a291a243aa9","integrity":"sha512-7KetfBnxJlCuhCV1812byTexkGIMsB09rw6sTYcvBcvrV/+Lbb9ohCX2iYtED6l2FxzmBDNkG8ZBTdBfoLEF8w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210319.tgz","fileCount":218,"unpackedSize":1355489,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVFHgCRA9TVsSAnZWagAASXcQAJ7D6aG6KlS6iV2ZWgGy\nHTCNtyVOLTepa1WFOtGLfAhXmMGs3HxQB56G7szN7gXFsYhNt044+1y1cKd+\nZxiCGJslbS/8CEPlWIeuLB9TLHU6aI9iDgJZzgTZXayHXNnNsLMjjoa8Abxq\nCP90yr1vC0IyMKEhYjpK6bWB5VXPvvS+9FP1fVfL/KSm2pSGKEwaSvXE9ICb\nq+zH3wqN73pZxEkBZjC4yk3FfdpgsQV+Nxvgh+BUJJ7t29A1Y8qh7yEYxHbc\n8dJBaQeHkTeYYnwlS+YZn9iExG0+7+Vf/mjiEW6ApxmhdVExvR8ZwxM5d++f\nHsx9JcHqQaTgb0cdEG81QGEsmPuFPxbu4HG7gg2LGcPJAkKHrfVIfiUzj3YD\n4RRWBCG8o3lkHY7a5fpkfLbaj1E1pYA3JlQfca4b6m9NZux1vzVmwP/Vskd7\nPQgCyNZ9QfyKAA0oqX+w2PHdlRAKqiSXBookTeQNAVpVsj18Qn0YUP/4NouG\nsQQXpjPL1TC6koE3RGv4MimzwpXzkr77HKuBYhm3ntwH7rJwi4OEJv/cuoWE\nIXy/ElZBJHuVzTGX33q0OsbxhcdpwcaMNoqx7ipXBBTgHnMPT6tzGy5Nf64S\nZkRUB6930lXdQ3Ph5XizdfHvZmD40q8sfG5NdjG9q1twFB6BrUsuogjAkoqE\np+7X\r\n=Reyo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDP7ecUCSVb4wR3e1+2rCHGsqx9x10S8mf+86ixYHvKjQIgDDVqVklEOYd0+9vyc4Pscf2ZuY/kWyc9FUrcPpIFhko="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210319_1616138719790_0.03577835668218632"},"_hasShrinkwrap":false},"0.42.0-nightly.20210320":{"name":"brs","version":"0.42.0-nightly.20210320","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210320","dist":{"shasum":"d395d2d6fec6c050cf235a3028987c459521f8cc","integrity":"sha512-lFxilTMA1F9ZrEfGhjTsMTyw+JkJl0eHgbTc4UwoNYBMseYysCji9sf04NUE1jsMxIa7hK7UY3/iU5HLh4jSHQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210320.tgz","fileCount":218,"unpackedSize":1359613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVaNcCRA9TVsSAnZWagAA3QAP/2SXWaIPLyICQFTuaGDa\nYMMqAoAqmSqXqQ6arOTr+A8Isu1pCpZs/TZ+W5xbOElkMhDmRpB58aB0uiVu\n74CZG3xDKlBSvUPT30Gl1XA2hC4d3I7zqAijhnv4Vyc5w5UZoP1uzt2ltgDF\n0hB+aW32G9huSJQu3tzykGH0ZW26D0IkI2r8QLgny5epiOq/ddoNzNPixEki\nzQDRaSngbSRjyj6RT4x4bmF4YzB6zJsjdwpSvICgZ7zjVAcvwnhP+BdTpUXG\n0/g3oOt3+KRG4o12DfZxUOHbzZwiZg9D5bcH2QGt3+M+nR9U2Ly90eZCicEl\nzYi0K+MBZECtUuoZW9ceTwEOfQPp/yJpooD90pXZnCo9XAr0AQtSYdN2Pt+H\nThYTIoV/Zg6UTi/Y0bhvwybitkfIph3gRrLDKECSPeOojY0FIcXZiwbvvVyg\n6CQ1h6jnpFY1HO41Obtuu54PFHMxNnRQ3DEZnu8Oww1WrD/xtnbaYKxIWPXK\n5/FjchkAJGISx0/8QwW6vznTg/mXwX/5DxMJVh1HmW4PjVb0+oduO+CpYtj2\nZCuExZxfKHvacBuPtBLbJ5agADd1NIEP9ejW79bI0vw/NpkXnBwwwbuvyVfe\nE+MGE+IVX8jauQwwCL9d1DPcBhYlVUS0a/8zaGzykF6RL8xD8Tlfgp/rz6zQ\nJwEx\r\n=AY2B\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+2ndEl9qFvB5G6xxN9sW26b7uYi0uuWbPl+XWw78rGQIge+w3+tJl3XeZliDk9Y0by9a1BYJxbpq7+wrTeSatk1s="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210320_1616225116318_0.6238796499671375"},"_hasShrinkwrap":false},"0.42.0-nightly.20210321":{"name":"brs","version":"0.42.0-nightly.20210321","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210321","dist":{"shasum":"a527d5062d1b7fa041b182adf76f03cf22acd68d","integrity":"sha512-VewK1wK8qgwZ4EwgcDEa2MW/u+2KJ+RUTfhWHlkjISWugeUfqwQFrT8MrQGLwzxZk0ebo9Jf3nFSSCPCWXLQ5A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210321.tgz","fileCount":218,"unpackedSize":1359613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVvTcCRA9TVsSAnZWagAAS/YP/1PlDdjjl419PIOJkk8a\nhC9RhUk2dOhRGZvwCPpsU6C+aMfe99mPQsVCe7tPm4gmzGIauTTECs6kSDFI\n3kwBsiaZDe/Pd3Vhu5c5rATllf6r7iLjgZ3ur4n6UhoaDTQ2RgJVfc11cdFF\nlg0e3xKEtAGdNy6YJFYOXHjiMABC3VXWT/SAcnku3Q/Bc5Vws9tRiryaJGbG\nNWZBAjVKUU/OyXBoBAOwX8rzfKxlAOdywUqW6Ih76S2fVa2iMxfm9l5bC9Cg\n4m2fOajecW06pzLnDg1z9sCAK/Qghl7IsVSpLsjxYo/zVeHXyG8f467NFQuN\nihLiz7IgEBZakBUIF4zHIsjy3G7eiXIHoNEWbOasUrK8Qi3Ii4zQRnQP+4la\nItCCpdq0Ydc0/0oHd070nyqjuvgNGnD1rvoLad9NiXoPz6o5Ohwam2RZOLXp\njsCXN/KmVXv1Bc2v+q+6ri+NSGipg+FrWIEBVF7/HEdnjoOonFMeqI1xNttV\njihmKKiz7oe7UU/cKetq/YZnDranSotJwZJjKBAqykSFYGnt+kAWSTxHcKVW\nlhcJRGYNRXd8jdOumDyblSW6wCm0X30Q0oqsDhsismBTtHlavEoQFm/M2OyW\n6Z6/Kqnh/tzs/wTZ9c82fFA5bUHAp1F27lc1LZMZIt5SOPnov6yH1ZA9NdIG\ndUv6\r\n=2Tlo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEcpFjzcJ/k1xHZf6O/oM75Ht6pXII070dS2Z/u9hcTEAiAK+d97A+SIlNyhiwZYRx4Xy6YRklE4SvDGD3BXAs+gAA=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210321_1616311515512_0.968665119882306"},"_hasShrinkwrap":false},"0.42.0-nightly.20210322":{"name":"brs","version":"0.42.0-nightly.20210322","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210322","dist":{"shasum":"53553ec999e582a1e0aab0fcab6954b86eb83e4e","integrity":"sha512-mqZMqXvKeZqOWqyELOfSGyHmRmBDV+/KJHbJjaY73GXfPbzVrmcO/4mMxuy7113n1iLkpZvgnSk1LRHHE6szRg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210322.tgz","fileCount":218,"unpackedSize":1359613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWEeJCRA9TVsSAnZWagAAWrYQAJm49LqZOVDmaodx5IV7\nXTdj10YJETUBATcbEOnLCAm6elNSk0ubhpeuam4lQwhRFjaB/LfDvjn4ywE6\nlQ8fmVffPVSx2t8lDl3x5/KJbMtiCJd1cZsWMFu8xhNXJBu34WysPQnu0mXZ\nfOvA2lgIeFQXVzC5EcUwnTmN9Xc645m7blTrtZp/IBKFn3jLCI8kNcqIuKUn\nXHtZxFu0fVbys8edi6AepBSTy9z5wR77yoEys+dYDsX7HgY3zd4dFDJ1/YPw\nzUkpx6VboJdt4g6G+adaQL/u+/rf6114WWd3ccB4btFCdko7HjaHgOE9kbvv\neoQtzKP2oDZ9ocVw2mTU9QiINBYarU4f3NHKlOz7/TT+qJyNQaTUJ9HTfEnp\n404bJn+G3UFcTUUUOpdxuiyfShnxs95OU0wHxRF08Y0qiMHEPIsb4qkjjWOc\nyJRcW+vPVXDNa7SvY/UVoXg0tQe1c2vcyiTWzMz9kLgG07YJuD1Zap3FxIhJ\nPqVEYmsYq+na7qFeN9QTpu/Zv604OUtNa2dD3LBb4Epft9u+9oW6u7WLmH69\nzwkMOUBAj/y6+keL/p1V7hu/pttZtvzMHW5P/0IlnKgYIvBt+bPdReJj2/LL\nXtE6ilDRvgXnVjQl7kuxjiVy7opnlT7nfT8oDZ96ESIDkZjMxmLGpAG/L0z0\nLYjl\r\n=BnTv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4m8jnUKAr+dWfIKAYT36xSx0cenPmtvyjw3KUEHQakAIgfmYGLqaYmb1DidCGwI6AaJxO3Ldw12ZUqvAfQdGmxOg="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210322_1616398216526_0.5224007093685454"},"_hasShrinkwrap":false},"0.42.0-nightly.20210323":{"name":"brs","version":"0.42.0-nightly.20210323","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210323","dist":{"shasum":"8f817d5722d18443cf3c68f5ee9cc8662ef518b8","integrity":"sha512-F2nZb6lGHcQWGmy4VtP3tlKvWlUJmC4/mdhj7zDEortmP7n6cf0L4JwG7TI7Sj7y9auGVNL2XAgDMUSsrU/Dzg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210323.tgz","fileCount":218,"unpackedSize":1359613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWZg7CRA9TVsSAnZWagAA224P/jIYYjRLWXz7MzroYegA\npb8vxuLO5EGiHm5ulxCPQSvs8YrVNtE/iOi6rRF9L6lNRk7cY/uiC696rx23\n7O3XbQ1IS5qPEzCdRL8yjHkGamqfbf0KcF7gXplZeC1ZGTM8UOBsZEOby8Iu\nc+d4jOHD2KQ4yhsVmn+TRPgD/+Xo7ImMpe7nVsMo4Pe3M8md9/fhIhRem18m\nQbhY3rSD0KIW3DrTc6j3kvjGu35YMa7jYevE1lUHh7z8UZ+2C6B6BmSw+nE7\nDqltiz+ejW/eWIdKP1nfMarBsAIMMHhGkGHE34dYQ6awqoDAEsabnMAqv77u\nflkXfYBCYwLHo3XdG7ZucPpn6pJY4PJIweJc6Vx/Qeq3lBlr+TLERv1DWzP2\nRu3EHTVlOtSINdV5VJ5+mSoLc3V0552FQHzEkzyFHLSg1+VBrSFRiiT6uB2F\nIAiMdcQrYErErl3ayVTaDE8aah4xmLsFPCHnWixaG/f1ocHLMWCVfODYSZo1\nFjTmGY5Xpa3A21a1EHA5iv3b5oiEGQUZHeYrMLgxbztFXnpmpVxawi7i5M4m\nmFniTROurOCnRcl5InMPgM32fCofdYWRXsmoeP40jgxIwZMT0J52J5+5j7j0\neaY2QqcAbhzGnz5UxQhMNiqagGWNUs2PKWnI9iI7sEYAnrMlTHbqeT37OO1m\ns5sH\r\n=LSjC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDEaE0rsEp8CrS1LD3o/3/SsguN4/TLje6ljNZRfjiEqAIhAPiukgvtWlRI2JWOoIQs/bFTXfU0mKB838nQD3Ylufxn"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210323_1616484410523_0.566176897436373"},"_hasShrinkwrap":false},"0.42.0-nightly.20210324":{"name":"brs","version":"0.42.0-nightly.20210324","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210324","dist":{"shasum":"f3ff7c4856e03bca647ef6814a26352d235cc57f","integrity":"sha512-RnQSldVXF/npqEsZIRbJuo+r6pWNMPJ8isUM2wKgLV/EY9njM/h0yJQ1uui/qR4nvgkvxdIymlMRN32vf5o+LQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210324.tgz","fileCount":218,"unpackedSize":1359613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWuXVCRA9TVsSAnZWagAAFH8P/iIZ5vXSKGzjFgpWSBGy\nWfrxm5imtJrTC/Luu98PRk7/8ElRmfo+Ol6vRNPULUtXRPechvIAmcWWq2s1\nFa5vqHyg7ofZZThT6D9eHik+JwrUVzZ9bTeul/KiWEH9/KzBjbOT1bh2d5sl\nK0BHIcGk6FAjHIPZAtsNCuUvIIFqKCKmWs4WeUO+9Ya7CLJoUxrRiuEorbA5\nLh/dA+ktqTXvVu7fG7+G0LU7GvVjU0eu+AfXskviGUVWjZW2RLPZ7IS71urv\nnnyXdIRELqoyY68qtXPEw7VHR86Z5ELHKxq/w3TwpCwPFylr5l01ftnYoDzj\nPr2LLXkfEOBpr8LRzBnygt8LUkvAH6HZPPTSins83/HOcjgD3mxZtkNS5M1q\nW104GQCYlE84R5c9WisJreWLe/4/Hh2YNITKg7ti3mErlx48htUypg2Mebzr\n4UFayeoiir8zpZjEkY91m837yQqb6da/x504k8G16ouFF5v3SRdLCUZ1lxov\n8+T4pjqY/X3B4YrmvN4myH0BlbGpe8pcHQzprmrj4OHBCM2jOmT5AXHmxIlN\n8Z6yTSD9Z8p1n9xfOt4X3J8nOJMBZEXrFbqC0ysPDJb7iDOdMQXABLWRhJpQ\nZKIyfPn+ALNdCO4ufxfA9n+uAEZg3Zosog/zFFMzjLZJaI9zaDZDQFMuBwfT\n+Kw7\r\n=5EEH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVn1NU8fbygBAmer+j8FCPMxF8c4ww9vbwZuU1BetHKwIga/7boVjAxtW5k7PTyAI9FBdGUEinY1LVjWuyKQDaJ58="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210324_1616569813111_0.6079501875073505"},"_hasShrinkwrap":false},"0.42.0-nightly.20210325":{"name":"brs","version":"0.42.0-nightly.20210325","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210325","dist":{"shasum":"ce9336cde1ec7348f9e36b21a72cf8cfe88fdb3e","integrity":"sha512-mDBvsmYRiwkI2OPNUspUig07vgH2jx0jkZOu/ltHvEFOXXoI9ekHYbSN0/eIGOYy9nwBh73vyHfzHYiVeMUO6A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210325.tgz","fileCount":218,"unpackedSize":1359613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXDcjCRA9TVsSAnZWagAAHhAQAIT1PjpTDBfohFVAYnNJ\noMrDGYWXvRKZ0IWRMNkdNOQ95NOt+MSksX7fiEOwaOU4s7QwYq9jjVb5W0yU\nfeIrLrJNlO6CmurjK7nco2dJGSQ61Kp7IOWoaghW1AIDajno/3T24S8A4uDq\nO6UaVJ/p0XglsmaI8IR829MJSNMLfAbQqSmqs/jydZWiRVWIRbEX4z5wKufd\nI0b8O3SZBvQ3NatDuADKFPqQjbMxpjZNeuldvw7SvHnVEUsPQXNLuvpyBDwy\nZUnBV6nUdaW0Dc0q1fK+F+9HV5XvRAXgM22qYTufqVveXiciTbO/+tQWgmms\npH2No9yaQGoMshHsqZNOzfCHyFEMPeUALAbv6h1i8gZlklP9Pp+OvswimR/3\nGXizTGgjXLKRLoLtCztoecZGhUKxKMhKQ/goavddiPIMcThobOfkj9aoOcHR\niKgEYxOSCIN+f8J8Gl/2wG7cFHoi8V3xgP91uhqsZ8dhxIJTHHUeCwLlYg8Y\nMQeaGa5nwtv0clGFex2J86zukdtnICwjB/5fFrPQX7KsJDXtxN7mvcJSLjbB\nYsvrUjxzND/walmzVQ4bwLD2eDehpTHSBgbfrM59jPD4Em9A6ZzosVjSvQVR\ng/rrnJ+ffIL0HPjQif1SogR9DNLkhr/yFH8wGR3wCh5eVHnhLfz+56C9jwSP\nMaDM\r\n=kdDA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDB9X+gj21haqTzUYfMg+54WA2pMXhUVKdryMKchAse5AiEA+xdmZBiTJHvPDcg0VPr/N7PMINXokGZFPL0M5Abdr04="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210325_1616656162721_0.3721384396324381"},"_hasShrinkwrap":false},"0.42.0-nightly.20210326":{"name":"brs","version":"0.42.0-nightly.20210326","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210326","dist":{"shasum":"6ba2736bded15b8beb875993c077b7885cdb8cda","integrity":"sha512-1DvxMRlSWD4rgZyOg2SjqocNaYAajTmwQ/XFE38jiumzI3AFnFtFV3IQ6pxsHFMVTNE3BmR7K4qJEnA9hfbg5A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210326.tgz","fileCount":218,"unpackedSize":1359613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXYjmCRA9TVsSAnZWagAA2+kP/i2Ie+L7/raeQUa2oRVU\nCecY6mYIPbdvHI5bJuNRr8m1g7uzB9ouAZCn1k+CYoP+tC9rSQVKeVB9HlaX\nhP3l5QEwD0veTrTxyut4LzxmgP9G9G1DfZKUPTWUwYj6jZ4PfWa6VTC8GwCn\nNUT4SCNaBv+Ti5V3rPxnjt0I5LGfgLEj9ySA/BJwTIyfyJb3qwAWyzrGa/Sl\nBjfL9UURoXLlG6gwhNfeeB3KWc400Vyo6kC/hzwZxMTo5T/+bRg8e4V6FQQW\nrN7YeuySNhdAyS1RtIDwoL9l+uWEWI7ux0ijy1Kk0DG8eQlbNcdmTdsgG8oj\nifYrf1iQwc0wYdgxknfBKtT3UZToTxlMWI0XGqgueQcSfgw3tvaSb1MmwgmH\nQvrZyupnMH99o9snsktYVPpQPNrI+ApvEvQ+M8K2NvATGJEQqIKCOXlslrqe\nOK2sRJFTlcHs8pyCmAd3vf3ed2vqEcGd2ppuDNVddORZ3mWZfnY8utm3P3gF\nQux1SOvTtsa/9KEcj6VrZk6Lva4NmgeWrP021qFq1O4xv81aKOwD9OOIoctn\nvVg5bqT/djFkgQrjOcXvIGKY817fb4j5K9eUd3zFiyVSwUdQhou1k8n+HE4j\nyQg7yZvgFVVsB5LWmZlwhkj05fqQuX7ttPPDbc5qOYdHBN8lC380ms1vDeQ7\n4yNx\r\n=AmhH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDAKM1jeT6nv9bBdn/qTg6IKDN629bHOS71B/iwoHEYRQIgFUJa7rZWYxqQ9IRLaynFwJNrVWaujT26Q9cJ7iy707w="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210326_1616742629970_0.1891632748728871"},"_hasShrinkwrap":false},"0.42.0-nightly.20210327":{"name":"brs","version":"0.42.0-nightly.20210327","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210327","dist":{"shasum":"2d5fdfdd402f3f93bdb799f939ceff6b4faa77ba","integrity":"sha512-+mPgaz2iQJ+V0erm2Nr5K0VlWxsUfYYAlWqAIVnIClAIxCq873kmCHH/WcduN54kw9HU5wdCQUjjk+a8PSikVw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210327.tgz","fileCount":218,"unpackedSize":1359613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXtpgCRA9TVsSAnZWagAAq8EP/RwqDtqj38fY3ppAQihl\npqnXwqybDaGgxrrm5BKg2V4YKhR2yGDQF2NCtVCLwgLBeFsAdN2+VFp/IKKP\n7/k3q4wbhTmUfbtrjLfxTBEmbzpiS07+CermceSffAKZx5uHAKgKUIx8IlJA\n0hKgijRJsi4EiwV0Ya3Minbp3rLZJFxNTvOktJ/lVfe+jlX9/27FH891AUtu\nh14r4CFBNA3Uk7I8dcCaE80S6+gHdon7IJPz4sOJWtsCcOCefjMH2xkCFcET\n82sICvFU0wImsBdw9+fhNDVodz92ltWg8MuokG8QTWL573UXtMWJV4vdLall\nCV/ebld0iIkDYMDw6sDw6M+oopm5TJMrecssI842IjXVVKcGGINJAxvolQCO\nYfBnM45AWt8qqwuMBTn6KIjkDTKFzHb9NZYXcUC38wwiPlxC/YLrcEA7/1zR\nmn06vO7s0+rHffnCbqDaAX9EI//VbsVLkKj63O5DaijV2SyJGx5Ua8slJ6MI\nvNXq5JerXVpJiCntv7ELW5lea+oZbLsxmqdX4h2LHdOEz5uLg1qduHS0iJqz\nVvTGcy3SjjBzC3OhzUrrg1XxCOlYzKwMZcJDtmd4608ox3G0aMDcutsO9QPp\nJCSLMnKqZoCeyEwxapxM+wpGRZEVHKwgpSoUN5SDDs9NU1aHHmWSw5qFfctf\ncZ7e\r\n=xqUO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfOKdzhPAT25u7oR9XJpAB7vjlOjnP82MVpCcPw3do9wIgT2a7AXWLQmM2KkQ+DhaYFnCGvkLqUT8BZZcmD72hYLA="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210327_1616829023277_0.6168564665080063"},"_hasShrinkwrap":false},"0.42.0-nightly.20210328":{"name":"brs","version":"0.42.0-nightly.20210328","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210328","dist":{"shasum":"cba94cf85e27cbb7499b30fdb770c8459ff86604","integrity":"sha512-axJjOB5LVJOHX5SpmRoDKAQozvBNhcBAtxf4MShBlGLW+YZ1V/YKhRCd5gcAahuAlzJD/Yj40K/WKKJT0PK9Kg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210328.tgz","fileCount":218,"unpackedSize":1359613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYCvRCRA9TVsSAnZWagAAO7oP/RDgI98HpTuulqkoHo1v\neSez5os02yXB7OZoO67hD/OuS0+hIt6YZWepRfvw1xvA4zXKz12u1xzAwyi/\n1a8XywN3+KD4iw2nGWiNNkSnf3Q6vQXv0RHu5ZVanl9sEKx2MPR8uANc2nsQ\nx7/Au6MMN9cseh6H0BFeizy4DJ9O5wCL9ljIJPS3YI+RbA2PdoFkx4fbMkik\n+QPri+7x1D9h3DuwCendZSS+7gQ3wzgLfbw3ncME2Y4AVOKoiv1fNP+dC6E+\ncbjBxcErsrLGmWe6AdgCkTxyN+i0WoyoZ1b5AjBnwco1DiDoXxRWIKs/61Ki\nyIQA+6mDZ04D5BV6aHVquHZLpVmX5VQtYWb1fz/hRBVqmjVv8aJwkHo5fJtM\nunDY8p1buF4AtpwUerVhQ0fCyLrlKxJROVEj+ou2igtiyBjItxQqXbpacOxF\nPDu49k9AjUHXqiCdorvdVcYGu+pQ05JhugoH6PZwTZq3HUN6+7RHBVNwih4W\npORWNIYo8QvhzwlpM7D/85sVM4/eOWt1SSpWBbuoS+Vrc8+A6vvf3II8s12U\nFtBhgG5z+3miZ8BhSlVH7FPOTZXQE3LQF+aocwvykldZFu4uJzJgADJ9jMka\nOVWaE0x+SBQMrZCE4L+pnxwA7OvsyuW/167QaLUtvavheA2e++5+dAMotHuy\ndJ+L\r\n=hgFD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGv+xFdp4GapcLNUXVdlwTJ21dKuiDZGgTpn7NiyEdLNAiEA58NMQ7aJr4zs44tqL1T7CHHt8MgqJRcIFVmJjUIXYEY="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210328_1616915408491_0.17647045174558262"},"_hasShrinkwrap":false},"0.42.0-nightly.20210329":{"name":"brs","version":"0.42.0-nightly.20210329","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210329","dist":{"shasum":"45affdf2d7d207dfa486705bc3aef5540752cefe","integrity":"sha512-g8qt9hX71LyQfUZkH4EiWuNqyZmMHe9Ec1hmdZJiGo6AvAN6QQl8J7gk7jwd/z3CEmw/4eUmF2w4ikVp58x4XA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210329.tgz","fileCount":218,"unpackedSize":1359613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYX2LCRA9TVsSAnZWagAAECgP/1SB5LEj+SIRE8F/HnN6\n2gvrbeOORiH5lrFDrpw6GZfD2ijisQs4G2dREJ8m1y52BvMv/6HrRgrcot7A\nSFQDpgNoYnvaNQrqFLBtOxFyrIfOTM3rhveJ9uTgKYQwnX0bFf3rM/ntoqIj\nNV33ZlG1/QB3CB+ITitiJMFpisyGq2vey0+gYtPTc/8IeRG7YRJ8RVYuAaqg\nOi62E3gd4n2/KJosyP7BAaMMaCI4QDLtVIigBNIT5Sp8OFSx3/GDxQerZmOP\nXRoiYnS3hm2M4EzM+y+dsk0IDViDkaKLoaxpuXjnCgwSXciS2mczVFo5BPSu\nKK4+si9Jk2mWib4TNkXpaLbk4Ao2bdJLc/Un1xutS6U4sC7XsxICk/fePKzJ\n5fs9Kl0cidAeWs7XKfMlbaB5B96Qzth9u1hVX+Y8oScM5K/VQOEjnidEKbsI\nPtIBW+9HA8r4s+UMODd3aoYiFe8rsxmEW+Rhgl2C0kIOI2/f7TLrosDxTQ1B\ndUr87YvMUw0zve5eZUzUL6y1/grBd9VWE7aZUiWVVzdnpNBVW8/ksiHXc+T4\n+cJpnsvpZqSxyaluXDXOJMQXjAG2FEWMCnJqCYGq6bOZSfgigx92MxS354PG\nGBxlAuABb0ekS3rwm0mBFP2uDH6QZ4nfjOA1UWsLrYzcfrk0BqZrCSJBvbD/\n2QRJ\r\n=qFT7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID3p/7lPcJIzck3owwil3fghPbmbo/PLES9yqEZv93/6AiBSP0Pab75KO1ndT8ZfkjBCUzANdzHwUV59B9VXE1XLwQ=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210329_1617001866604_0.5518743253779994"},"_hasShrinkwrap":false},"0.42.0-nightly.20210330":{"name":"brs","version":"0.42.0-nightly.20210330","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210330","dist":{"shasum":"f9a5f0b227417263c06c1efd13232c1def563dfc","integrity":"sha512-qaGFy5j0HqA6fxtKNgFSUgogBI901OCXw166MriNH1rncER6Y1yk8fhqj2PAQq5oI423ptU8rJO0nuEK70TO4Q==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210330.tgz","fileCount":218,"unpackedSize":1359613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYs7oCRA9TVsSAnZWagAANhAP/33s8K3CUp25hq0Halrv\nyVqQ8bWPUJhzBp2l4FS5FyTo4PreCiyNfiDdPdqr6LLoNnaFg5Pv+CuBoPu7\nGMfLYtaUiXceOHwzzBD5EN3vHZ3md9eBVL7MypPt/UKjfs9Sev34UV+dct44\nqN/ENMLBCgaKK0qvEsCe0x/31f4q5PlGm8OmxcAhMHYSLKn58w+VfkyCmBVN\nH8Kfn3hHLjv7EA763t4K7eYcLDOYVXLgrWz6sji7iH1Y47dyLJ4eblOLhMmb\nsO9NwY7g52gesbVElnlnCo6igES8t8PluaYoMDeorx64D/X/6T35spgrL/Dm\n4JyaYgttFpeHoUn0xM993jVnRwFjej5Em7f4BdkzpUh8KhcJL1RKWeoCqtvL\n58SH9fd9Lrv0Fk9xqPVElm9zktmCtmPLBXvi+H+zuFFyDvLIbu2ziJ6c9Npx\nEOgpm0XzedpIvpqzTnSQWCC/s7VgDl0JRPkrbIt2FKymDTpxauWMvJYUwAhK\nObeazzHSZzcRpUGW14tLkkZZX1+HwNDC3c/tm18OlOHYJzjTgGy5zFPuJe1w\neR7JJJZ932j4x+Pai1TbVktBSiay5vqeSRBCNcB6wyXcohR8vGJg9A4H4LaZ\nkFz/3ACYkmJYMIukE4AGdvCDo4fbi/5yNX4HAx7PBzVsv1AgMrCrg2tuk/Wq\n9IXA\r\n=XGuz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVJVRbFj3XSruPy6k8OcH0w0iK8Q5Yc+MAhYne6DZ7HgIhAL+Ew6uh80Q8DzI2cORAX5K7KCUz0zO6CiE4aaEZ5qxz"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210330_1617088231598_0.9730227835952159"},"_hasShrinkwrap":false},"0.42.0-nightly.20210410":{"name":"brs","version":"0.42.0-nightly.20210410","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210410","dist":{"shasum":"b3c3fd13b0dffc89fd31bd78d0f2f71b5be66716","integrity":"sha512-1VU9tl5XzN+snHWqkpGGJk1iJiubBKMquYXQxyFZSHyFlBpKwqJfkWz1YgKHJKCwbJltg0bd2jLTjRPYAvqk3g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210410.tgz","fileCount":218,"unpackedSize":1361105,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcU+lCRA9TVsSAnZWagAA2V0P/1FFrUKoQ+sqTE2ybLVl\n3UM6IALbLRKL0Ro9kdtw19aBToOkRLovFC3ID+uCMPfxKPoKebM+cjxNDnMN\n41c0xWlYt9aJOwqvztVZs5VD1pVkfZnOe7psYw4rDhmoiC0/aso3CTFE1vVO\niOQOCMYg2JO4XXznpf2V6LRAm2GDsNK3PxNm307m2fAFx/2f/Pu9tpmqRA6F\nT9XJRergRb3CIwvALaHazVvav2AajSZrqcFfJiK5V7AXfNlH+zs3AHS2GSX/\nnTjmZNs7+RbVIbmfjmPlrf4BfF/2y5U3d0HktLs6fcbWepL/DuZgbN5FAQ2s\nSzLPc/+B1uwLCMpLeXB1vEP5wnX6mPX1uZKpaKM+iDc6XRSFnOGfbT04DNC3\nVm8O0wpynRRGIoOtTn7hsj/EU9umGbSX+3EnNSrzeVCYk5fjqvbLTcKnSamB\nC1Al9k58fdtWhRR4kI+z/JvGsUmgHEB8i4lDIwpU77J3rZRRHkDReFfqFPH7\nK/caEvvB4wX2MSK2FYuDwRiPvwgxn5PybMb9VWeu4oqFmbsycHOYC7KHXQ2h\n2KpiT2eVhi5taxjYvTyJD+R1ewfY6e80aLXiXnVA6EW8woC8wRVLPJota4zK\nCLnYJoZrKOSyxc+nl9xGRWNV8aba7sJgJR5phlj18bYIOMdc3yv7icLCAfek\n5oSc\r\n=pLt/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMQCdvwNIxV6pEYAHXFC0Ze3qcyEdt2zLqFiXbrs9dBgIgAY8p3IqaRswGGJK4mY9RLOwJE+USJ/sRKn51fT8zNKA="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210410_1618038692885_0.202309493094172"},"_hasShrinkwrap":false},"0.42.0-nightly.20210413":{"name":"brs","version":"0.42.0-nightly.20210413","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210413","dist":{"shasum":"0e3f361c66cb136f6b84dceafe33600e9cf9cd3a","integrity":"sha512-UgRNDr3haWqW8iPBWGH5SPXXX0rDWzCiURBMOj/zsrZlhRwKECVXmVCbto276x9k46H9t2uKxFdAZnux+BSRUQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210413.tgz","fileCount":218,"unpackedSize":1361115,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdURRCRA9TVsSAnZWagAAK9UP/3S6PQuv8rBGQclF496l\nNVjJTwOYWrLtqBseUe2LmI5xZtMJ1R7+wi29gMgp4vK3qDUVViO3GaApR6iD\nIUi/sL0AopUGvWY4hXA8p3UD7BsMXnOgpZLo39GiVjdEqQQrdCoAtWezsInf\nSumCXhQiiHLlU5UPo5OW9ECfQ9q7pizXbc6VQR1Az/VJBk1twYWkxHiGJNOv\n9IciTtZhay/B5/SO4zTeqanUlM4LC05EKFWTeSYk6zPXRh8biHEVh7TTbfhy\n7cMqDIu8ckmtctiz1CYAHOhLLUEtjWuYac33PiwRuTbNxn6SC7/AU7ad8vWN\nCnWbrk+nOodF1M6aU/6UICeogknwCbQN7PAo8L6qL16YNx/xtU6WRJCfao9X\n0RHXvx8waHdnhNKIJiHGORTa8RWQtxU02V9LLDXp5Q1GW84gDCuNS/gjTTSF\n9DwDtZu2KPK6SKa2XRVPvUE0YzvPXABiRIpLTTEnl5CrEkiYytm4WqrEsh2Y\nwv1DAu1F3xRHD40FkeZWkD0B3hc2JC8yUIn/jws6spGxmTopomIjobDzsltn\nwscv6IG3PAIs+TTfRm42Dnc/q4oW1zu9/HLOHgjYGNw8bbY2Z14gJ+N3n+Qo\nwtEarT6ELrEGSnU9//bVHP30vbevpBLrS9dqTYD/QGuBbIc3bZWvy0rXu+jZ\nNSMi\r\n=MiGC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQUvxRMq/De3x2MB4xiL6miCUo5DWqmhO69hsPkj8/5QIhAMcqnQH6HvjskjDZjsNQvm96b3opzucg+VMI6v1rAjkc"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210413_1618297937188_0.8421915389989985"},"_hasShrinkwrap":false},"0.42.0-nightly.20210414":{"name":"brs","version":"0.42.0-nightly.20210414","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210414","dist":{"shasum":"baafdda1e8fe5b64cab82361638c3dca6400064b","integrity":"sha512-MHo4IVP9s/GToM9P6/H3iaSsK4HEZds5KPYDyhjGMZjZnFQQzYv+JEn/5o1heyNBeRDFnP9xG0nOOiZ8i3PTSg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210414.tgz","fileCount":218,"unpackedSize":1361265,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdpWdCRA9TVsSAnZWagAA/ZQP/0RgGqNqKb/HRz4CqQaV\n8/t8K9VG9xXmAiVKIwt+VGpzwTB6F+8HxJoPcsBMaGT2YpFsqh0WQJgHnt/p\ntIyOJItic0P5eAebgZP5Mscnytw75vv6HZQO9jZtBlW8BpWZKH+56hQKWwmJ\nvCZlCAKr4WOAq9P5YCbggtJ9acbvv4/T3vAlRs5usBBy10g6Y1Wtl1DZ60oF\n1MxHf0ZGCcFSbv4cMTE+ZO/HjDioTa1004oRiaoj4I2ooD9ASLxKqDRcMJ0F\nZLTRs2OU9+aBRylb59nyJvdLb6cP9ed+4zZgonw/uZCzwEByqx5HS5qCC4Kk\nEm2vqUZ/be5J+xIGlszj88cdLB/KHzkhQTmYn1oj4r8sJyGzYsBMaGp2Ljep\nkT1fpLtVH/4i7fVc798D5MbatO8s9PF9NxkbuqA7peEJAbWJt7H5i6D5EctW\nZgX4AjMvYkAXdEhbnyc2NenCCylUfTMhqwTnoQMrpqP9LrFjhdK8apg+Bg8U\nn/ltZ7Ad6tTROF+IepsmomVsoVMcUKmCxGivDGsyJrtlzILdqsmqp59MYdJf\nqNaltR9b1ffqjY9tWHK6N2sUYNzQpoVh3BqaLNGjtXfjFxlAGYwLuLwbidft\nqQ4vi7cF6ZX2VY7SHWe4e+2M0VvTQC8sycctHRZrZFwx7r5NA21hio7lik9f\nuvq8\r\n=9Vbn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIErm7KiSioeLhRYWV1Tc27qOA1DQoRccK25+TvQfYY/uAiA+w0CN2Zk/KQ+VHWNLvoiTDnWd++Yf5aZanHd8KV9wpg=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210414_1618384284817_0.6145395812363039"},"_hasShrinkwrap":false},"0.42.0-nightly.20210421":{"name":"brs","version":"0.42.0-nightly.20210421","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.42.0-nightly.20210421","dist":{"shasum":"7298c4f2912d539125169ed7980e29a4ac16b481","integrity":"sha512-sGD6mJf3W5tkDSY+Wir9Mtv+j66QE94l6kpSbBomypRFnEyR5JEzSlT1wOanBzygZhFnoOvM9U5Hg1dWRh4KJw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.42.0-nightly.20210421.tgz","fileCount":218,"unpackedSize":1361333,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgf9BJCRA9TVsSAnZWagAAbQIP/3BWbxuQzLY0ZSg5dXNU\nq2bMB0k1MYFsoES/0HmQycB/HCNJZ2Qrif7tV03sFn7UnUYUDbuL9Z8pJAvM\nc4NZ6zJd9Mt22jABMnIuKyf6y7VfL60FBuTAPXPmf0fxkdZ6305rn8Anry2X\nkW/pq66lYQFd+QBMWkgdyaMRglSrziyQXDCDpEGIeGWNBEJl2cys4s3E9sXW\n4LfTLKDLHjYZky6sprJ0t01xDlEdnYFvUk8+tNT77YaRZfkXlROMv8ijkiAG\nkdxkwdnLE8S921aOW78UEqVR2+c0MFU/7CRgIltYOLWhMo3P2HTmzHIF4lrX\novfDNeNDF/ZOldnne+ULi9XhSpoPHxxYWOIkNhBYEm7PaDGCxOyZRXwsPJHd\npOoofFJr7MeS+ceaHmkGbCgA+4NBVdCmq7jHt2j+wmw8VfkQeQA/MvW1z3gA\noCkeHJ9x725qWRyMeVe0vCDCwDmk2pFfLdLasI7URquNye6YKHgbyeH/Skls\n/0X6/3vUQiAg0zXiSQG9sEdMmCNiNYcmcHkGVs0bV9gxnzXgAZ3GVR274/dz\nOaQSE16ikp+bjcu71KT4XiGvvWzHYRBQYfxlaVs2m8BXrG8+TkJZHwtpww1p\na6X3AWxm9aFILuyNkY1sRtQdUALypup3zlGe+413wU2cpR1ChJs79VUp85Vr\npjn2\r\n=wbKA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCqkPzBw/CXQTF6V/kOKvKOpauW5a4uadKbjfcNKwBaJAIhAO5gK9a5tByRGrE1IGcIY842nixMio2H7C5ABMsPBDzW"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.42.0-nightly.20210421_1618989128713_0.6365860578362919"},"_hasShrinkwrap":false},"0.43.0":{"name":"brs","version":"0.43.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.43.0","dist":{"shasum":"a56b95d845ff51473558bb723d2512a0cb9b5c46","integrity":"sha512-1Wc6be3ZdqUAON2Y5gS6/n8knwj8xP9ZUJ4d2+t++WyDQCfqcjzRerWZgltS50YZWi35uDnnaYKtmoBFXyeihg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.43.0.tgz","fileCount":218,"unpackedSize":1361316,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgi0PHCRA9TVsSAnZWagAAH3UP/0bbkQQKfNWFBBSQ9Bt8\nob6zHoL6W9YnH8Q8w2y2xGGF4VW96GRQPnMxHxzZft3dW04pT9UH8kpp/HiB\ndPpOBfV72Ei1va1hwfj6t50sM59dM/cDTHL0xOT0Xz1irHQN6yp+AOTsLk4Y\nC9tYJmA4v70FfOsBOeIO7E00jXmBuLDCQ0mGyYLYakDbvK7OVvaav6ADJhqy\nCXpqoA+DchKwiNCESxWVye+3dmZYCVOMnmORMXr96ssGyWirNQgKP66SYOUN\nYpTMrTD9XDYzexb5cYNGgqrnl8fz29N/v7j59hDKq8BZD6+9CAZc6DEH+Z+X\nURs+MfYmXHQjdapIxCr6BYvvWJ3r6puhpGB7UADFpNm02KDMwqy+sJEcKbea\n7dtzGACGXvDgDRmULkJRvnH7eqqZNBq5mRKROEe3zyiw8/pOUuE55KpL8tJu\n8F7mrPit0w2u77roxz+cYG00oEQXJHkF7QEPu4JwpxjxLJ6DigxePW+I+bwG\nj8kgn/roM3zeRhgM0uJ+z+GwsVplcYgP9cRlrbj97kaQO6cXjXzdcXXZnpGd\n+qqC/vhIyASAIEPGarVuC4uvml31rQ6G1dTWn1ZEfOY/EYUyJTyY4ryUX6ft\nddjSCk2W8nmZwRnWN5c0tdA17bIbKjTxLuYKVmudXdeMezbEllXTfEjF4uDn\nxhSf\r\n=Pr04\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA0sbl11ARski98vI2zkbkeE9NrYKITN8XfxZ+n28/IvAiA5Lq+dnhxlvZ8yLydO0H1RQiksrr1rI9vpCE1pefkkJA=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.43.0_1619739590895_0.7159861936009284"},"_hasShrinkwrap":false},"0.43.0-nightly.20210430":{"name":"brs","version":"0.43.0-nightly.20210430","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.43.0-nightly.20210430","dist":{"shasum":"9ea1f6758a1884b4a340e89bb1e2001eaa4b3621","integrity":"sha512-DJ46rF4AV39njQIc04tffR+tnUtyEHEFaMpF0Ix40VjLCeZ5fYJQZx7uJhTkjeGFFWYTQt5yPCnGF/J2zviTNg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.43.0-nightly.20210430.tgz","fileCount":218,"unpackedSize":1361333,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgi7GoCRA9TVsSAnZWagAAbPgP/AlQIsIO5CN6H6Gqy1Nc\nnolEkO4QrQJB9NUr1dftm2zWneNzHJM2XUGD3eIoXQMipMalLkRlUEGdU+HQ\nlCoVRI1zQQT5Wz4OmemHnXDctcDi9lrwAnMBWh9mcHCn5mkJB5INjRnK0eT6\ni25YVZ8OanqDEWuLr3iY5X/4+dHNMcc1fXb9x2Nc3d07eIDLVZpKdaaD1xIB\n7A/tltdABebFxUrezqbtKRpWESNqFNcMRIE2QkjE82N5qMea/1btAgBBHCNm\nFZ9la8ZKwXC/ZvJITlS0/tooajmq2ry0K05NPfA3n8wKVXq6SkSl2z0Z5w3C\nVturwJ5KO2YfCVrWlFO6rF2gXX9c8zrRfmTzyKcxUMg8zKqXtbb+QvYp8VVL\nwR5F7i+zYzHyIpAzR16V3Q43hDR6IMboOU6Oq1OHb5eyOtDoA24sR4QaegxQ\n0H+imPDgYGu7r3mQq402pGkcx+joArUSyXHxOYuw2OGChECq9xa0jh9M0wWp\n6ZU/c4tD/KmYXdEPL7ciwCWGYWyNLvP/fjy1kn1AAtRjDWXfyOxihcgFSFuF\ncgC4ShLpDXByywkZB19ZRlih07tEmxBig2q5wFO1IK6hrdjtNs0QrLMyz5dQ\nyRe8z7FY6lfhf6ok83JmvQduy4Yi7aw+pHCbJ3ibPIoy8NnzxaZFRQar3b6o\nQMA+\r\n=xFcV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWsekGFhESLA+9zw2iNglDj5U3t4bVmbJpQKzaysT5BwIgbjdtlHDYwYetajzMz7DcORL9CAuNVdrngcYZXywmyyQ="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.43.0-nightly.20210430_1619767719553_0.28942705888177067"},"_hasShrinkwrap":false},"0.43.0-nightly.20210501":{"name":"brs","version":"0.43.0-nightly.20210501","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.43.0-nightly.20210501","dist":{"shasum":"1157b6c0f2b0245eb6c99c584c02caa18f2078e0","integrity":"sha512-qNgqwwmNna8z2P+9yYQN2EYaJenRU3bbTAqua0Se7iEeo6yqqKQuwea14V8Hjkhs5++Kszqu+lyzWprcekCN+w==","tarball":"https://registry.npmjs.org/brs/-/brs-0.43.0-nightly.20210501.tgz","fileCount":220,"unpackedSize":1380885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjQMUCRA9TVsSAnZWagAA2ecP/i8+fKwHPxvJsiqrbjVH\n2a2wdx5VrtMedDakDrsddDk23mlnAIhJ1m0CV4h3Oa4pevfiUE7G9kwBiese\nBFx0v/TZ5EWVt7VSascJlpIYYhzdv70nqAwB65y3sxaNX77ZsElnISmqlOmJ\ni+NP6CWnxzjnIFdyvxPHbZbLh9m50En/SCuDuoM1BmDYl2zAqzN0B79ClJrQ\nqjczDxKYwyHmBw3JhORcyH9lYD/lbvb+Nk6zASYg9cVo/M4THXeDhQe9mvfY\nIr0WAoHrFFDsgqpPb+shmTAJHC+R2f3zBc9E+udaWylKBFgov7+HR/s7HZso\nvf5qhPyeZUhV6R/KTahF1Z7xENay075DA7TVqpES4kBjg7Lz4MRuj5q7CGJP\nEkawTWqaRQWU3ANebaa/HnTf3NiR6KYuulpq9ZGR4ov6ipvFe5FnUfxT5CBt\ncwYJYc5JR5ZaQ7h/hyrhwe/N52PUztAXMe1RwRNhHNbdQYgK4+9RpH5nLObw\nxurkYZSIBIroEgZI9es/hen7MP3QodeY1rDOYFYZH6dBNmW1Kwxnk7aBkqLS\n/RE8wf6nm/G7rWl3By7YlgQfU6A6NqfhWp8PyoDwCgdcgNrM4iyuz/71ugFv\nEpBVecqHApaF2LaAdTetJrB7EJyO28JD8iL2e0KqKyV8e+OYnCduxdJRNy64\nTznk\r\n=ofXE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEsm/HlbzzRFlTRlT3M0f/YBILMhXtQxRMMvFycEYrLwIgSsF+7q382qCiLXd6dUW7+/akT+nBpJ5wIolF7Qwugbc="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.43.0-nightly.20210501_1619854099674_0.3915452286995358"},"_hasShrinkwrap":false},"0.43.0-nightly.20210507":{"name":"brs","version":"0.43.0-nightly.20210507","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.43.0-nightly.20210507","dist":{"shasum":"1e5b99f554a76fea2c91e282a0d10975b44d9a55","integrity":"sha512-opDEzUN7TWbd/sN6UMni4B0u/3vuYZePfk1vFDyiLuVr7gCJBSnaJkjKhMV+fzPI/B1VJUdf0WxT1CowLukthQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.43.0-nightly.20210507.tgz","fileCount":220,"unpackedSize":1381093,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglOwXCRA9TVsSAnZWagAAi94P/A8qCtMQftbeC8wAXgya\n+EK1EIW1Nsx4vTccQoEd4p8fRcYCne9o8VFj/zY7+FkIAqJQLWaO12O3ahJO\noZtsWpeNxBOo5QiByQb3yPEubVYjVA1W8CIuSHRQmhXLFOF3HRRJJTHAnCc+\nAY09VIxxZCTbLnW5uj/hzbXKgQZhyC1Xp2bCfjRsV+2vcdMySYrKy9Heg0L4\n650yZ/3t/mQ5rhgXqcEDS3bj2zTpjkxhwAOEvOKCf+sP2z+G6xXuTZAPVFDV\nwgUzoaeb83iaLIE6H5cWkuCPBT3XzWsxXCXpTFjiqwss/nI7Q19FizgwwYPO\n9pxQuSCxZhl7g9sGpbjjjIVsNYu5cKFxDEBm1UJMg/eVCPki9i2H1zZmR78T\nOze9Tc4T1B7jTCxJI1MSl8TYESN/gRtoNQYrtawZaEzHdtBiB6iuzdAXqqKl\nVRiaKKNxLYAekMTNZJSrUm3r5FiGbqFrFs/wN3nbA7vV4TGlXJuy8biiO34X\n60rVYYiDJ6MIofh6szOyiFTJOINXCH9MvemCdwXRivEK594woJQk1mBPCql5\nOAjTapNPPLIdu9+nAEgqbw+tuiIJEDQjUg1NSFGPWcfsFIABiD+gk2+XWAZQ\nh2kVPnoSsNz528cj7apOBWYAUr+vm20E63YR7KPOpNwBEfXuv6iX5PWLcyYV\nwuXk\r\n=SDPj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICOEM2pNW08RbJEHLs9L9PON6sokodJ2IwtMdy8JQ8Y4AiBT5cfkrh76yY6Itbo1+V/222WBKnEvlJ6jYdD1PQ0ppA=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.43.0-nightly.20210507_1620372503101_0.9763721300110773"},"_hasShrinkwrap":false},"0.43.0-nightly.20210520":{"name":"brs","version":"0.43.0-nightly.20210520","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.43.0-nightly.20210520","dist":{"shasum":"5125cc6aa8658b38bb37ad4dc71b116f5cae6854","integrity":"sha512-Ry4PpzNl4juYePGi3OYAxhSMarlCnlEqYvSW4fZssrlHchvxupZ/z22mo6VgYDRE6lYfgP1q5SXtYRCmQAnaWA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.43.0-nightly.20210520.tgz","fileCount":220,"unpackedSize":1381093,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgphBnCRA9TVsSAnZWagAAw7EP/jswmL6SRwaj3D4RfFRj\nPCGbycaSZFAbjTamOagHRQsmopa2OvDhIsxm7DR7h2qoiONou1FvHjgNfaNj\ntZNx/gz6PKyiWVe92HSl16UrfavVwCkyX1iTqY+HEcp8CnmZzWkXG3h5xrf8\njU5QcJ4oYSj/PrQ+5R9WkqqMo/rCi6+WsYVvCE9RuxvrqzCGyRoINd8aCQhM\nBqxgBh1kksUKjlgYtXTQKgWBrzwW0fcqP9fiGSJpWPzMcqxNuqOdRk7az7AT\nHPhHO74Dx9G100Gx7HkvEFttQT4levNYadOQ9bEs/wyDgjKaS7SaLDtFs/c7\nRqNi8og8DMnT8lSTiQ1bDPJ+f2HMOWgHEDM9x9CLnZTyA5v0EJ1nYdcAZZ7Y\nEacj65pGwKui2WFVzvLK5YC1Wmq55CHBUSfGP+h0Hv+XMdteCGE+FxPc1IXv\nh4ByTJxv3Sx1CNZJs3L1a/L1KHiwoNl1t347fuytILEEjBCRVuwWqQzJ+ZbL\nH8t5agAu56328cv+v6XGay4e8o93fh8iE9aoQU1NaRLM/0DdTfyQ6qhb/FlV\nBqUgjalcVXUkTMxMLleYQzR0DHnMmAbvlh0FDnv5x5ajaDVuQvsQzPLkS473\ncq7CFuEEPYaS6tyk5raDgQD32CWPL8yCnVh+ATwzC0Mal19nWdbzncO5ipV3\nUHeN\r\n=pOdS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHs1dXrjtFJOoJ7I19ahrx33W62/UL74n0cPggdggQymAiEAuJqiacCIpAKvm75FLS33ig853hRh+BY1SD9SbNwSTs0="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.43.0-nightly.20210520_1621495911435_0.35103728068000395"},"_hasShrinkwrap":false},"0.43.0-nightly.20210525":{"name":"brs","version":"0.43.0-nightly.20210525","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.43.0-nightly.20210525","dist":{"shasum":"1c55b3cc06369c187fbf5080f79e51375eed936c","integrity":"sha512-X524dT2x7LLautZz163ZxVMWgdhS/RKvYBOY7zkLsGUFGtFbcWn5GzZjec5RnbVpu5mj5TNTfaoT/+Z/Sr749A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.43.0-nightly.20210525.tgz","fileCount":222,"unpackedSize":1385781,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrKpkCRA9TVsSAnZWagAAWzwP/3ubD0JWfwiyUBOxgT1l\nFHyq2xMpy2FnhT2ThoW0Gapa+qY2KBAeGbiNGVL/qO3YWmE5c15aYtFoiozc\n9sFiZWD0xlV2mXlUFAa4UoqNLy+EllOkKQ8GZwdXCEmksq8XO8xt27G7/mCC\nMuNS9mkKfcqCoaaF8Wem2fkikXln1qh6K/vN0PIl5S4V4eqWSaqp9n6zuv24\nFfoSA6zFrfjHDCAEgfle7SHaxyvD9wKx7NPONEsUzQ8vpKvNKuEoMEt8cIBl\nNehT+lMSIwudBrRNuHebLlA4boRsH8uSiJj+O8X8iwW1y/mNRmyTQCjL7vxR\nt5XVHRYyTP7knOAa1Z4Yc5ALNt3dC7vrm73zYQho7bmMgatDpxynYrkfthY7\nxNIotNQPhgHH7mIqAGj6IlOsOrk79RBz6Nnwr71hDjeiynNN0n2CwhUiKns5\nvgIvX/9vNUc4Tip0eRqnIG4jFbMHuIhRtcl7TeAfSpKxwy+C8JBNQ5lF5Vq2\nOMLv3/1D+rJxaJDX1SgSPkZa6BzMEcmGPv2uEsZm9Ile1FAcU03BnH35fQlN\ngKpgTB1AAaHmWo/LxLMJLQWP/Ck6KPnqIe/h62Y3e+cTQWq6SsTbD8RyBO48\nmQB8PEs/JqVitRGwSfxMlnNOgsBoufZzWn4QpKkVCNUD+fDwtS9kegtJhzxf\nP1Vc\r\n=HhLx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0zQ/MDx+oZO6k3yQ7Lx7mmz7EkjyAQrmIGSorQNQ8LQIhAP2ZlecP8OMj+BWuRAq46FqciHtmhdsV20Crul0GARtH"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.43.0-nightly.20210525_1621928548102_0.9561263788238923"},"_hasShrinkwrap":false},"0.43.0-nightly.20210603":{"name":"brs","version":"0.43.0-nightly.20210603","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.43.0-nightly.20210603","dist":{"shasum":"33e1b5d9f86864cb746f91f8d8eb10dff216d57d","integrity":"sha512-Lsr7yHpBojSgLOpKxEQwJQy9vq3ovB2zdVNBoTaZX9VyIxnkK9KmrCdnwrUejhD0q2CijVUwNzqHyIw3tBiX3g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.43.0-nightly.20210603.tgz","fileCount":222,"unpackedSize":1389737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguJQ7CRA9TVsSAnZWagAAU3sP/jgkXFsae7pZ4ar+XxHZ\n9lW4N9jlP8d4A3sLcMl2a4EKZSnomegk1j4LIFTiY8iKdhyFiIzSUq+mABgO\n74x9wNCwYVWK7wNolqeI4XORzVxeQfF3OBtliSZbBivMkSyjSDvgs1LlG99t\nrIq0pPQ3MmCKy74UhZ4KgGlseHkhq/kAqPZxAX3DIG9kLsoM8KpI9XfEply5\ncscK4dAjcTUtijskIZZQUVL2m+dTBd5CdCwAaWVEBWRALr+d4dIevl0P6PU1\n1KnHzcBHd8QzD2gq+tXMY7mRsyehJ7DI25DKVsLgf9H64yR3URi3j1UMvNGS\nCm8663WKmpQfjZ+BZXj6lnnglKAAyB6ylakqsKAzCYh+/eP5nUCKcO9qN7QU\nB429NHL3/g1f4UDN+gjR8k2gjNUaiHXVKo0R4wK/F+LOopoVmIvr6RdcvcMA\nfR6vT7UlXC4D4qiymFpIGyX7lNvvJHKgydss0ZdI5vVGD2G30xjaqtAKqK8w\nJZJ88ltqCqlSAzfpQ7rqDsDqdfXIJk+avfOYBwJqoyI/DPxyZv0IB+9o3c/v\nXlSKeGKCST84AtxfazhyeDTV1OI1iFzBBBkfMmUX0z47ljE9jlA5Y4PXSveY\niOrR9EViTme4e6seBZTUSQ/KUCLHfal8FvJSec/tzzcznB5uC0AOkfYkhXgo\nPqOk\r\n=I2WJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE0qcDZrf9kswOqtK1vmaaT6lMeBBbPj6/Bf4YcyEP6QAiEAsta6ieNstwEBGI+TSRKQ57vKRmPPp5DNYxmdTwRar5k="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.43.0-nightly.20210603_1622709306769_0.6226798601295844"},"_hasShrinkwrap":false},"0.44.0":{"name":"brs","version":"0.44.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.44.0","dist":{"shasum":"edfd0871788799f458aa9f8c6a938db3a6dce5ad","integrity":"sha512-z4pkqr3OR946sAhHwcTW5vf/Au6E+fXNHfgvHXTPflC2zv/9LukZ5oLyJeJ9KtzPrAMeYtAbcGjrTU6wjOuqXQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.44.0.tgz","fileCount":222,"unpackedSize":1388574,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguWB5CRA9TVsSAnZWagAAixAP/jTW0kWuc+b+lxliln9c\nqudkpdnaBaWvSmIhiDKTL+La65d59G1zeDSD2KJOHeNMWkqW3YV2zZrw/d0j\nzDQbxMtqCsBqb3qPH6wtsDt/mDWN20k2psdhpFDHSFy5k4LN+dS0FFleZu/R\nsMGGf2qq95X5K1CsunzOltAZ37K4sBvFf+NjvE9TCdagGXL2DRPgk7Owse00\nB1o9VjIxZXHGNhNhzZn8yn8o5igshCuvzNXxJRhZay6om0H2Re4GmNeiwKcv\nZTWfsGNT8H7oo/AqhxlJ8+KprvphWy5yhFeNR3pG/GBY5bljRzGAc2V+E1Mi\nC/xgqcHJNiHyZ6Q5y1Px1WDLKi3vbc1kB9HT1pYtNEVaXGJUEQmMrh8CDGY+\n7cPvA6BSA89ZqRvBTrDzeRjrRESsJwD5A96bos7aaBqFYOpLy0knk74n1JFr\nupPLNLN+Hage1qjeaMfnd3D8QWQv/VuIfRJGQyACCB9Nx1mIrz2USjYJFWr5\nntQ4pCbq/AG9L/FiuGLRHRmv62NDFRUIVypYOhhuU6nm9O5RWGa0VRhzqxMo\npnoJQnwSN3uZ+Ic4YSNGpL4uYr1mDkwqVKip6iZAgC9RSVFv8ov5hxXyzorq\n1uuCIqgaOnE9mJoFgsMwIkF8XTwKDu3mL9gyu6SBtyklNBcmj22HpTcl01J3\nQ0UT\r\n=D4IL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEZwAX8kQu0vtS6YjgbiH9x8sHOsA4dopmYGyU2gkcHIAiEA37XYsyD4a0SVXYZtW4Jt9EG0GdqEQD5V25lJtq24kwg="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.44.0_1622761593001_0.9368713723763553"},"_hasShrinkwrap":false},"0.44.0-nightly.20210604":{"name":"brs","version":"0.44.0-nightly.20210604","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.44.0-nightly.20210604","dist":{"shasum":"72302432defb4e89626b427e96e5ad469035cdbf","integrity":"sha512-rOb0bGC4uUYhQpIGpYMjCpuyhNCCSEy9e/0LNcUOwIxESp2+XFmfuMoDnmjPEM2SUvlpxdKcD0Y4GaO9l6HLsQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.44.0-nightly.20210604.tgz","fileCount":222,"unpackedSize":1388591,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguewyCRA9TVsSAnZWagAAPbAP/iqrlt+mG7tFHWRBUaB7\nbXjzOpQx4E9PlIcbZtSdq2b7S4ALxWTSZ8CqIsHStzSTAg6gRT7/aQLWPDND\nDicA17Jdv2TZ8vO7ilO2CnuRqwJHIew8MrC608q7yKM1IJ/ZKLS2+JSG4NSo\nu0QvcykhGKmcqWToKNe6vyX8BR9JgHrWQcGUvdfNFYzYjXByAdXBIYSh8W9q\nZHOKWkuJJRtuCeggYUL35LDRzg849PK2eDYpggzWbMf11zJNxJBxVbz/H7T1\nOrWLCfvRb24m0jH0F9ZR87UtpvHaq0A25oeI8ULsg5RAwhQAh7Y9AywKha8m\n5XBHHGajiVfEyPwqWYRNVLA0aF0I/H2d1LrD8VdXVT+5C6T8pw4/kkROYsTA\n9rbJCj6ybRkCiZOw8IxdtAjlM049cBawtU4FTTk+ff6wH2MrFHwPapa9kIGf\nF+jiU+3l1mvWXlie0ib01VqXWP9oH5/Z/wkn7Vbw3kVHAns1h21TU1eczROn\nJdT1J71enRH8qpiRcrSnM5qUigQ84dnQ34lZSemN6Bt9Hb1qmCN4MlI1NWVR\nW9H6veXM4cyIFfWsRrV8rlCRNFGTR6/dES0h+BrGcSrIgGT2xNZey5HJ0VWt\ncmgsvu5lz1u8CzdkERm8tWM0W1gPacxluvDCAFR1uXTgxEi5zwmMUuM7M0yt\nkeh6\r\n=nKNj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNPtb6xmAFMW5lGCL+xgf1veT0yDolik8iaAdT8OGlHwIgBxQKU+S2WTCRX66u0jfyHF92m6p9gqSsXU1M38YkPSM="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.44.0-nightly.20210604_1622797361917_0.8767861388239431"},"_hasShrinkwrap":false},"0.44.0-nightly.20210609":{"name":"brs","version":"0.44.0-nightly.20210609","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.44.0-nightly.20210609","dist":{"shasum":"80069e8013c0d8169c95973d4652d0d555ae5336","integrity":"sha512-C4P44Nz2qEjwi+PMAWm+XsvLObfpBcdVp7W9htS6itzdkdcZ8rptvwsoaLcbkffbn+8eQUFR8cuSqjugR4NpQQ==","tarball":"https://registry.npmjs.org/brs/-/brs-0.44.0-nightly.20210609.tgz","fileCount":222,"unpackedSize":1388858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwG8lCRA9TVsSAnZWagAAIroP/jX9+jtJObufeBWgkuPC\nBTAuQqOLTD3jw3Rk5rVMakgtNAnbm4YfFD7ozBkHPr+hCnNxwHhT8tb4SMQ4\nJ+3nviMLNDelE1rE6O+XcUGSoG26Qmtnzd39WkfRiHfFDgdZET8qhfnEEaD/\n8IzszMABhMbc7BYLrfjCllwEAHewdRfAsJQIMQBWS760jUIV8IwtQ5bi9KOh\nk6VllFY4pLtNx/ZaJnmvgjzWH4qtn6SFszipdZm7DLxFcB/QmuZ+uY76uP4p\n193/38FS4xmj101qP2tcc1vq37+CkFiU4JLrK/IYb7q5n3O6u76NrDorOoz8\nreNmOBmds6qibWzQbwp2q9eDB7xUErXalkD9IJREZgHiL4J3MJHSKVmFIWSb\nGWtxD6AhlmbeIIXcKOPB8DP38aPfg1hpcTzwN87LTe4CCyBHfCG6MDnbRkK9\nl3emCWkunYg7ly6WwXFiRhSC28xmMaqwvdmPE1m6ZaX6Zsbhs23cX6+U3PwG\nNbd8ObZ+C4Cbm+2FhVAOuwQMcXlTgVzkFT89ZJaWjNmQ5qonQKpbdlYQxivw\n0Nel6Q2rnvvdrYSbjECRQTSk4TrEWB+LlKS9Ek9PT26zWn1jREqj1RAMPsc8\nymaUHM3uWWaFCZSWF+GjGRniiFIX3ujbe7o5Cg2p4oEv1B3P+0KkhUauasK7\nJI/1\r\n=kW6X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmIBlV54Q9bb0igWHEUwS/e7oHj/STu/1McoWIHCyJFQIgOGOk5WlZK/7DEluFORnQyILmk/PwLwRPQL/GNT1W8+0="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.44.0-nightly.20210609_1623224101029_0.1552194646792351"},"_hasShrinkwrap":false},"0.44.0-nightly.20210609.1":{"name":"brs","version":"0.44.0-nightly.20210609.1","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.44.0-nightly.20210609.1","dist":{"shasum":"385743b0b96761926f0901ab04bab1b937b48969","integrity":"sha512-noLtOoJIYd0I6ERaW50UpA6Ln7hit9ZeB93U/QmzmV76g4rWk6EnaqDOFIyrDPPThYT2Jb/rdKm00dMrGmDEcg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.44.0-nightly.20210609.1.tgz","fileCount":222,"unpackedSize":1388894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwOrdCRA9TVsSAnZWagAAqB4P/0BsdrB4JGt8MhdL+A7J\nvIu6+4Du0dZ07EvprKijg6aJHifQ+HrCNO84DVYzUpFClDPl2kyP+bkhscwU\nxyM2uedb80j1AvKq+AyIeNahZvylomJnFg//pL0afHnGuZPTevS3rOtxN+wM\npUDITN8CtiM1TlC3jNNnMGGjTQKs4nNhWJpXIzhCruhzqexV5XZIc5/vdAtT\nRqqYoWhOIip3YrpzDz3ZPBpM7wFFJj4IGcO7AQKmUYc6Bg6hF2gcTgW/5Xet\nlW8pDd3l2oCeLrrdrBtPxbzhhXx4mGfdXc2GMru8KS+isrGoiBGtSQi5RY1j\n/DrW1PBpqK8HjLbkIDU/WYeINtAOc9FhLK4r2C1m20y2ywxs1aaRARw3bsgm\nl7kupYKd7AH3hI430WvqC3XXf2zSkfqvLIbdj8HX9wcjI9AMqbcHGChr8O5Y\nx43U3vKT7Uf4ae+/dJTgpaE8LeKIkPj/DSpiMJ0YZGbMa6Ymp/S1mL7TXsuk\nKU/o4osFAfn8Z0SnrSoWImhephPkKgiHbR1eQTmCZcz9YQm5S5z68l69Jnpl\n+jhdKJkd9kdmDtyIZ4HhihSBayjJF80nVylb67BVZD39C/gtZIeJt73j/T7e\nuyz4w2LdCUK+tW9zSP2zWEWFTbibTviyVeFw6fA5pR4N1Ws7AntINJkJu3DY\n1PR9\r\n=ls7l\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBgeu+hjjqCE019YWcP4QRXqheLP+nemFhhkm/Axeo/AIgcyJLXAeKm6IjD7XclNVGo6jNpzmh2wUgR2HuufRfyDw="}]},"_npmUser":{"name":"lkipke","email":"kipkelevi23@gmail.com"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.44.0-nightly.20210609.1_1623255773478_0.5902479445286513"},"_hasShrinkwrap":false},"0.44.0-nightly.20210610":{"name":"brs","version":"0.44.0-nightly.20210610","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.44.0-nightly.20210610","dist":{"shasum":"22873f18c95845e5898a749f30cbbcfffe92d670","integrity":"sha512-OgRSGo5rrqOGiQ9LVBZdbFTHB61jl4ysVAG4JXPJOJzrZFvgTpZZcMse1SN3y8M/bK+pAXVPFbAxZRr8zsfV2A==","tarball":"https://registry.npmjs.org/brs/-/brs-0.44.0-nightly.20210610.tgz","fileCount":222,"unpackedSize":1388892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwcAFCRA9TVsSAnZWagAAqVYP/0d0QMFUzAGFPq//B1hr\ne6eeeLDwfqROZtv67fi8gTc/J9lovIvpCpq0wJ4Er0/9H97AEv1ohPeEbK4S\n5sdCSWR/pqeDpdgZZmLSlGD7bP85+GtxKR+MYvpsngxDF1WyeT5WoVsmfSFs\n2EbRtV+sDCDeWSSNDfXvHcFTmTp85gDmOY6KxbDgGxJ+T8kvafDU/ntimHsZ\nkSjzHFMv2bsSZremc3ob6dfrTK3q4K+ajkg31wwk6Vy9U1MR+z4ZrIof6N8d\nJc3I8BZNqVGvST9BqSD5/XJOCZUdx04q2W1oBwSPHaI0yuXNS0ZCN0Kc47H+\nEn7sgyVXwvEUdVfwQHQp2Fpez9Vnf025DzqHITyBAkObTyA657Ir1xdTn1s8\nW/4++9+ITNIhiRuHwvux+b8fhEvCmV5t47tBPvfBzFmy3APgCtTGfbHjZqLp\nKsSnGsbtYzPeSBb9jAHJsEpZEMM0HwbAVetygSKKZemYY4Ofb6/yvVJzXZba\n3eI2tRRT58zJ+Hq7tt3TSBUOIG2eRWqCb8YFdsOcHvEMoGz6Gc6y89PqW/2l\n8aXJsAxZZhN7JXKQ3k+XjNCM3lV20p7ys9YXQphyuOwd2yHkMZcfB2GFiY6c\nuyRS7XUMF9P5gOXZR/JasfBx4meCWMnD6rL+1xtT5oNJzAf94cetc4uFkdzH\n1+au\r\n=8cON\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEV2gZuXFYeYyHQTIKzHRMIUYwnOSZy7hrTcmqCUPwG9AiBFzmJvPbMNVellNnTUuRFY0LmeIEnfRCPcBXirEt2qWQ=="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.44.0-nightly.20210610_1623310340935_0.7101002690522156"},"_hasShrinkwrap":false},"0.44.1":{"name":"brs","version":"0.44.1","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.44.1","dist":{"shasum":"f87bbc293843cf759cfef4203d7dd2db652f4f9d","integrity":"sha512-rLNLmND8PPziJxjQO8fJH7nLLZpCDnEwpApSvqP/+G5IiOZn5slNdgzI3Kfpwj9nYCdp1FYXvDW5hmBSy681uA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.44.1.tgz","fileCount":222,"unpackedSize":1388647,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgy5UnCRA9TVsSAnZWagAALcsP/2esJw37MvLrbUS0c7Ib\niOI3MKZF3KPQefQiyImHpMoug5IdIVO5bL+raRs1luKscCdpCVyLNWrVOKvG\nnpYUUiLzf2g3WgRoHE1BqWEcvYDpvidjvR3cLw/qLJqlukQQx///8xt/tr5c\nffCIylsWgWp3FGVpyxpWcm6QUgPIX7ZpIa1OLZQo8W6AABonOUNcIVCD7LXc\n5f9MS6zzNnsH0Wlf9+kzYLeIIBu3NTlRbspzi2M663tN5vxCePibTGkl4umt\nYbN0FHkZM5X/9bE93GqqPDdUGUQ4LshMr7ueKD/2PC25YI5IzcfVVwcjy2Dd\nm7LSUi5flZyuU/zRSNSayobZClloeJHT7V1wfeUsDFyVIjXr7zL4JcTSmjU/\nIi6iUNk4VlEcVFsNrbAgDuuBa24C2EvD3vmgGvj4oFdJq6cp317F5qluz6cX\nkgjbGiLrmHx8tSLFwjxtUyisQnxBKeXMAU84K0vbj+/KKeaj2J8eWb0EXm6d\nNrkmTditVGd5LqdGxQNLxY8I5E1jkew2mVhTuNNjyk4+hEzWZoh5x384hBYE\nXmnq2zD1GHVpqX+7sOPgPvGJvnJMMBk1IoWm7cAEmPIQ5u2nfGoi41WiTgbB\nQvjude+jo92rs2jg+i/hQsxTPlnw3iunIby69purpSgrnLgrCy0KKTjjVKjS\n39r8\r\n=HBfn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZqTOq5QhsM6FgmXu6pD5KRXZWNoCLO62TzmBjZjraSQIhALemBcaR7o+L8b5KyPNY22ZJSBreN7nxIc5nbYfOOWaN"}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.44.1_1623954727208_0.561715769874368"},"_hasShrinkwrap":false},"0.44.1-nightly.20210618":{"name":"brs","version":"0.44.1-nightly.20210618","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.44.1-nightly.20210618","dist":{"shasum":"d718d546cf7d91bbfa5e9c272eacd136a5c5cd7d","integrity":"sha512-QTaGfzBhzBCKZLUiRS5+aznBXe79102AFbYxOLQaomjlx2qlOXahrCL81zkC4brIm/j/bBxkbI2XrJ159AWi5g==","tarball":"https://registry.npmjs.org/brs/-/brs-0.44.1-nightly.20210618.tgz","fileCount":222,"unpackedSize":1388664,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgzEp+CRA9TVsSAnZWagAAmPcP/1Ys1Vmbi92eYICubvXd\nv/mzkwxpgX/BKd8RzFXBsg6NwLRnibb8TjaSwkg/7YVai1XOBSZ31DDNHBZh\nvCKlvG17f0ZCgdmj02b3laGMQ3HD4Vyd4bTeYSjIj1lWTdTh3HZv8dll1snm\n8YVKemdEms8T1P6LVEJXWjFmbQcmNs4A+52OGPrg5WsE/s9vbhmPfYB6j9lu\ndr6UuZDFSQ1Pnak9lnard53ADPlwlJW3T0v6vVGdnIpMqfgguxJZ+tfHIMPo\nGdlihyYs9qfKFyPVcoNCMrRP1BABTbub4QiC57K4IeUu6X0+Z0MvcrU6R3Hd\nfXceu4nRfnCI93fyJdNCjAd/UPVk+UtW0hKoYPLQclDxddRSjO/w1mm0W/g1\ngETDv/vNAtrCHP8q3mslHUR8XTTnSAmnKI757q5InEY+D/Yt+KCuRReBPZ5h\nlXjULxdgRGDY0d5KkFo05HXQW3ni8V1PrjGgqWUw2d3Pj9litMYPx9dtKQmn\n5ioW1rjL3wuA3FSSwD6fddhyEzFVNtd9HJ5dFCsv9sA8RIOotq+nvKEdg+To\nGHQuD8lqOGgqKF7DPa1Gf3Nrb22sr3oERFnx6ruDesWKxwdEvILUcl1Bd9ZJ\njLlNYE+QtsQkPkylR0pKj/6jpQBzGce4qo04F6hLyUXKgsSfMNP7RkRpKIlM\nRBdb\r\n=5z6R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtpj0pE0hkYci2QWtjUKUoJKxx8hkQYnegEmATLYaxcAIgB+jNXPpZJZYdqAErWPnHxAtcgKrz8ttMerlca/TBZ3M="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.44.1-nightly.20210618_1624001149615_0.07174081453803494"},"_hasShrinkwrap":false},"0.44.1-nightly.20210625":{"name":"brs","version":"0.44.1-nightly.20210625","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.44.1-nightly.20210625","dist":{"shasum":"7f90d4f33a57b7af1ff358faf474fa701bb07400","integrity":"sha512-tkoUWu2VG1hpwyrlTbS1ZtIshO1Y7+UVVSzkg3YIn/YbGcwbXM+GVwd4KnsFoUdREalDrDysAjW3yE30RlW9SA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.44.1-nightly.20210625.tgz","fileCount":224,"unpackedSize":1390975,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1YM2CRA9TVsSAnZWagAAdzUQAI6w6wLwCxI6TZYPUp4u\n//RAF2SHEAVBW5NgUj1Hr35L1rfDPaRGfn1+nYRZ7MI33DC1QEWhtkXQGN+q\nCmY7LTc3RVWmYvMqpfurvGWx6Pimm5Tf98rI0cDXKk3bNrPMQ63gPrSxFgVZ\ndQNuxZIaWVegNkjMuGabDXIKFaT5nbaOoyf2wNA7RO1Bi1pg7/qbgCGA9u8c\no00qfgyxpJif8wKtFV0V0VSwsSwLptIet3c9/sZni/XBatY4tnkR8WG3JC91\nfHR3/j4zDNFJsQSsznjc/RHUseEoiJ9EYBXz1DaJMII72r8YlBFI5G1kgt2H\nwM6CxfwAQFtEYCFaW0FjA/G18jHgoF56Mr2OHKgNqrfHkSekaGFM9AM2tBPL\nnC6N+GeqYgBj0cQNRamU9Wv0GcTjTGMtPNnR8jYeGcYPtJ3Ao7f/w6s0jSg2\n2q0VF9eekQdmkJ+rDBpjtwWoDrBA08ptwMCZLYKqDjVsDbhJLLg2FPNFuSRl\n00ZeTs7t+2RgqMOiAWPPcGVefOC0OZXOf9L0CJE1GEyAabX/25V6cs0cOtNY\nqeNsA0l2Ddpc5dCLzNreDZYtncRpgrb9sHF6mYT3iIGPjBbEv530kbhB9HkI\nC/r82ycVGpYQOHKOmI3argjyHAK2LTT8RdMu+IPt1OBE5b5naPvUOOnqCqyo\nvhXR\r\n=6XIs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjpeWIJB8x7xUp0pQLs69r4NveRAclUZ6IbX7LmIBBjAIgSF6iu6ytMDf35H8g2VmL/G2mutU6yhBPa3zdcWjxqPU="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.44.1-nightly.20210625_1624605494320_0.5531445362204681"},"_hasShrinkwrap":false},"0.44.1-nightly.20210921":{"name":"brs","version":"0.44.1-nightly.20210921","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.44.1-nightly.20210921","dist":{"shasum":"3a612103b02331791497b0d7edd083c8ca289419","integrity":"sha512-vsRTzPJglgheqJFptx/VDrdzffXVGsKFfXJgC5+hXF/QAKflqHz+9oCV/UEx//cdEp7NATLOQxBJ6H0Cg7FCPw==","tarball":"https://registry.npmjs.org/brs/-/brs-0.44.1-nightly.20210921.tgz","fileCount":224,"unpackedSize":1392592,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDs972IBbypvKVGQVMWjwcf8VkIZ3KrRMZ2gzYWq3/zkQIgNZcEpUcnqwlxIido7zHgocUHyZZhUoXDoJWD0T4B7BU="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.44.1-nightly.20210921_1632208854543_0.7405190488076441"},"_hasShrinkwrap":false},"0.45.0":{"name":"brs","version":"0.45.0","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.45.0","dist":{"shasum":"47ad9136a4693d356ecded337aa1d9fdad6a331e","integrity":"sha512-997wtx16vorMRNfOm6FM+hU+nLoBRdMcX1B2n/TSYcYwMprpCpRU/pSt+OSjb+1pULMcuJTobqF6Rk1XLB3Bhg==","tarball":"https://registry.npmjs.org/brs/-/brs-0.45.0.tgz","fileCount":224,"unpackedSize":1394361,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2lJNCRA9TVsSAnZWagAAKY4P/RfU1VxPmINEvcnTYODr\njC4xRjj8ZGzXrr5tls7DiZXSg7q4pDDvkV4+6mp7daF9Z45oXjLs+vVuAelC\nxuIYLTdJdjPLT5D4Vjhtsx8Pjxk6kPIX8LjsfEmHAtGlUm8a57y7rxZjp/wz\nBThoOwZB7tS+5hddfXwpbSyYzcTSvJV78Av4MIxrS8UL4GricXDcasIGBEfn\nAPDC5ffxugAQwnPu3QUL0GzWtbxE9U+kvORn5Y2I02LQHWjkV+GteK2KFzmO\nnyuh86M/YJfXMoy7UntTjn4AlmQVLDm/Te+FQyxiVtKBMRRv7/aAOhMwnoj3\nQ1qcgio+p4orp1YXBj1PNGZdXHhWZX/IPqGIgf/TrtPs74KAICsqopPFIhA6\n2C/1GdqcFNH9b6TrQLzHi8wKEiq/in2kimz3Reclf50vwd2vPXOkYX5F479o\nfj231dDRQAmXJI22kifUg014jgiwJA8xvwtEFPB8k4n/D+abYSWS40eyZeAp\nkADzrDO6LOK/pAgVdH4XQRh42+5XiIOqw+NYQb5ilBRJzbpJGlXK1U5I1LGz\nO7Mds4m12HAyfgFSwgDSOvNbq6aDs5AmPlpGMy3EFVDn7Fp0Xl/n7W22AzrX\nlv+LIAGMSpZKHLZvdfSCHWCfaqVQwb+928VE58yPFPBtkoETk1WZX1f5uv2Y\neZkM\r\n=JOK5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVSkMK97mf9BDV/V3O2QAhQ37ZWxPY1U2qG32LWgpyfAIgQLux4iZ5F7n/irIRzdrxkVPOj2ab3RLRbdzduFYkm7U="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.45.0_1632349711377_0.36520965951741147"},"_hasShrinkwrap":false},"0.45.0-nightly.20210923":{"name":"brs","version":"0.45.0-nightly.20210923","description":"An interpreter for the BrightScript language that runs on non-Roku platforms.","author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","main":"lib/index.js","typings":"./types/index.d.ts","bin":{"brs":"bin/cli.js"},"scripts":{"build":"tsc","watch":"tsc -w","clean":"rimraf ./lib ./types","test":"jest","test:debug":"node --inspect-brk ./node_modules/.bin/jest --runInBand -- ","lint":"tslint --project .","prettier:write":"prettier --write \"{bin,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{bin,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier test"},"dependencies":{"commander":"^2.12.2","decompress":"^4.2.1","fast-glob":"^3.0.1","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.4.1","nanomatch":"^1.2.13","p-settle":"^2.1.0","sanitize-filename":"^1.6.3","uuid":"^8.3.0","xmldoc":"^1.1.2"},"devDependencies":{"@types/decompress":"^4.2.3","@types/istanbul-lib-coverage":"^2.0.3","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.5.2","@types/p-settle":"^2.0.1","@types/uuid":"^8.3.0","@types/xmldoc":"^1.1.4","doctoc":"^1.4.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","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write"],"README.md":"doctoc"},"readmeFilename":"README.md","readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [BRS: Off-Roku BrightScript](#brs-off-roku-brightscript)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [REPL](#repl)\n    - [Executing a file](#executing-a-file)\n  - [Sure, but why?](#sure-but-why)\n  - [So can I use this to watch TV without a Roku?](#so-can-i-use-this-to-watch-tv-without-a-roku)\n  - [Building from source](#building-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Setup](#setup)\n    - [The build-test-clean dance](#the-build-test-clean-dance)\n      - [Build](#build)\n      - [Testing](#testing)\n      - [Cleaning](#cleaning)\n      - [All Together](#all-together)\n  - [Documentation](#documentation)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# BRS: Off-Roku BrightScript\nAn interpreter for the BrightScript language that runs on non-Roku platforms.\n\n[![CircleCI](https://circleci.com/gh/sjbarag/brs.svg?style=svg)](https://circleci.com/gh/sjbarag/brs)\n[![NPM Version](https://badge.fury.io/js/brs.svg?style=flat)](https://npmjs.org/package/brs)\n\n## Installation\nThe BRS project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install -g brs\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn global add brs\n```\n\n## Usage\nThis repo provides the `brs` executable, which operates in two ways.\n\n### REPL\nAn interactive BrightScript REPL (Read-Execute-Print Loop) is available by running `brs` with no arguments, e.g.:\n\n```\n$ brs\nbrs> ?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\nDennis Ritchie said \"Hello, World!\"\n```\n\nQuit by entering `^D` (Control-D).\n\n### Executing a file\nBRS can execute an arbitrary BrightScript file as well!  Simply pass the file to the `brs` executable, e.g.:\n\n```\n$ cat hello-world.brs\n?\"Dennis Ritchie said \"\"Hello, World!\"\"\"\n\n$ brs hello-world.brs\nDennis Ritchie said \"Hello, World!\"\n```\n\n## Sure, but why?\nThe [Roku](https://roku.com) series of media streaming devices are wildly popular amongst consumers, and several [very](https://netflix.com) [popular](https://hulu.com) [streaming](https://amazon.com/primevideo) [services](https://crackle.com) offer Channels for the Roku platform.  Unfortunately, Roku chanels *must* be written in a language called BrightScript, which is only executable directly on a Roku device.  BRS hopes to change that by allowing Roku developers to test their code on their own machines, thus improving the quality of their channels and the end-user's experience as a whole.\n\n## So can I use this to watch TV without a Roku?\nNope!  The BRS project currently has no intention of emulating the Roku user interface, integrating with the Roku store, or emulating content playback.  In addition to likely getting this project in legal trouble, that sort of emulation is a ton of work.\n\n## Building from source\nThe BRS project follows pretty standard `node` development patterns, with the caveat that it uses `yarn` for dependency management.\n\n### Prerequisites\nBRS builds (and runs) in `node`, so you'll need to [install that first](https://nodejs.org).\n\nOnce that's ready, install [yarn](https://yarnpkg.com).  Installing it with `npm` is probably the simplest:\n\n```shell\n$ npm install -g yarn\n```\n### Setup\n1. Clone this repo:\n   ```\n   $ git clone https://github.com/sjbarag/brs.git\n   ```\n\n2. Install dependencies:\n    ```shell\n    $ yarn install     # or just `yarn`\n    ```\n\n3. Get `brs` onto your `PATH`:\n    ``` shell\n    $ yarn link\n    ```\n### The build-test-clean dance\n#### Build\nThis project is written in TypeScript, so it needs to be compiled before it can be executed.  `yarn build` compiles files in `src/` into JavaScript and TypeScript declarations, and puts them in `lib/` and `types/` respectively.\n\n```shell\n$ yarn build\n\n$ ls lib/\nindex.js (and friends)\n\n$ ls types/\nindex.d.ts (and friends)\n```\n\nAlternatively, you can run the build step in \"watch\" mode. This will run `yarn build` for you automatically, every time it detects source file changes:\n```shell\n$ yarn watch\n```\nThis is often useful for testing that local changes work in your BrightScript project, without having to run `yarn build` over and over.\n\n#### Testing\nTests are written in plain-old JavaScript with [Facebook's Jest](http://facebook.github.io/jest/), and can be run with the `test` target:\n\n```shell\n$ yarn test\n\n# tests start running\n```\n\nNote that only test files ending in `.test.js` will be executed by `yarn test`.\n\n#### Cleaning\nCompiled output in `lib/` and `types/` can be removed with the `clean` target:\n\n```shell\n$ yarn clean\n\n$ ls lib/\nls: cannot access 'lib': No such file or directory\n\n$ ls types/\nls: cannot access 'types': No such file or directory\n```\n\n#### All Together\nThanks to the [npm-run-all](https://www.npmjs.com/package/npm-run-all) package, it's trivially easy to combine these into a sequence of tasks without relying on shell semantics:\n\n```shell\n$ yarn run-s clean build test\n```\n\n## Documentation\n\nFor the most part, `brs` attempts to emulate BrightScript as closely as possible. However, there are certain implementation gaps. Also, in the spirit of unit testing, there are a few extensions that will help with testing. All of our documentation for APIs, extensions, gaps, and more is hosted on our docs site, [hulu.github.io/roca](https://hulu.github.io/roca).\n","licenseText":"MIT License\n\nCopyright (c) 2018, Sean Barag\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@0.45.0-nightly.20210923","dist":{"shasum":"50ce480ab1d9d0b8177d637eb4de5bfe57b241bc","integrity":"sha512-mLLs7HuAXejxnVqKo3A+iz2lVmr1v1q0+Ry5fM/+ZfyAw7+CYeeGYJaeZQ6Pde1ca6WPZ2p0UGa2MBFLD+YRLA==","tarball":"https://registry.npmjs.org/brs/-/brs-0.45.0-nightly.20210923.tgz","fileCount":224,"unpackedSize":1394378,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBXupw6VeYOhGRhJB9VYB2vSbAAIYSX14x18+Zaavq5RAiEAnWunrfvubs87eHn2WykqsNs6MGUkp+xK8ahhwfp853o="}]},"_npmUser":{"name":"sjbarag","email":"npm@barag.org"},"directories":{},"maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs_0.45.0-nightly.20210923_1632381685844_0.2236006474208465"},"_hasShrinkwrap":false}},"readme":"","maintainers":[{"name":"sjbarag","email":"npm@barag.org"},{"name":"lkipke","email":"kipkelevi23@gmail.com"}],"time":{"modified":"2022-06-13T05:11:44.955Z","created":"2018-01-02T15:09:36.303Z","0.1.0":"2018-01-02T15:09:36.303Z","0.2.0":"2018-01-05T16:32:18.938Z","0.2.1":"2018-01-06T15:00:56.562Z","0.3.0":"2018-01-09T15:56:20.647Z","0.4.0":"2018-01-15T23:51:37.972Z","0.5.0":"2018-03-05T02:29:50.940Z","0.5.1":"2018-03-17T18:03:30.733Z","0.6.0":"2018-04-04T03:50:54.022Z","0.6.1-alpha":"2018-04-06T00:58:09.733Z","0.6.1":"2018-04-06T01:05:02.406Z","0.7.0":"2018-04-25T15:55:46.311Z","0.8.0":"2018-05-24T16:25:22.122Z","0.9.0":"2018-11-01T03:18:55.117Z","0.10.0":"2018-11-29T01:26:48.179Z","0.11.0":"2018-12-03T18:30:36.347Z","0.12.0":"2018-12-18T23:08:33.689Z","0.13.0-beta.0":"2019-01-11T00:45:59.025Z","0.13.0-beta.2":"2019-01-18T18:23:55.818Z","0.13.0-rc":"2019-02-02T20:57:48.253Z","0.13.0-rc.2":"2019-02-03T22:03:23.341Z","0.13.0-rc.3":"2019-02-23T21:46:30.944Z","0.13.0-nightly.20190226":"2019-02-26T04:36:18.784Z","0.13.0-nightly.20190302":"2019-03-02T07:06:20.681Z","0.13.0-nightly.20190303":"2019-03-03T07:06:30.162Z","0.13.0-nightly.20190304":"2019-03-04T07:06:40.084Z","0.13.0-nightly.20190305":"2019-03-05T07:06:13.943Z","0.13.0-nightly.20190306":"2019-03-06T07:06:11.862Z","0.13.0-nightly.20190307":"2019-03-07T07:06:15.795Z","0.13.0-nightly.20190308":"2019-03-08T07:06:15.726Z","0.13.0-nightly.20190309":"2019-03-09T07:06:44.158Z","0.13.0-nightly.20190310":"2019-03-10T07:06:18.252Z","0.13.0-nightly.20190311":"2019-03-11T07:06:14.560Z","0.13.0-nightly.20190319":"2019-03-19T07:06:11.593Z","0.13.0-nightly.20190320":"2019-03-20T07:06:10.880Z","0.13.0-nightly.20190321":"2019-03-21T07:06:31.292Z","0.13.0-nightly.20190322":"2019-03-22T07:06:22.480Z","0.13.0-nightly.20190323":"2019-03-23T07:06:35.077Z","0.13.0-nightly.20190324":"2019-03-24T07:06:20.209Z","0.13.0-nightly.20190325":"2019-03-25T07:06:14.604Z","0.13.0-nightly.20190326":"2019-03-26T07:06:10.163Z","0.13.0-nightly.20190327":"2019-03-27T07:06:33.406Z","0.13.0-nightly.20190328":"2019-03-28T07:06:28.479Z","0.13.0-nightly.20190329":"2019-03-29T07:06:47.188Z","0.13.0-nightly.20190330":"2019-03-30T07:06:05.849Z","0.13.0-nightly.20190331":"2019-03-31T07:06:08.751Z","0.13.0-nightly.20190401":"2019-04-01T07:06:17.630Z","0.13.0-nightly.20190402":"2019-04-02T07:06:34.224Z","0.13.0-nightly.20190403":"2019-04-03T07:06:28.941Z","0.13.0-nightly.20190404":"2019-04-04T07:06:16.474Z","0.13.0-nightly.20190405":"2019-04-05T07:06:53.720Z","0.13.0-nightly.20190406":"2019-04-06T07:06:31.724Z","0.13.0-nightly.20190407":"2019-04-07T07:06:17.505Z","0.13.0-nightly.20190408":"2019-04-08T07:06:25.238Z","0.13.0-nightly.20190409":"2019-04-09T07:06:09.819Z","0.13.0-nightly.20190411":"2019-04-11T07:06:28.353Z","0.13.0-nightly.20190412":"2019-04-12T07:06:46.778Z","0.13.0-nightly.20190413":"2019-04-13T07:06:15.042Z","0.13.0-nightly.20190414":"2019-04-14T07:07:59.886Z","0.13.0-nightly.20190415":"2019-04-15T07:06:41.897Z","0.13.0-nightly.20190416":"2019-04-16T07:06:17.720Z","0.13.0-nightly.20190417":"2019-04-17T07:07:13.140Z","0.13.0-nightly.20190418":"2019-04-18T07:06:09.370Z","0.13.0-nightly.20190419":"2019-04-19T07:06:35.945Z","0.13.0-nightly.20190420":"2019-04-20T07:07:00.818Z","0.13.0-nightly.20190421":"2019-04-21T07:06:54.540Z","0.13.0-nightly.20190422":"2019-04-22T07:07:31.111Z","0.13.0-nightly.20190423":"2019-04-23T07:07:11.874Z","0.13.0-nightly.20190424":"2019-04-24T07:06:18.412Z","0.13.0-nightly.20190425":"2019-04-25T07:06:25.978Z","0.13.0-nightly.20190426":"2019-04-26T07:06:21.904Z","0.13.0-nightly.20190427":"2019-04-27T07:06:33.376Z","0.13.0-nightly.20190428":"2019-04-28T07:06:52.876Z","0.13.0-nightly.20190429":"2019-04-29T07:06:33.742Z","0.13.0-nightly.20190430":"2019-04-30T07:06:14.987Z","0.13.0-nightly.20190501":"2019-05-01T07:06:58.835Z","0.13.0-nightly.20190502":"2019-05-02T07:06:57.680Z","0.13.0-nightly.20190503":"2019-05-03T07:06:43.645Z","0.13.0-nightly.20190504":"2019-05-04T07:06:33.868Z","0.13.0-nightly.20190505":"2019-05-05T07:06:13.575Z","0.13.0-nightly.20190506":"2019-05-06T07:06:28.517Z","0.13.0-nightly.20190507":"2019-05-07T07:06:50.182Z","0.13.0-nightly.20190508":"2019-05-08T07:06:46.990Z","0.13.0-nightly.20190509":"2019-05-09T07:06:47.140Z","0.13.0-nightly.20190510":"2019-05-10T07:07:39.034Z","0.13.0-nightly.20190511":"2019-05-11T07:06:22.130Z","0.13.0-nightly.20190512":"2019-05-12T07:06:34.679Z","0.13.0-nightly.20190513":"2019-05-13T07:06:26.433Z","0.13.0-nightly.20190514":"2019-05-14T07:06:26.540Z","0.13.0-nightly.20190515":"2019-05-15T07:06:23.002Z","0.13.0-nightly.20190516":"2019-05-16T07:06:22.551Z","0.13.0-nightly.20190517":"2019-05-17T07:06:45.708Z","0.13.0-nightly.20190518":"2019-05-18T07:06:15.100Z","0.13.0-nightly.20190519":"2019-05-19T07:06:19.711Z","0.13.0-nightly.20190520":"2019-05-20T07:06:24.035Z","0.13.0-nightly.20190521":"2019-05-21T07:06:11.839Z","0.13.0-nightly.20190522":"2019-05-22T07:06:30.522Z","0.13.0-nightly.20190523":"2019-05-23T07:06:30.611Z","0.13.0-nightly.20190524":"2019-05-24T07:06:34.976Z","0.13.0":"2019-05-24T16:14:39.143Z","0.13.0-nightly.20190525":"2019-05-25T07:06:49.129Z","0.13.0-nightly.20190526":"2019-05-26T07:06:40.064Z","0.13.0-nightly.20190527":"2019-05-27T07:06:39.271Z","0.13.0-nightly.20190528":"2019-05-28T07:06:39.434Z","0.13.0-nightly.20190529":"2019-05-29T07:06:43.862Z","0.13.0-nightly.20190530":"2019-05-30T07:06:24.981Z","0.13.0-nightly.20190531":"2019-05-31T07:07:05.343Z","0.13.0-nightly.20190601":"2019-06-01T07:06:27.999Z","0.13.0-nightly.20190602":"2019-06-02T07:06:27.200Z","0.13.0-nightly.20190603":"2019-06-03T07:06:53.084Z","0.13.0-nightly.20190604":"2019-06-04T07:06:29.367Z","0.13.0-nightly.20190605":"2019-06-05T07:06:38.549Z","0.13.0-nightly.20190606":"2019-06-06T07:06:36.594Z","0.13.0-nightly.20190607":"2019-06-07T07:07:21.125Z","0.13.0-nightly.20190608":"2019-06-08T07:07:30.552Z","0.13.0-nightly.20190609":"2019-06-09T07:06:55.023Z","0.13.0-nightly.20190610":"2019-06-10T07:06:21.645Z","0.13.0-nightly.20190611":"2019-06-11T07:06:42.328Z","0.13.0-nightly.20190612":"2019-06-12T07:06:28.567Z","0.14.0":"2019-06-12T22:45:17.778Z","0.14.0-nightly.20190613":"2019-06-13T07:07:01.834Z","0.14.0-nightly.20190614":"2019-06-14T07:06:55.031Z","0.14.0-nightly.20190615":"2019-06-15T07:06:43.243Z","0.14.0-nightly.20190616":"2019-06-16T07:06:26.530Z","0.14.0-nightly.20190617":"2019-06-17T07:06:22.762Z","0.14.0-nightly.20190618":"2019-06-18T07:07:00.532Z","0.14.0-nightly.20190619":"2019-06-19T07:06:51.697Z","0.14.0-nightly.20190620":"2019-06-20T07:06:32.573Z","0.14.0-nightly.20190621":"2019-06-21T07:06:54.156Z","0.14.0-nightly.20190622":"2019-06-22T07:08:13.478Z","0.14.0-nightly.20190623":"2019-06-23T07:06:23.920Z","0.14.0-nightly.20190624":"2019-06-24T07:06:49.678Z","0.14.0-nightly.20190625":"2019-06-25T07:06:49.785Z","0.14.0-nightly.20190626":"2019-06-26T07:06:42.608Z","0.14.0-nightly.20190627":"2019-06-27T07:07:08.822Z","0.14.0-nightly.20190628":"2019-06-28T07:07:03.189Z","0.14.0-nightly.20190629":"2019-06-29T07:06:28.669Z","0.14.0-nightly.20190630":"2019-06-30T07:07:01.034Z","0.14.0-nightly.20190701":"2019-07-01T07:07:22.727Z","0.14.0-nightly.20190702":"2019-07-02T07:07:00.786Z","0.14.0-nightly.20190703":"2019-07-03T07:06:56.921Z","0.14.0-nightly.20190704":"2019-07-04T07:06:35.481Z","0.14.0-nightly.20190705":"2019-07-05T07:06:37.868Z","0.14.0-nightly.20190706":"2019-07-06T07:06:27.358Z","0.14.0-nightly.20190707":"2019-07-07T07:06:34.065Z","0.14.0-nightly.20190708":"2019-07-08T07:06:45.635Z","0.14.0-nightly.20190709":"2019-07-09T07:06:40.062Z","0.14.0-nightly.20190710":"2019-07-10T07:06:46.963Z","0.14.0-nightly.20190711":"2019-07-11T07:06:31.773Z","0.14.0-nightly.20190712":"2019-07-12T07:06:29.432Z","0.14.0-nightly.20190713":"2019-07-13T07:08:18.756Z","0.14.0-nightly.20190714":"2019-07-14T07:06:35.953Z","0.14.0-nightly.20190715":"2019-07-15T07:06:43.178Z","0.14.0-nightly.20190717":"2019-07-17T07:06:41.517Z","0.14.0-nightly.20190718":"2019-07-18T07:06:40.254Z","0.14.0-nightly.20190719":"2019-07-19T07:06:48.009Z","0.14.0-nightly.20190720":"2019-07-20T07:06:38.685Z","0.14.0-nightly.20190721":"2019-07-21T07:06:44.384Z","0.14.0-nightly.20190723":"2019-07-23T07:06:42.516Z","0.14.0-nightly.20190725":"2019-07-25T07:06:59.183Z","0.14.0-nightly.20190726":"2019-07-26T07:06:51.777Z","0.14.0-nightly.20190727":"2019-07-27T07:08:03.044Z","0.14.0-nightly.20190729":"2019-07-29T07:07:20.758Z","0.14.0-nightly.20190730":"2019-07-30T07:07:44.769Z","0.14.0-nightly.20190731":"2019-07-31T07:07:02.618Z","0.14.0-nightly.20190801":"2019-08-01T07:06:42.666Z","0.14.0-nightly.20190802":"2019-08-02T07:06:34.939Z","0.14.0-nightly.20190803":"2019-08-03T07:08:45.847Z","0.14.0-nightly.20190804":"2019-08-04T07:07:41.567Z","0.14.0-nightly.20190805":"2019-08-05T07:08:07.222Z","0.14.0-nightly.20190807":"2019-08-07T07:06:37.941Z","0.14.0-nightly.20190808":"2019-08-08T07:06:42.698Z","0.14.0-nightly.20190809":"2019-08-09T07:07:00.513Z","0.14.0-nightly.20190810":"2019-08-10T07:07:56.134Z","0.14.0-nightly.20190811":"2019-08-11T07:06:50.126Z","0.14.0-nightly.20190812":"2019-08-12T07:09:09.517Z","0.14.0-nightly.20190813":"2019-08-13T07:07:45.936Z","0.14.0-nightly.20190814":"2019-08-14T07:06:28.473Z","0.14.0-nightly.20190815":"2019-08-15T07:06:49.641Z","0.14.0-nightly.20190816":"2019-08-16T07:07:00.052Z","0.14.0-nightly.20190817":"2019-08-17T07:08:46.506Z","0.14.0-nightly.20190818":"2019-08-18T07:08:13.931Z","0.14.0-nightly.20190819":"2019-08-19T07:06:33.984Z","0.14.0-nightly.20190820":"2019-08-20T07:06:40.386Z","0.14.0-nightly.20190821":"2019-08-21T07:06:39.095Z","0.14.0-nightly.20190822":"2019-08-22T07:06:28.403Z","0.14.0-nightly.20190823":"2019-08-23T07:07:09.545Z","0.14.0-nightly.20190824":"2019-08-24T07:06:20.775Z","0.14.0-nightly.20190825":"2019-08-25T07:07:19.737Z","0.14.0-nightly.20190826":"2019-08-26T07:06:48.854Z","0.14.0-nightly.20190827":"2019-08-27T07:07:14.724Z","0.14.0-nightly.20190828":"2019-08-28T07:07:11.226Z","0.14.0-nightly.20190829":"2019-08-29T07:06:26.969Z","0.14.0-nightly.20190830":"2019-08-30T07:06:56.361Z","0.14.0-nightly.20190831":"2019-08-31T07:06:26.764Z","0.14.0-nightly.20190901":"2019-09-01T07:06:42.985Z","0.14.0-nightly.20190902":"2019-09-02T07:06:42.907Z","0.14.0-nightly.20190903":"2019-09-03T07:07:30.669Z","0.14.0-nightly.20190904":"2019-09-04T07:07:20.034Z","0.14.0-nightly.20190905":"2019-09-05T07:06:42.097Z","0.14.0-nightly.20190906":"2019-09-06T07:06:25.297Z","0.14.0-nightly.20190907":"2019-09-07T07:06:40.821Z","0.14.0-nightly.20190908":"2019-09-08T07:06:44.219Z","0.14.0-nightly.20190910":"2019-09-10T07:06:53.433Z","0.14.0-nightly.20190911":"2019-09-11T07:06:29.866Z","0.14.0-nightly.20190912":"2019-09-12T07:06:31.338Z","0.14.0-nightly.20190913":"2019-09-13T07:06:42.845Z","0.14.0-nightly.20190914":"2019-09-14T07:17:25.462Z","0.14.0-nightly.20190915":"2019-09-15T07:16:01.403Z","0.14.0-nightly.20190917":"2019-09-17T07:15:54.468Z","0.14.0-nightly.20190918":"2019-09-18T07:15:43.326Z","0.14.0-nightly.20190919":"2019-09-19T07:16:06.740Z","0.14.0-nightly.20190920":"2019-09-20T07:15:45.915Z","0.14.0-nightly.20190921":"2019-09-21T07:15:59.597Z","0.14.0-nightly.20190922":"2019-09-22T07:15:20.972Z","0.14.0-nightly.20190923":"2019-09-23T07:15:58.347Z","0.14.0-nightly.20190924":"2019-09-24T07:15:46.708Z","0.14.0-nightly.20190925":"2019-09-25T07:15:31.890Z","0.14.0-nightly.20190926":"2019-09-26T07:15:51.995Z","0.14.0-nightly.20190927":"2019-09-27T07:15:39.177Z","0.15.0":"2019-09-27T22:23:31.237Z","0.15.0-nightly.20190928":"2019-09-28T07:15:28.791Z","0.15.0-nightly.20190929":"2019-09-29T07:15:26.674Z","0.15.0-nightly.20190930":"2019-09-30T07:15:28.545Z","0.15.0-nightly.20191001":"2019-10-01T07:15:45.658Z","0.15.0-nightly.20191002":"2019-10-02T07:15:43.000Z","0.15.0-nightly.20191003":"2019-10-03T07:15:31.108Z","0.15.0-nightly.20191004":"2019-10-04T07:15:36.986Z","0.15.0-nightly.20191005":"2019-10-05T07:15:24.500Z","0.15.0-nightly.20191006":"2019-10-06T07:15:34.505Z","0.15.0-nightly.20191007":"2019-10-07T07:15:40.557Z","0.15.0-nightly.20191008":"2019-10-08T07:15:56.647Z","0.15.0-nightly.20191009":"2019-10-09T07:15:58.043Z","0.15.0-nightly.20191011":"2019-10-11T07:15:34.801Z","0.15.0-nightly.20191012":"2019-10-12T07:15:49.299Z","0.15.0-nightly.20191013":"2019-10-13T07:15:30.157Z","0.15.0-nightly.20191014":"2019-10-14T07:15:51.313Z","0.15.0-nightly.20191015":"2019-10-15T07:15:44.857Z","0.15.0-nightly.20191017":"2019-10-17T07:15:39.289Z","0.15.0-nightly.20191018":"2019-10-18T07:15:53.499Z","0.15.0-nightly.20191019":"2019-10-19T07:16:46.084Z","0.15.0-nightly.20191020":"2019-10-20T07:15:24.292Z","0.15.0-nightly.20191021":"2019-10-21T07:15:52.506Z","0.15.0-nightly.20191022":"2019-10-22T07:15:39.450Z","0.15.0-nightly.20191023":"2019-10-23T07:15:47.588Z","0.15.0-nightly.20191024":"2019-10-24T07:16:24.398Z","0.15.0-nightly.20191025":"2019-10-25T07:16:01.540Z","0.15.0-nightly.20191026":"2019-10-26T07:16:27.159Z","0.15.0-nightly.20191027":"2019-10-27T07:15:34.168Z","0.15.0-nightly.20191028":"2019-10-28T07:15:44.004Z","0.15.0-nightly.20191029":"2019-10-29T07:16:03.802Z","0.15.0-nightly.20191030":"2019-10-30T07:15:36.929Z","0.15.0-nightly.20191101":"2019-11-01T07:15:47.115Z","0.16.0":"2019-11-01T22:30:26.294Z","0.16.0-nightly.20191102":"2019-11-02T07:15:56.306Z","0.16.0-nightly.20191103":"2019-11-03T07:15:31.859Z","0.16.0-nightly.20191104":"2019-11-04T07:15:43.323Z","0.16.0-nightly.20191105":"2019-11-05T07:17:05.562Z","0.16.0-nightly.20191106":"2019-11-06T07:15:47.517Z","0.16.0-nightly.20191107":"2019-11-07T07:16:06.744Z","0.16.0-nightly.20191109":"2019-11-09T07:16:05.834Z","0.16.0-nightly.20191110":"2019-11-10T07:15:38.422Z","0.16.0-nightly.20191111":"2019-11-11T07:15:57.905Z","0.16.0-nightly.20191112":"2019-11-12T07:15:55.508Z","0.16.0-nightly.20191113":"2019-11-13T07:15:47.968Z","0.16.0-nightly.20191114":"2019-11-14T07:16:01.092Z","0.16.0-nightly.20191115":"2019-11-15T07:16:12.054Z","0.16.0-nightly.20191116":"2019-11-16T07:15:30.933Z","0.16.0-nightly.20191117":"2019-11-17T07:15:31.167Z","0.16.0-nightly.20191118":"2019-11-18T07:15:52.153Z","0.16.0-nightly.20191119":"2019-11-19T07:16:45.781Z","0.16.0-nightly.20191120":"2019-11-20T07:15:50.701Z","0.16.0-nightly.20191121":"2019-11-21T07:16:00.230Z","0.16.0-nightly.20191123":"2019-11-23T07:15:49.753Z","0.16.0-nightly.20191124":"2019-11-24T07:15:51.573Z","0.16.0-nightly.20191125":"2019-11-25T07:16:14.358Z","0.16.0-nightly.20191126":"2019-11-26T07:16:03.196Z","0.16.0-nightly.20191127":"2019-11-27T07:15:55.165Z","0.16.0-nightly.20191128":"2019-11-28T07:16:02.337Z","0.16.0-nightly.20191129":"2019-11-29T07:16:05.942Z","0.16.0-nightly.20191130":"2019-11-30T07:15:31.747Z","0.16.0-nightly.20191201":"2019-12-01T07:15:44.725Z","0.16.0-nightly.20191202":"2019-12-02T07:15:57.569Z","0.16.0-nightly.20191203":"2019-12-03T07:15:56.114Z","0.16.0-nightly.20191204":"2019-12-04T07:15:28.623Z","0.16.0-nightly.20191205":"2019-12-05T07:15:49.004Z","0.16.0-nightly.20191206":"2019-12-06T07:16:04.733Z","0.16.0-nightly.20191207":"2019-12-07T07:15:27.365Z","0.16.0-nightly.20191208":"2019-12-08T07:15:22.186Z","0.16.0-nightly.20191210":"2019-12-10T07:16:23.193Z","0.16.0-nightly.20191211":"2019-12-11T07:16:15.281Z","0.16.0-nightly.20191212":"2019-12-12T07:15:58.046Z","0.16.0-nightly.20191213":"2019-12-13T07:15:56.272Z","0.16.0-nightly.20191214":"2019-12-14T07:15:35.549Z","0.16.0-nightly.20191216":"2019-12-16T07:15:47.228Z","0.16.0-nightly.20191217":"2019-12-17T07:15:47.462Z","0.16.0-nightly.20191218":"2019-12-18T07:16:01.506Z","0.16.0-nightly.20191219":"2019-12-19T07:15:44.679Z","0.16.0-nightly.20191220":"2019-12-20T07:16:20.710Z","0.16.0-nightly.20191221":"2019-12-21T07:15:44.847Z","0.16.0-nightly.20191222":"2019-12-22T07:15:36.253Z","0.16.0-nightly.20191223":"2019-12-23T07:16:07.215Z","0.16.0-nightly.20191224":"2019-12-24T07:15:46.257Z","0.16.0-nightly.20191225":"2019-12-25T07:16:05.269Z","0.16.0-nightly.20191226":"2019-12-26T07:15:56.316Z","0.16.0-nightly.20191227":"2019-12-27T07:15:56.662Z","0.16.0-nightly.20191228":"2019-12-28T07:15:37.509Z","0.16.0-nightly.20191229":"2019-12-29T07:17:28.876Z","0.16.0-nightly.20191230":"2019-12-30T07:16:02.154Z","0.17.0":"2019-12-30T23:44:20.092Z","0.17.0-nightly.20191231":"2019-12-31T07:16:00.835Z","0.17.0-nightly.20200101":"2020-01-01T07:15:42.278Z","0.17.0-nightly.20200102":"2020-01-02T07:15:59.270Z","0.17.1":"2020-01-02T21:26:37.030Z","0.17.1-nightly.20200103":"2020-01-03T07:15:58.079Z","0.17.1-nightly.20200104":"2020-01-04T07:15:33.436Z","0.17.1-nightly.20200105":"2020-01-05T07:15:32.801Z","0.17.1-nightly.20200106":"2020-01-06T07:15:47.006Z","0.17.1-nightly.20200107":"2020-01-07T07:15:45.393Z","0.17.1-nightly.20200108":"2020-01-08T07:16:08.694Z","0.17.1-nightly.20200109":"2020-01-09T07:16:02.025Z","0.17.1-nightly.20200110":"2020-01-10T07:16:08.296Z","0.17.1-nightly.20200111":"2020-01-11T07:15:42.271Z","0.17.1-nightly.20200112":"2020-01-12T07:15:54.748Z","0.17.1-nightly.20200113":"2020-01-13T07:15:56.962Z","0.17.1-nightly.20200114":"2020-01-14T07:17:08.359Z","0.17.1-nightly.20200115":"2020-01-15T07:17:42.730Z","0.17.1-nightly.20200116":"2020-01-16T07:15:54.242Z","0.17.1-nightly.20200117":"2020-01-17T07:15:46.929Z","0.17.2":"2020-01-17T23:05:19.608Z","0.17.2-nightly.20200118":"2020-01-18T07:15:36.327Z","0.17.2-nightly.20200119":"2020-01-19T07:15:40.836Z","0.17.2-nightly.20200120":"2020-01-20T07:15:48.972Z","0.17.2-nightly.20200121":"2020-01-21T07:15:47.762Z","0.17.3":"2020-01-21T23:43:54.384Z","0.17.2-nightly.20200122":"2020-01-22T07:15:47.222Z","0.17.3-nightly.20200123":"2020-01-23T07:16:05.691Z","0.17.4":"2020-01-24T00:55:21.438Z","0.17.3-nightly.20200124":"2020-01-24T07:15:48.758Z","0.17.3-nightly.20200125":"2020-01-25T07:15:48.655Z","0.17.3-nightly.20200126":"2020-01-26T07:15:47.424Z","0.17.3-nightly.20200127":"2020-01-27T07:15:48.760Z","0.17.5":"2020-01-27T20:38:25.822Z","0.17.5-nightly.20200128":"2020-01-28T07:16:01.309Z","0.17.5-nightly.20200129":"2020-01-29T07:16:14.248Z","0.17.6":"2020-01-29T17:17:16.491Z","0.18.0":"2020-01-29T17:26:01.535Z","0.18.0-nightly.20200130":"2020-01-30T07:15:37.229Z","0.18.0-nightly.20200131":"2020-01-31T07:16:07.180Z","0.18.0-nightly.20200201":"2020-02-01T07:15:41.320Z","0.18.0-nightly.20200202":"2020-02-02T07:15:58.435Z","0.18.0-nightly.20200203":"2020-02-03T07:16:32.519Z","0.18.0-nightly.20200204":"2020-02-04T07:16:03.753Z","0.18.0-nightly.20200205":"2020-02-05T07:15:49.461Z","0.18.0-nightly.20200206":"2020-02-06T07:16:11.532Z","0.18.0-nightly.20200207":"2020-02-07T07:07:16.128Z","0.18.0-nightly.20200208":"2020-02-08T07:06:58.371Z","0.18.0-nightly.20200209":"2020-02-09T07:06:44.078Z","0.18.0-nightly.20200210":"2020-02-10T07:07:03.577Z","0.18.0-nightly.20200211":"2020-02-11T07:06:41.944Z","0.18.0-nightly.20200212":"2020-02-12T07:08:05.450Z","0.18.0-nightly.20200213":"2020-02-13T07:06:55.790Z","0.18.0-nightly.20200214":"2020-02-14T07:07:28.585Z","0.18.0-nightly.20200215":"2020-02-15T07:07:13.666Z","0.18.0-nightly.20200216":"2020-02-16T07:06:52.016Z","0.18.0-nightly.20200217":"2020-02-17T07:07:06.868Z","0.18.0-nightly.20200218":"2020-02-18T07:07:32.911Z","0.18.0-nightly.20200219":"2020-02-19T07:06:49.990Z","0.18.1":"2020-02-19T17:45:47.645Z","0.18.1-nightly.20200220":"2020-02-20T07:06:56.442Z","0.18.1-nightly.20200221":"2020-02-21T07:07:06.594Z","0.18.1-nightly.20200222":"2020-02-22T07:07:12.198Z","0.18.1-nightly.20200223":"2020-02-23T07:06:59.175Z","0.18.1-nightly.20200224":"2020-02-24T07:07:17.269Z","0.18.1-nightly.20200225":"2020-02-25T07:06:50.953Z","0.18.1-nightly.20200226":"2020-02-26T07:07:45.318Z","0.18.1-nightly.20200227":"2020-02-27T07:06:57.192Z","0.18.1-nightly.20200228":"2020-02-28T07:08:03.708Z","0.18.1-nightly.20200229":"2020-02-29T07:07:27.699Z","0.18.1-nightly.20200301":"2020-03-01T07:06:56.234Z","0.18.1-nightly.20200302":"2020-03-02T07:06:56.826Z","0.18.1-nightly.20200303":"2020-03-03T07:07:16.417Z","0.18.1-nightly.20200304":"2020-03-04T07:07:03.683Z","0.18.1-nightly.20200305":"2020-03-05T07:07:23.751Z","0.18.1-nightly.20200306":"2020-03-06T07:07:36.563Z","0.18.1-nightly.20200307":"2020-03-07T07:07:04.269Z","0.18.1-nightly.20200308":"2020-03-08T07:07:57.369Z","0.18.2":"2020-03-08T21:18:54.651Z","0.18.2-nightly.20200309":"2020-03-09T07:07:19.024Z","0.18.2-nightly.20200310":"2020-03-10T07:07:03.035Z","0.18.2-nightly.20200311":"2020-03-11T07:06:58.295Z","0.18.2-nightly.20200312":"2020-03-12T07:07:31.008Z","0.18.2-nightly.20200313":"2020-03-13T07:06:46.317Z","0.18.2-nightly.20200314":"2020-03-14T07:07:39.570Z","0.18.2-nightly.20200315":"2020-03-15T07:07:04.219Z","0.18.2-nightly.20200316":"2020-03-16T07:07:18.287Z","0.18.2-nightly.20200317":"2020-03-17T07:07:49.569Z","0.18.2-nightly.20200318":"2020-03-18T07:07:56.728Z","0.18.2-nightly.20200319":"2020-03-19T07:08:12.863Z","0.18.2-nightly.20200320":"2020-03-20T07:07:10.492Z","0.18.2-nightly.20200321":"2020-03-21T07:07:30.231Z","0.18.2-nightly.20200322":"2020-03-22T07:06:55.121Z","0.18.2-nightly.20200323":"2020-03-23T07:07:03.811Z","0.18.2-nightly.20200324":"2020-03-24T07:07:29.846Z","0.18.2-nightly.20200325":"2020-03-25T07:07:14.036Z","0.18.2-nightly.20200326":"2020-03-26T07:06:58.751Z","0.18.2-nightly.20200327":"2020-03-27T07:07:06.953Z","0.18.2-nightly.20200328":"2020-03-28T07:07:01.615Z","0.18.2-nightly.20200329":"2020-03-29T07:06:40.271Z","0.18.2-nightly.20200330":"2020-03-30T07:07:09.799Z","0.18.2-nightly.20200331":"2020-03-31T07:06:57.436Z","0.18.2-nightly.20200401":"2020-04-01T07:07:13.530Z","0.18.2-nightly.20200402":"2020-04-02T07:07:40.256Z","0.18.2-nightly.20200403":"2020-04-03T07:07:19.254Z","0.18.2-nightly.20200404":"2020-04-04T07:07:47.015Z","0.18.2-nightly.20200405":"2020-04-05T07:07:18.634Z","0.18.2-nightly.20200406":"2020-04-06T07:07:49.750Z","0.18.2-nightly.20200407":"2020-04-07T07:06:59.225Z","0.18.2-nightly.20200408":"2020-04-08T07:07:01.578Z","0.18.2-nightly.20200409":"2020-04-09T07:07:16.584Z","0.18.2-nightly.20200410":"2020-04-10T07:07:15.511Z","0.18.3":"2020-04-10T17:34:47.288Z","0.18.3-nightly.20200411":"2020-04-11T07:08:28.960Z","0.18.3-nightly.20200412":"2020-04-12T07:06:46.688Z","0.18.3-nightly.20200413":"2020-04-13T07:07:28.322Z","0.18.4":"2020-04-14T00:32:34.768Z","0.18.4-nightly.20200414":"2020-04-14T07:07:18.980Z","0.18.4-nightly.20200415":"2020-04-15T07:07:17.111Z","0.18.4-nightly.20200416":"2020-04-16T07:07:50.575Z","0.18.4-nightly.20200417":"2020-04-17T07:07:05.118Z","0.18.4-nightly.20200418":"2020-04-18T07:09:30.077Z","0.18.4-nightly.20200419":"2020-04-19T07:07:37.337Z","0.18.4-nightly.20200420":"2020-04-20T07:06:59.978Z","0.18.4-nightly.20200421":"2020-04-21T07:07:22.038Z","0.18.4-nightly.20200422":"2020-04-22T07:07:27.011Z","0.19.0":"2020-04-22T22:14:10.721Z","0.19.0-nightly.20200423":"2020-04-23T07:07:12.394Z","0.19.0-nightly.20200424":"2020-04-24T07:07:05.612Z","0.19.0-nightly.20200425":"2020-04-25T07:06:54.645Z","0.19.0-nightly.20200426":"2020-04-26T07:06:34.918Z","0.19.0-nightly.20200427":"2020-04-27T07:07:44.718Z","0.19.0-nightly.20200428":"2020-04-28T07:07:49.160Z","0.19.0-nightly.20200429":"2020-04-29T07:06:50.653Z","0.19.0-nightly.20200430":"2020-04-30T07:06:54.029Z","0.19.0-nightly.20200501":"2020-05-01T07:07:28.947Z","0.19.0-nightly.20200502":"2020-05-02T07:07:07.898Z","0.19.0-nightly.20200503":"2020-05-03T07:07:35.177Z","0.19.0-nightly.20200504":"2020-05-04T07:07:12.932Z","0.19.0-nightly.20200505":"2020-05-05T07:07:50.796Z","0.19.0-nightly.20200506":"2020-05-06T07:06:56.643Z","0.19.0-nightly.20200507":"2020-05-07T07:07:07.684Z","0.19.0-nightly.20200508":"2020-05-08T07:06:53.319Z","0.19.0-nightly.20200509":"2020-05-09T07:06:56.375Z","0.19.0-nightly.20200510":"2020-05-10T07:07:07.261Z","0.19.0-nightly.20200511":"2020-05-11T07:07:04.007Z","0.20.0":"2020-05-11T23:11:25.777Z","0.19.0-nightly.20200512":"2020-05-12T07:07:55.965Z","0.19.0-nightly.20200513":"2020-05-13T07:07:15.259Z","0.19.0-nightly.20200514":"2020-05-14T07:07:21.674Z","0.21.0":"2020-05-15T15:57:37.943Z","0.21.0-nightly.20200516":"2020-05-16T07:08:17.570Z","0.21.0-nightly.20200517":"2020-05-17T07:07:23.412Z","0.21.0-nightly.20200518":"2020-05-18T07:07:36.260Z","0.21.0-nightly.20200519":"2020-05-19T07:07:00.011Z","0.21.0-nightly.20200520":"2020-05-20T07:07:23.328Z","0.21.0-nightly.20200521":"2020-05-21T07:06:58.707Z","0.21.0-nightly.20200522":"2020-05-22T07:07:29.979Z","0.21.0-nightly.20200523":"2020-05-23T07:08:54.469Z","0.21.0-nightly.20200524":"2020-05-24T07:07:31.520Z","0.21.0-nightly.20200525":"2020-05-25T07:07:53.223Z","0.21.0-nightly.20200526":"2020-05-26T07:07:13.709Z","0.21.0-nightly.20200527":"2020-05-27T07:06:50.397Z","0.21.0-nightly.20200528":"2020-05-28T07:07:05.960Z","0.21.0-nightly.20200529":"2020-05-29T07:07:37.172Z","0.21.0-nightly.20200530":"2020-05-30T07:07:48.855Z","0.21.0-nightly.20200531":"2020-05-31T07:06:50.443Z","0.21.0-nightly.20200601":"2020-06-01T07:06:49.361Z","0.21.0-nightly.20200602":"2020-06-02T07:07:20.780Z","0.21.0-nightly.20200603":"2020-06-03T07:07:10.637Z","0.21.0-nightly.20200604":"2020-06-04T07:06:48.912Z","0.21.0-nightly.20200605":"2020-06-05T07:07:23.785Z","0.21.0-nightly.20200606":"2020-06-06T07:07:06.292Z","0.21.0-nightly.20200607":"2020-06-07T07:08:14.684Z","0.21.0-nightly.20200608":"2020-06-08T07:08:32.646Z","0.22.0":"2020-06-08T16:44:32.188Z","0.22.0-nightly.20200609":"2020-06-09T07:06:55.923Z","0.22.0-nightly.20200610":"2020-06-10T07:09:01.205Z","0.22.0-nightly.20200611":"2020-06-11T07:07:18.250Z","0.22.0-nightly.20200612":"2020-06-12T07:07:30.446Z","0.23.0":"2020-06-12T23:50:41.117Z","0.23.0-nightly.20200613":"2020-06-13T07:09:50.079Z","0.23.0-nightly.20200614":"2020-06-14T07:09:15.012Z","0.23.0-nightly.20200615":"2020-06-15T07:07:35.607Z","0.23.0-nightly.20200616":"2020-06-16T07:07:32.868Z","0.23.0-nightly.20200617":"2020-06-17T07:08:04.363Z","0.23.0-nightly.20200618":"2020-06-18T07:08:45.579Z","0.23.0-nightly.20200619":"2020-06-19T07:09:18.287Z","0.23.0-nightly.20200620":"2020-06-20T07:08:05.215Z","0.23.0-nightly.20200621":"2020-06-21T07:08:33.686Z","0.23.0-nightly.20200622":"2020-06-22T07:08:17.369Z","0.23.0-nightly.20200623":"2020-06-23T07:07:39.141Z","0.23.0-nightly.20200624":"2020-06-24T07:08:17.919Z","0.23.0-nightly.20200625":"2020-06-25T07:08:05.329Z","0.24.0-ci-sanity-check":"2020-06-25T18:01:54.626Z","0.23.0-nightly.20200626":"2020-06-26T07:07:47.370Z","0.23.0-nightly.20200627":"2020-06-27T07:08:30.979Z","0.23.0-nightly.20200628":"2020-06-28T07:09:14.749Z","0.23.0-nightly.20200629":"2020-06-29T07:07:27.028Z","0.23.0-nightly.20200630":"2020-06-30T07:07:35.119Z","0.23.0-nightly.20200701":"2020-07-01T07:07:41.954Z","0.24.0":"2020-07-01T22:43:19.470Z","0.24.0-nightly.20200702":"2020-07-02T07:07:24.436Z","0.24.0-nightly.20200703":"2020-07-03T07:07:50.732Z","0.24.0-nightly.20200704":"2020-07-04T07:08:39.301Z","0.24.0-nightly.20200705":"2020-07-05T07:08:38.692Z","0.24.0-nightly.20200706":"2020-07-06T07:07:50.549Z","0.24.0-nightly.20200707":"2020-07-07T07:08:44.111Z","0.24.0-nightly.20200708":"2020-07-08T07:08:26.825Z","0.24.0-nightly.20200709":"2020-07-09T07:09:11.677Z","0.24.0-nightly.20200710":"2020-07-10T07:07:52.285Z","0.24.0-nightly.20200711":"2020-07-11T07:08:01.422Z","0.24.0-nightly.20200712":"2020-07-12T07:08:49.912Z","0.24.0-nightly.20200713":"2020-07-13T07:07:28.626Z","0.24.0-nightly.20200715":"2020-07-15T07:07:46.304Z","0.24.0-nightly.20200716":"2020-07-16T07:07:14.369Z","0.24.0-nightly.20200717":"2020-07-17T07:07:20.677Z","0.24.0-nightly.20200718":"2020-07-18T07:07:18.737Z","0.24.0-nightly.20200719":"2020-07-19T07:07:16.139Z","0.24.0-nightly.20200720":"2020-07-20T07:08:36.691Z","0.24.1":"2020-07-20T22:10:54.510Z","0.24.1-nightly.20200721":"2020-07-21T07:07:44.273Z","0.24.1-nightly.20200722":"2020-07-22T07:07:31.804Z","0.24.1-nightly.20200723":"2020-07-23T07:07:19.629Z","0.24.1-nightly.20200724":"2020-07-24T07:08:53.505Z","0.25.0":"2020-07-24T20:12:43.082Z","0.25.0-nightly.20200727":"2020-07-27T22:20:06.266Z","0.25.1":"2020-07-28T00:12:50.364Z","0.25.1-nightly.20200728":"2020-07-28T07:15:45.171Z","0.25.1-nightly.20200729":"2020-07-29T07:15:52.645Z","0.25.1-nightly.20200730":"2020-07-30T07:16:18.533Z","0.25.1-nightly.20200731":"2020-07-31T07:15:55.385Z","0.25.1-nightly.20200801":"2020-08-01T07:16:02.356Z","0.25.1-nightly.20200802":"2020-08-02T07:16:21.016Z","0.25.1-nightly.20200803":"2020-08-03T07:16:24.616Z","0.25.1-nightly.20200804":"2020-08-04T07:16:29.618Z","0.26.0-nightly.20200804":"2020-08-04T16:08:08.228Z","0.26.0-nightly.20200805":"2020-08-05T07:16:44.602Z","0.26.0-nightly.20200806":"2020-08-06T07:16:35.680Z","0.26.1-nightly.20200806":"2020-08-06T15:37:01.057Z","0.26.1-nightly.20200807":"2020-08-07T07:16:57.389Z","0.26.1-nightly.20200808":"2020-08-08T07:17:35.578Z","0.26.1-nightly.20200809":"2020-08-09T07:19:44.763Z","0.26.1-nightly.20200810":"2020-08-10T07:17:20.175Z","0.26.0":"2020-08-10T18:11:40.098Z","0.26.1":"2020-08-10T18:59:14.897Z","0.26.1-nightly.20200811":"2020-08-11T07:20:22.042Z","0.27.0":"2020-08-11T18:10:02.368Z","0.27.0-nightly.20200812":"2020-08-12T07:17:47.191Z","0.27.0-nightly.20200813":"2020-08-13T07:17:44.046Z","0.27.0-nightly.20200814":"2020-08-14T07:17:28.292Z","0.27.0-nightly.20200815":"2020-08-15T07:17:42.950Z","0.27.0-nightly.20200816":"2020-08-16T07:18:02.275Z","0.27.0-nightly.20200817":"2020-08-17T07:17:59.021Z","0.27.0-nightly.20200818":"2020-08-18T07:17:56.544Z","0.27.0-nightly.20200819":"2020-08-19T07:17:55.387Z","0.27.0-nightly.20200820":"2020-08-20T07:18:01.731Z","0.27.0-nightly.20200821":"2020-08-21T07:18:04.856Z","0.27.0-nightly.20200822":"2020-08-22T07:17:53.052Z","0.27.0-nightly.20200823":"2020-08-23T07:18:32.974Z","0.27.0-nightly.20200824":"2020-08-24T07:18:33.292Z","0.28.0":"2020-08-24T23:20:25.303Z","0.28.0-nightly.20200825":"2020-08-25T07:18:36.524Z","0.28.0-nightly.20200826":"2020-08-26T07:18:31.396Z","0.28.0-nightly.20200827":"2020-08-27T07:21:49.944Z","0.28.0-nightly.20200828":"2020-08-28T07:19:53.729Z","0.28.0-nightly.20200829":"2020-08-29T07:12:00.882Z","0.28.0-nightly.20200830":"2020-08-30T07:14:29.753Z","0.28.0-nightly.20200831":"2020-08-31T07:11:25.225Z","0.28.0-nightly.20200901":"2020-09-01T07:20:04.116Z","0.28.0-nightly.20200902":"2020-09-02T07:20:25.240Z","0.28.0-nightly.20200903":"2020-09-03T07:20:28.910Z","0.29.0":"2020-09-03T23:57:39.690Z","0.29.0-nightly.20200904":"2020-09-04T07:20:34.219Z","0.29.0-nightly.20200906":"2020-09-06T07:20:25.762Z","0.29.0-nightly.20200907":"2020-09-07T07:21:28.308Z","0.29.0-nightly.20200908":"2020-09-08T07:20:50.022Z","0.29.0-nightly.20200909":"2020-09-09T07:21:01.472Z","0.29.0-nightly.20200910":"2020-09-10T07:20:22.557Z","0.29.0-nightly.20200911":"2020-09-11T07:20:25.669Z","0.29.0-nightly.20200912":"2020-09-12T07:20:27.299Z","0.29.0-nightly.20200913":"2020-09-13T07:20:41.670Z","0.29.0-nightly.20200914":"2020-09-14T07:20:41.143Z","0.30.0":"2020-09-14T18:19:05.801Z","0.30.0-nightly.20200914":"2020-09-14T20:58:27.572Z","0.30.0-nightly.20200915":"2020-09-15T07:21:00.460Z","0.30.0-nightly.20200916":"2020-09-16T07:21:15.329Z","0.30.0-nightly.20200917":"2020-09-17T07:21:06.295Z","0.30.0-nightly.20200918":"2020-09-18T07:20:49.702Z","0.31.0":"2020-09-18T21:29:21.709Z","0.31.0-nightly.20200919":"2020-09-19T07:20:50.103Z","0.31.0-nightly.20200920":"2020-09-20T07:20:53.800Z","0.31.0-nightly.20200921":"2020-09-21T07:21:14.680Z","0.31.0-nightly.20200922":"2020-09-22T07:21:30.436Z","0.31.0-nightly.20200923":"2020-09-23T07:22:13.910Z","0.31.0-nightly.20200924":"2020-09-24T07:21:54.538Z","0.31.0-nightly.20200925":"2020-09-25T07:21:56.950Z","0.32.0":"2020-09-25T18:13:52.898Z","0.32.0-nightly.20200925":"2020-09-25T18:18:35.069Z","0.32.0-nightly.20200926":"2020-09-26T07:21:37.599Z","0.32.0-nightly.20200927":"2020-09-27T07:22:23.663Z","0.32.0-nightly.20200928":"2020-09-28T07:22:17.453Z","0.33.0":"2020-09-28T20:43:22.826Z","0.33.0-nightly.20200928":"2020-09-28T20:55:08.078Z","0.33.0-nightly.20200929":"2020-09-29T07:22:01.896Z","0.33.0-nightly.20200930":"2020-09-30T07:23:54.210Z","0.33.0-nightly.20201001":"2020-10-01T07:23:17.052Z","0.33.0-nightly.20201002":"2020-10-02T07:22:57.292Z","0.33.0-nightly.20201003":"2020-10-03T07:22:57.404Z","0.33.0-nightly.20201004":"2020-10-04T07:23:29.685Z","0.33.0-nightly.20201005":"2020-10-05T07:23:33.184Z","0.33.0-nightly.20201006":"2020-10-06T07:23:51.719Z","0.33.0-nightly.20201007":"2020-10-07T07:24:51.780Z","0.33.0-nightly.20201008":"2020-10-08T07:20:36.626Z","0.33.1-nightly.20201008":"2020-10-08T21:18:32.094Z","0.33.1":"2020-10-08T21:19:03.996Z","0.33.1-nightly.20201009":"2020-10-09T07:24:05.106Z","0.33.1-nightly.20201010":"2020-10-10T07:23:51.059Z","0.33.1-nightly.20201011":"2020-10-11T07:24:04.086Z","0.33.1-nightly.20201012":"2020-10-12T07:24:20.828Z","0.33.1-nightly.20201013":"2020-10-13T07:24:40.348Z","0.33.1-nightly.20201014":"2020-10-14T07:25:42.057Z","0.33.1-nightly.20201015":"2020-10-15T07:25:01.719Z","0.33.1-nightly.20201016":"2020-10-16T07:24:48.377Z","0.33.1-nightly.20201017":"2020-10-17T07:24:45.589Z","0.33.1-nightly.20201018":"2020-10-18T07:25:22.109Z","0.33.1-nightly.20201019":"2020-10-19T07:29:48.278Z","0.34.0":"2020-10-19T22:02:50.877Z","0.34.0-nightly.20201020":"2020-10-20T07:25:44.495Z","0.34.0-nightly.20201021":"2020-10-21T07:26:57.289Z","0.34.0-nightly.20201022":"2020-10-22T07:26:18.191Z","0.35.0-nightly.20201022":"2020-10-22T21:10:27.904Z","0.35.0":"2020-10-22T21:11:17.948Z","0.35.0-nightly.20201023":"2020-10-23T07:26:35.726Z","0.35.0-nightly.20201024":"2020-10-24T07:26:11.861Z","0.35.0-nightly.20201025":"2020-10-25T07:26:55.710Z","0.35.0-nightly.20201026":"2020-10-26T07:27:32.668Z","0.35.0-nightly.20201027":"2020-10-27T07:28:04.158Z","0.36.0":"2020-10-27T22:54:04.338Z","0.36.0-nightly.20201028":"2020-10-28T07:29:10.089Z","0.36.0-nightly.20201029":"2020-10-29T07:28:38.811Z","0.36.0-nightly.20201030":"2020-10-30T07:16:05.316Z","0.37.0-nightly.20201030":"2020-10-30T18:16:34.418Z","0.37.0":"2020-10-30T18:16:46.810Z","0.37.0-nightly.20201031":"2020-10-31T07:17:45.956Z","0.37.0-nightly.20201101":"2020-11-01T07:19:57.817Z","0.37.0-nightly.20201102":"2020-11-02T07:18:43.770Z","0.37.0-nightly.20201103":"2020-11-03T07:19:17.847Z","0.37.0-nightly.20201104":"2020-11-04T07:20:10.311Z","0.37.0-nightly.20201105":"2020-11-05T07:19:54.636Z","0.37.0-nightly.20201106":"2020-11-06T07:20:14.669Z","0.37.0-nightly.20201107":"2020-11-07T07:20:41.030Z","0.37.0-nightly.20201108":"2020-11-08T07:20:34.980Z","0.37.0-nightly.20201109":"2020-11-09T07:21:43.417Z","0.37.0-nightly.20201110":"2020-11-10T07:16:47.566Z","0.37.0-nightly.20201111":"2020-11-11T07:18:42.403Z","0.37.0-nightly.20201112":"2020-11-12T07:18:27.906Z","0.37.0-nightly.20201113":"2020-11-13T07:18:43.196Z","0.37.0-nightly.20201114":"2020-11-14T07:17:40.970Z","0.37.0-nightly.20201115":"2020-11-15T07:17:52.002Z","0.37.0-nightly.20201116":"2020-11-16T07:18:39.893Z","0.37.0-nightly.20201117":"2020-11-17T07:18:54.127Z","0.38.0":"2020-11-17T23:02:57.712Z","0.38.0-nightly.20201117":"2020-11-17T23:13:36.866Z","0.38.0-nightly.20201118":"2020-11-18T07:20:15.200Z","0.38.0-nightly.20201119":"2020-11-19T07:19:37.548Z","0.38.0-nightly.20201120":"2020-11-20T07:20:36.702Z","0.38.0-nightly.20201121":"2020-11-21T07:29:42.612Z","0.38.0-nightly.20201122":"2020-11-22T07:19:23.398Z","0.38.0-nightly.20201123":"2020-11-23T07:20:11.610Z","0.38.0-nightly.20201124":"2020-11-24T07:22:28.004Z","0.39.0":"2020-11-24T19:43:19.475Z","0.39.0-nightly.20201124":"2020-11-24T20:15:39.534Z","0.39.0-nightly.20201125":"2020-11-25T07:21:15.548Z","0.39.0-nightly.20201126":"2020-11-26T07:20:51.278Z","0.39.0-nightly.20201127":"2020-11-27T07:21:10.175Z","0.39.0-nightly.20201128":"2020-11-28T07:21:23.354Z","0.39.0-nightly.20201129":"2020-11-29T07:23:17.242Z","0.39.0-nightly.20201130":"2020-11-30T07:22:05.920Z","0.39.0-nightly.20201201":"2020-12-01T07:22:07.163Z","0.39.0-nightly.20201202":"2020-12-02T07:22:44.345Z","0.39.0-nightly.20201203":"2020-12-03T07:22:58.776Z","0.39.0-nightly.20201204":"2020-12-04T07:24:47.312Z","0.39.0-nightly.20201205":"2020-12-05T07:23:50.543Z","0.39.0-nightly.20201206":"2020-12-06T07:24:24.348Z","0.39.0-nightly.20201207":"2020-12-07T07:25:55.381Z","0.39.0-nightly.20201208":"2020-12-08T07:25:06.698Z","0.39.0-nightly.20201209":"2020-12-09T07:25:52.841Z","0.39.0-nightly.20201210":"2020-12-10T07:24:27.454Z","0.39.0-nightly.20201211":"2020-12-11T07:24:54.216Z","0.39.0-nightly.20201212":"2020-12-12T07:25:17.673Z","0.39.0-nightly.20201213":"2020-12-13T07:25:29.688Z","0.39.0-nightly.20201214":"2020-12-14T07:31:39.111Z","0.39.0-nightly.20201215":"2020-12-15T07:26:03.838Z","0.39.0-nightly.20201216":"2020-12-16T07:26:51.825Z","0.39.0-nightly.20201217":"2020-12-17T07:27:28.886Z","0.40.0-nightly.20201217":"2020-12-17T16:10:04.822Z","0.40.0":"2020-12-17T16:10:51.132Z","0.40.1":"2020-12-17T22:29:59.081Z","0.40.1-nightly.20201218":"2020-12-18T07:29:41.440Z","0.40.1-nightly.20201219":"2020-12-19T07:33:04.038Z","0.40.1-nightly.20201220":"2020-12-20T07:28:15.917Z","0.40.1-nightly.20201221":"2020-12-21T07:31:02.493Z","0.40.1-nightly.20201222":"2020-12-22T07:34:47.134Z","0.40.1-nightly.20201223":"2020-12-23T07:35:22.219Z","0.40.1-nightly.20201224":"2020-12-24T07:36:09.395Z","0.40.1-nightly.20201225":"2020-12-25T07:32:41.712Z","0.40.1-nightly.20201226":"2020-12-26T07:32:36.220Z","0.40.1-nightly.20201227":"2020-12-27T07:33:01.092Z","0.40.1-nightly.20201228":"2020-12-28T07:35:19.182Z","0.40.1-nightly.20201229":"2020-12-29T07:36:01.209Z","0.40.1-nightly.20201230":"2020-12-30T07:36:21.713Z","0.40.1-nightly.20201231":"2020-12-31T07:39:57.139Z","0.40.1-nightly.20210101":"2021-01-01T07:37:21.602Z","0.40.1-nightly.20210102":"2021-01-02T07:37:14.033Z","0.40.1-nightly.20210103":"2021-01-03T07:38:33.019Z","0.40.1-nightly.20210104":"2021-01-04T07:41:39.439Z","0.40.1-nightly.20210105":"2021-01-05T07:41:57.983Z","0.40.1-nightly.20210106":"2021-01-06T07:42:48.253Z","0.40.1-nightly.20210107":"2021-01-07T07:43:25.246Z","0.40.1-nightly.20210108":"2021-01-08T07:44:40.192Z","0.41.0":"2021-01-08T17:29:40.463Z","0.41.0-nightly.20210108":"2021-01-08T17:33:27.161Z","0.41.0-nightly.20210109":"2021-01-09T07:45:38.916Z","0.41.0-nightly.20210110":"2021-01-10T07:47:28.619Z","0.41.0-nightly.20210111":"2021-01-11T07:48:48.588Z","0.41.0-nightly.20210112":"2021-01-12T07:50:57.629Z","0.41.0-nightly.20210113":"2021-01-13T07:56:44.143Z","0.41.0-nightly.20210114":"2021-01-14T08:03:25.886Z","0.41.0-nightly.20210115":"2021-01-15T07:58:39.063Z","0.41.0-nightly.20210116":"2021-01-16T07:57:38.837Z","0.41.0-nightly.20210117":"2021-01-17T07:57:49.079Z","0.41.0-nightly.20210118":"2021-01-18T08:02:21.397Z","0.41.0-nightly.20210119":"2021-01-19T08:00:55.891Z","0.41.0-nightly.20210120":"2021-01-20T08:02:43.546Z","0.41.0-nightly.20210121":"2021-01-21T08:01:53.143Z","0.41.0-nightly.20210122":"2021-01-22T08:00:14.147Z","0.41.0-nightly.20210123":"2021-01-23T07:57:49.907Z","0.41.0-nightly.20210124":"2021-01-24T07:58:48.836Z","0.41.0-nightly.20210125":"2021-01-25T08:00:37.651Z","0.42.0":"2021-01-25T22:12:32.439Z","0.42.0-nightly.20210126":"2021-01-26T07:30:59.502Z","0.42.0-nightly.20210127":"2021-01-27T07:31:57.684Z","0.42.0-nightly.20210128":"2021-01-28T08:47:36.354Z","0.42.0-nightly.20210129":"2021-01-29T07:30:50.798Z","0.42.0-nightly.20210130":"2021-01-30T07:29:46.961Z","0.42.0-nightly.20210131":"2021-01-31T07:29:52.305Z","0.42.0-nightly.20210201":"2021-02-01T07:30:53.480Z","0.42.0-nightly.20210202":"2021-02-02T07:30:43.562Z","0.42.0-nightly.20210203":"2021-02-03T07:26:53.679Z","0.42.0-nightly.20210204":"2021-02-04T07:24:36.783Z","0.42.0-nightly.20210205":"2021-02-05T07:24:19.076Z","0.42.0-nightly.20210206":"2021-02-06T07:24:32.673Z","0.42.0-nightly.20210207":"2021-02-07T07:25:33.960Z","0.42.0-nightly.20210208":"2021-02-08T07:24:28.586Z","0.42.0-nightly.20210209":"2021-02-09T07:24:18.603Z","0.42.0-nightly.20210210":"2021-02-10T07:25:42.272Z","0.42.0-nightly.20210211":"2021-02-11T07:24:43.636Z","0.42.0-nightly.20210212":"2021-02-12T07:24:50.548Z","0.42.0-nightly.20210213":"2021-02-13T07:23:55.624Z","0.42.0-nightly.20210214":"2021-02-14T07:24:23.455Z","0.42.0-nightly.20210215":"2021-02-15T07:28:34.422Z","0.42.0-nightly.20210216":"2021-02-16T07:24:32.967Z","0.42.0-nightly.20210217":"2021-02-17T07:24:38.140Z","0.42.0-nightly.20210218":"2021-02-18T07:24:55.194Z","0.42.0-nightly.20210219":"2021-02-19T07:24:58.982Z","0.42.0-nightly.20210220":"2021-02-20T07:24:28.661Z","0.42.0-nightly.20210221":"2021-02-21T07:24:32.225Z","0.42.0-nightly.20210222":"2021-02-22T07:21:04.180Z","0.42.0-nightly.20210223":"2021-02-23T07:24:45.133Z","0.42.0-nightly.20210224":"2021-02-24T07:29:51.220Z","0.42.0-nightly.20210225":"2021-02-25T07:24:39.214Z","0.42.0-nightly.20210226":"2021-02-26T07:25:06.284Z","0.42.0-nightly.20210227":"2021-02-27T07:24:40.508Z","0.42.0-nightly.20210228":"2021-02-28T07:24:57.555Z","0.42.0-nightly.20210301":"2021-03-01T07:25:25.953Z","0.42.0-nightly.20210302":"2021-03-02T07:24:56.330Z","0.42.0-nightly.20210303":"2021-03-03T07:25:43.081Z","0.42.0-nightly.20210304":"2021-03-04T07:24:59.439Z","0.42.0-nightly.20210305":"2021-03-05T07:25:20.613Z","0.42.0-nightly.20210306":"2021-03-06T07:24:54.635Z","0.42.0-nightly.20210307":"2021-03-07T07:25:03.625Z","0.42.0-nightly.20210308":"2021-03-08T07:25:11.606Z","0.42.0-nightly.20210309":"2021-03-09T07:25:11.744Z","0.42.0-nightly.20210310":"2021-03-10T07:25:17.406Z","0.42.0-nightly.20210311":"2021-03-11T07:25:11.653Z","0.42.0-nightly.20210312":"2021-03-12T07:25:27.809Z","0.42.0-nightly.20210313":"2021-03-13T07:25:30.784Z","0.42.0-nightly.20210314":"2021-03-14T07:25:55.119Z","0.42.0-nightly.20210315":"2021-03-15T07:25:01.494Z","0.42.0-nightly.20210316":"2021-03-16T07:24:37.807Z","0.42.0-nightly.20210317":"2021-03-17T07:25:00.060Z","0.42.0-nightly.20210318":"2021-03-18T07:24:54.551Z","0.42.0-nightly.20210319":"2021-03-19T07:25:20.105Z","0.42.0-nightly.20210320":"2021-03-20T07:25:16.522Z","0.42.0-nightly.20210321":"2021-03-21T07:25:15.778Z","0.42.0-nightly.20210322":"2021-03-22T07:30:16.805Z","0.42.0-nightly.20210323":"2021-03-23T07:26:50.817Z","0.42.0-nightly.20210324":"2021-03-24T07:10:13.315Z","0.42.0-nightly.20210325":"2021-03-25T07:09:22.919Z","0.42.0-nightly.20210326":"2021-03-26T07:10:30.202Z","0.42.0-nightly.20210327":"2021-03-27T07:10:23.519Z","0.42.0-nightly.20210328":"2021-03-28T07:10:08.695Z","0.42.0-nightly.20210329":"2021-03-29T07:11:06.804Z","0.42.0-nightly.20210330":"2021-03-30T07:10:31.797Z","0.42.0-nightly.20210410":"2021-04-10T07:11:33.042Z","0.42.0-nightly.20210413":"2021-04-13T07:12:17.360Z","0.42.0-nightly.20210414":"2021-04-14T07:11:25.010Z","0.42.0-nightly.20210421":"2021-04-21T07:12:08.933Z","0.43.0":"2021-04-29T23:39:51.149Z","0.43.0-nightly.20210430":"2021-04-30T07:28:39.795Z","0.43.0-nightly.20210501":"2021-05-01T07:28:19.952Z","0.43.0-nightly.20210507":"2021-05-07T07:28:23.329Z","0.43.0-nightly.20210520":"2021-05-20T07:31:51.597Z","0.43.0-nightly.20210525":"2021-05-25T07:42:28.360Z","0.43.0-nightly.20210603":"2021-06-03T08:35:07.713Z","0.44.0":"2021-06-03T23:06:33.212Z","0.44.0-nightly.20210604":"2021-06-04T09:02:42.144Z","0.44.0-nightly.20210609":"2021-06-09T07:35:01.238Z","0.44.0-nightly.20210609.1":"2021-06-09T16:22:53.721Z","0.44.0-nightly.20210610":"2021-06-10T07:32:21.128Z","0.44.1":"2021-06-17T18:32:07.483Z","0.44.1-nightly.20210618":"2021-06-18T07:25:49.750Z","0.44.1-nightly.20210625":"2021-06-25T07:18:14.498Z","0.44.1-nightly.20210921":"2021-09-21T07:20:54.761Z","0.45.0":"2021-09-22T22:28:31.590Z","0.45.0-nightly.20210923":"2021-09-23T07:21:26.055Z"},"repository":{"type":"git","url":"https://github.com/sjbarag/brs"},"author":{"name":"Sean Barag","email":"sean@barag.org"},"license":"MIT","readmeFilename":""}